daniel-s-linux-stuff:xf86-video-intel.git
7 years agoman page: Remove section describing BACKLIGHT_CONTROL property.
Carl Worth [Mon, 4 Jan 2010 22:08:24 +0000 (14:08 -0800)]
man page: Remove section describing BACKLIGHT_CONTROL property.

This apparently no longer exists in a KMS world, so remove it from the
documentation.

7 years agoman page: Rename PANEL_FITTING to "scaling mode".
Carl Worth [Mon, 4 Jan 2010 22:07:24 +0000 (14:07 -0800)]
man page: Rename PANEL_FITTING to "scaling mode".

The old UMS name was PANEL_FITTING while the new KMS name is "scaling mode".

Fixes bug #25606.

7 years agoman page: Add additional indentation for some output configuration options.
Carl Worth [Mon, 4 Jan 2010 22:05:27 +0000 (14:05 -0800)]
man page: Add additional indentation for some output configuration options.

The BACKLIGHT_CONTROL and PANEL_FITTING options appear in a list, and
then each contain a sub-list of sub-options. Use indentation to make
this structure more apparent to the reader.

7 years agoconfigure.ac: use backticks rather than $() for cmd subs
Gaetan Nadon [Wed, 16 Dec 2009 02:46:48 +0000 (21:46 -0500)]
configure.ac: use backticks rather than $() for cmd subs

Use "$PKG_CONFIG" rather than hard coded "pkg-config"

Acked-by: Dan Nicholson <dbn.lists@gmail.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
7 years agoUpdate version to 2.9.99.902.
Carl Worth [Thu, 10 Dec 2009 23:25:44 +0000 (15:25 -0800)]
Update version to 2.9.99.902.

For the second release-candidate snapshot in preparation for 2.10.

7 years agoNEWS: Add notes for 2.9.99.902 (and preliminary notes for 2.10)
Carl Worth [Thu, 10 Dec 2009 23:17:57 +0000 (15:17 -0800)]
NEWS: Add notes for 2.9.99.902 (and preliminary notes for 2.10)

This comes from my cursory glance over the commit log from 2.9.1
to master.

7 years agoDocument the DebugFlushBatches, DebugFlushCaches, and DebugWait options.
Carl Worth [Thu, 10 Dec 2009 22:52:46 +0000 (14:52 -0800)]
Document the DebugFlushBatches, DebugFlushCaches, and DebugWait options.

These were added in 3c0815abf28744e215bea286e71d935cd486955a . The
documentation added here comes straight from that commit message.

7 years agoFix compiler warning in i830_copy_video_data() if XvMC is disabled
Tobias Doerffel [Wed, 9 Dec 2009 08:57:20 +0000 (09:57 +0100)]
Fix compiler warning in i830_copy_video_data() if XvMC is disabled

The variable "intel" is unused when building i830_video.c without XvMC
support which results in a compiler warning:

  i830_video.c: In function 'i830_copy_video_data':
  i830_video.c:1443: warning: unused variable `intel'

Trivial fix via #ifdef.

7 years agoXv: enable drmmode overlay
Daniel Vetter [Tue, 8 Dec 2009 14:27:41 +0000 (15:27 +0100)]
Xv: enable drmmode overlay

Now that libdrm 2.4.16 is released (and already required) we can
unconditionally enable this.

Please add something like this to the release-notes/NEWS file:

* Overlay support for kernel modesetting. This needs at least kernel
  v2.6.33 to work. A backport to 2.6.32 is available at:

  http://gitorious.org/daniel-s-linux-stuff/linux-kernel/commits/intel-kms-overlay-for-2.6.32

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
7 years agoRevert "uxa-glyphs: Enable TILING_X on glyph caches."
Chris Wilson [Thu, 10 Dec 2009 08:50:16 +0000 (08:50 +0000)]
Revert "uxa-glyphs: Enable TILING_X on glyph caches."

This reverts commit 3f11bbec420080151406c203af292e55177e77d1.

For unknown reasons, enabling tiling for the glyph cache is causing
glyph corruption both across suspend and resume and VT switching, on a
wide range of chipsets (reports include both i8xx and gm45)

This strongly suggests that we are handling tiling, or updates to tiled
buffers, incorrectly across i915_gem_idle(). However, until we can find
the root cause, we want to fix this regression before the next stable
release, so simply revert this patch. :(

Fixes:
  [Bug 25406] fonts garbled after resuming from suspend since 6729b508
  http://bugs.freedesktop.org/show_bug.cgi?id=25406

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Only use the affine kernels if both src and mask are affine
Chris Wilson [Tue, 8 Dec 2009 23:45:28 +0000 (23:45 +0000)]
i965: Only use the affine kernels if both src and mask are affine

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Set src_filter before testing.
Chris Wilson [Tue, 8 Dec 2009 23:44:45 +0000 (23:44 +0000)]
i965: Set src_filter before testing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoAssert that we only call OUT_BATCH() inside a BATCH
Chris Wilson [Tue, 8 Dec 2009 23:43:57 +0000 (23:43 +0000)]
Assert that we only call OUT_BATCH() inside a BATCH

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Maximum number of vertices per composite is 24, not 18
Chris Wilson [Tue, 8 Dec 2009 13:47:07 +0000 (13:47 +0000)]
i965: Maximum number of vertices per composite is 24, not 18

Beware the potential buffer overflow.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agouxa: Cache solid fills.
Chris Wilson [Mon, 7 Dec 2009 21:27:56 +0000 (21:27 +0000)]
uxa: Cache solid fills.

Maintain a small cache of pixmaps to hold SolidFill pictures. Currently
we create a pixmap the size of the damaged region and fill that using
pixman before downloading it to the GPU and compositing. Needless to say
this is extremely expensive compared to simply emitting the solid
colour. To mitigate this cost, we maintain a small cache of 1x1R
pictures which is recognised by the driver as being a solid, but at the
very least is maintained as a GPU ready pixmap.

This gives a good boost to cairo-xcb (which uses solid fills) on a gm45:

Before:
  gnome-terminal-vim: 41.9s
After:
  gnome-terminal-vim: 31.7s

Compare with using a cache of 1x1R pixmaps in cairo-xcb:
  gnome-terminal-vim: 31.6s

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agobatch: Ensure we send a MI_FLUSH in the block handler for TFP
Chris Wilson [Mon, 7 Dec 2009 11:09:14 +0000 (11:09 +0000)]
batch: Ensure we send a MI_FLUSH in the block handler for TFP

This should restore the previous level of synchronisation between
textures and pixmaps, but *does not* guarantee that a texture will be
flushed before use. tfp should be fixed so that the ddx can submit the
batch if required to flush the pixmap.

A side-effect of this patch is to rename intel_batch_flush() to
intel_batch_submit() to reduce the confusion of executing a batch buffer
with that of emitting a MI_FLUSH.

Should fix the remaining rendering corruption involving tfp [inc compiz]:

  Bug 25431 [i915 bisected] piglit/texturing_tfp regressed
  http://bugs.freedesktop.org/show_bug.cgi?id=25431

  Bug 25481 Wrong cursor format and cursor blink rate with compiz enabled
  http://bugs.freedesktop.org/show_bug.cgi?id=25481

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agointel: And remember to flush the batch...
Chris Wilson [Fri, 4 Dec 2009 09:02:36 +0000 (09:02 +0000)]
intel: And remember to flush the batch...

In commit 98e11210

  Remove flush parameter from intel_batch_flush()

Maxi spotted that I had broken screen updating. It appears in my haste
to eliminate the extra parameter I removed a call to intel_batch_flush()
when throttling, i.e. when pushing the updates to the screen before
idling.

Should fix:

  Bug 25409 [bisected] rendering corruption since a938673e
  https://bugs.freedesktop.org/show_bug.cgi?id=25409

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoRequire libdrm 2.4.16
Kristian Høgsberg [Thu, 3 Dec 2009 19:39:43 +0000 (14:39 -0500)]
Require libdrm 2.4.16

Needed for drmGetDeviceNameFromFd().

7 years agoUpdate man page to reflect currently available options
Jesse Barnes [Wed, 2 Dec 2009 22:43:17 +0000 (14:43 -0800)]
Update man page to reflect currently available options

Many have been removed or are obsolete now that UMS is gone.  And some
are only available on i810/i815 or i830+, so move them to the
appropriate section.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
7 years agobatch: Downgrade batch submission from a FatalError.
Chris Wilson [Wed, 2 Dec 2009 20:51:53 +0000 (20:51 +0000)]
batch: Downgrade batch submission from a FatalError.

If we wedge the GPU then we will return -EIO for the current batch and
then attempt to reset the GPU. Meanwhile the X server detects the error,
throws a FatalError and to all intents and purposes appears to crash to
the user - whereas before it often just appeared to momentarily freeze.
Of course, on older hardware the server remains frozen until we can find
a way to reset those GPUs at runtime.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoRemove flush parameter from intel_batch_flush()
Chris Wilson [Wed, 2 Dec 2009 20:48:37 +0000 (20:48 +0000)]
Remove flush parameter from intel_batch_flush()

There is only a single caller that wishes to forcibly append a flush
into the batch: intel_sync(). So move the logic there.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoRename I830Sync() to intel_sync()
Chris Wilson [Wed, 2 Dec 2009 20:42:41 +0000 (20:42 +0000)]
Rename I830Sync() to intel_sync()

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agobatch: Avoid flushing a NULL batch
Chris Wilson [Wed, 2 Dec 2009 20:28:49 +0000 (20:28 +0000)]
batch: Avoid flushing a NULL batch

During shutdown from a FatalError during batchbuffer submission, it is
possible for the batch_ptr to be NULL, so we must be careful not to
append a flush on this error path.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agouxa_check_composite: Minor whitespace.
Chris Wilson [Wed, 2 Dec 2009 14:14:39 +0000 (14:14 +0000)]
uxa_check_composite: Minor whitespace.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agouxa_prepare_access() don't force a flush.
Chris Wilson [Wed, 2 Dec 2009 14:13:43 +0000 (14:13 +0000)]
uxa_prepare_access() don't force a flush.

Only the kernel knows whether the mapping requires a flush, so do not
preempt it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoReview use of errno after libdrm call
Chris Wilson [Wed, 2 Dec 2009 14:12:19 +0000 (14:12 +0000)]
Review use of errno after libdrm call

Since drm may not actually set the appropriate errno after a failure, we
must use the return code instead when determining the cause of failure.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agouxa: Review uxa_prepare_access() to remove potential nesting
Chris Wilson [Wed, 2 Dec 2009 12:12:07 +0000 (12:12 +0000)]
uxa: Review uxa_prepare_access() to remove potential nesting

Around a call to uxa_put_image() it is possible to mix both accelerated
and fallback paths, with the fallback code making the presumed
optimisation of only trying to call uxa_prepare_access() once. This
fails if the accelerated path also uses prepare/finish access on the
same drawable and then later fallback to the fallback path. This can
happen currently if an error is reported whilst attempting to accelerate
PutImage.

  #0  memcpy () at ../sysdeps/x86_64/memcpy.S:162
  #1  0x00007ffff43ce4bd in fbBlt (srcLine=<value optimized out>, srcStride=40, srcX=<value optimized out>, dstLine=0xffffffffffffffff, dstStride=64, dstX=0, width=<value optimized out>, height=8, alu=3, pm=4294967295, bpp=8, reverse=0, upsidedown=0) at fbblt.c:93
  #2  0x00007ffff43ce740 in fbBltStip (src=0xffffffffffffffff, srcStride=156555204, srcX=34, dst=0xfffffffc, dstStride=64, dstX=40, width=304, height=8, alu=3, pm=4294967295, bpp=8) at fbblt.c:944
  #3  0x00007ffff4c32c53 in uxa_do_put_image (pDrawable=0x246aa410, pGC=0x2c0a4f0, depth=8, x=0, y=0, w=38, h=8, leftPad=0, format=2, bits=0x954d7c4 "") at uxa-accel.c:196 #4  uxa_do_shm_put_image (pDrawable=0x246aa410, pGC=0x2c0a4f0, depth=8, x=0, y=0, w=38, h=8, leftPad=0, format=2, bits=0x954d7c4 "") at uxa-accel.c:223
  #5  uxa_put_image (pDrawable=0x246aa410, pGC=0x2c0a4f0, depth=8, x=0, y=0, w=38, h=8, leftPad=0, format=2, bits=0x954d7c4 "") at uxa-accel.c:289
  #6  0x00000000004d574f in damagePutImage (pDrawable=0x246aa410, pGC=0x2c0a4f0, depth=8, x=0, y=0, w=38, h=8, leftPad=0, format=2, pImage=0x954d7c4 "") at damage.c:905
  #7  0x00000000004287db in ProcPutImage (client=0x47ca72d0) at dispatch.c:2073
  #8  0x000000000042bd94 in Dispatch () at dispatch.c:445
  #9  0x000000000042513a in main (argc=4, argv=0x7fffffffe2a8, envp=<value optimized out>) at main.c:285

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi830: Simplify prepare_access / finish_access
Chris Wilson [Tue, 1 Dec 2009 16:13:25 +0000 (16:13 +0000)]
i830: Simplify prepare_access / finish_access

Reduce the 3 conditions into the 2 distinct cases. This has the
secondary benefit of also distinguishing between the reported errors.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agouxa: Don't treat prepare_access as a flush synchronisation point.
Chris Wilson [Tue, 1 Dec 2009 13:20:20 +0000 (13:20 +0000)]
uxa: Don't treat prepare_access as a flush synchronisation point.

The kernel will only emit a flush iff the buffer is currently owned by
the GPU. Instead of presuming that the kernel must emit a flush, it is
safer to assume that it does not and so cannot mapping the buffer on to
the CPU as a synchronisation point. The most obvious counter-example is
when we map the same buffer twice without using it in a batch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoAdd i830_bios.h and i830_display.h to EXTRA_DIST.
Carl Worth [Tue, 1 Dec 2009 04:17:04 +0000 (20:17 -0800)]
Add i830_bios.h and i830_display.h to EXTRA_DIST.

These files have been dropped from the generated tar file since the
removal of UMS support. However, the bios_reader code still includes
these, so "make distcheck" fails unless these are distributed.

There's probably a cleaner fix possible, but this at least fixes the
build so that the snapshot can be pushed out.

7 years agoNEWS: Note that the driver now has a hard dependency on KMS.
Carl Worth [Tue, 1 Dec 2009 04:16:19 +0000 (20:16 -0800)]
NEWS: Note that the driver now has a hard dependency on KMS.

Since the UMS code has all been removed.

7 years agoconfigure.ac: Bump version to 2.9.99.901.
Carl Worth [Tue, 1 Dec 2009 03:48:05 +0000 (19:48 -0800)]
configure.ac: Bump version to 2.9.99.901.

In preparation for a new snapshot.

7 years agoNEWS: Add generic notes for the 2.9.99.901 snapshot.
Carl Worth [Tue, 1 Dec 2009 03:46:59 +0000 (19:46 -0800)]
NEWS: Add generic notes for the 2.9.99.901 snapshot.

We plan to collect real release notes before the 2.10.0 release.

7 years agouxa: Limit maximum size of tiled objects
Chris Wilson [Mon, 30 Nov 2009 20:50:31 +0000 (20:50 +0000)]
uxa: Limit maximum size of tiled objects

On older chipsets (i.e. pre-i965) tiling is very restrictive and imposes
severe size and alignment constraints. Combine that with relatively
small apertures and it is very easy to create a batch buffer that
cannot be mapped into the aperture (but would otherwise fit based purely
on total object size). To prevent this we need to not use tiling for large
buffers (the very same buffers where tiling would be of most benefit!).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agovideo-intel: remove i2c_vid.h from src/Makefile.am
Gaetan Nadon [Sun, 22 Nov 2009 22:13:02 +0000 (17:13 -0500)]
video-intel: remove i2c_vid.h from src/Makefile.am

make dist failed due to missing i2c_vid.h
Commit b9b159c49854d8d9d2207946bb583537bb0d48d6 Remove UMS support.
The above commit did not remove this header file from the makefile.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
7 years agouxa: Initialise lists for private pixmap structure.
Chris Wilson [Mon, 30 Nov 2009 16:52:10 +0000 (16:52 +0000)]
uxa: Initialise lists for private pixmap structure.

When updating a buffer object for the framebuffer, we may need to
allocate a fresh pixmap private structure, for example if the pixmap is
replaced due to resize. When doing so it is then imperative to
initialise the circularly linked lists correctly.

Should fix the fault:
  #0  i830_set_pixmap_bo (pixmap=0x24ab380, bo=0x24ab780) at i830_uxa.c:524
  #1  0x00007f8615c629fd in drmmode_xf86crtc_resize (scrn=0x247a320, width=1280, height=800) at drmmode_display.c:1345
  #2  0x000000000051246c in xf86RandR12ScreenSetSize (pScreen=0x24824f0, width=<value optimized out>, height=<value optimized
 out>, mmWidth=<value optimized out>, mmHeight=<value optimized out>) at xf86RandR12.c:709
  #3  0x0000000000512aa8 in xf86RandR12CreateScreenResources (pScreen=<value optimized out>) at xf86RandR12.c:839
  #4  0x0000000000514ec0 in xf86CrtcCreateScreenResources (screen=0x24824f0) at xf86Crtc.c:727
  #5  0x0000000000424fb3 in main (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>) at main.c:215
as reported by 'buscher'.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agouxa: Remove cache flush for copy
Chris Wilson [Mon, 30 Nov 2009 15:57:42 +0000 (15:57 +0000)]
uxa: Remove cache flush for copy

As the copy uses the 2D blitter, it uses the render cache so the source
should not require flushing if it has previously been used as a
destination.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoUse new drmGetDeviceNameFromFd() for mapping to drm device name
Kristian Høgsberg [Mon, 30 Nov 2009 15:27:42 +0000 (10:27 -0500)]
Use new drmGetDeviceNameFromFd() for mapping to drm device name

Should have been in libdrm to begin with.

7 years agoi915: Disable centre-point sampling.
Chris Wilson [Mon, 30 Nov 2009 13:58:30 +0000 (13:58 +0000)]
i915: Disable centre-point sampling.

I still have no idea how this is triggering failures, but it is. So
revert until the problem is solved.

Should fix once again:

  Bug 23803 [bisected i915] gnome characters disappear
  http://bugs.freedesktop.org/show_bug.cgi?id=23803

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi915: Whitespace
Chris Wilson [Mon, 30 Nov 2009 14:03:40 +0000 (14:03 +0000)]
i915: Whitespace

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agodebug: Enable dumping of batchbuffer [compile-time only]
Chris Wilson [Mon, 30 Nov 2009 13:58:06 +0000 (13:58 +0000)]
debug: Enable dumping of batchbuffer [compile-time only]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi915: Remove routing of alpha channel to green.
Chris Wilson [Mon, 30 Nov 2009 11:03:32 +0000 (11:03 +0000)]
i915: Remove routing of alpha channel to green.

This modification is redundant since the routing is done in the blend
unit anyway.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi915: Fix missing texture offset for mask.
Chris Wilson [Mon, 30 Nov 2009 10:57:04 +0000 (10:57 +0000)]
i915: Fix missing texture offset for mask.

In commit e581ceb, I modified the shader generation to accommodate mixed
textures and solids but missed applying the new computed sampler for the
mask.

References:

  Bug 23803 [bisected i915] gnome characters disappear
  http://bugs.freedesktop.org/show_bug.cgi?id=23803

  Bug 25031 rendering and color corruption since 14109abf
  http://bugs.freedesktop.org/show_bug.cgi?id=25031

  Bug 25047 [945GM bisected] rendercheck/repeat/triangles regressed
  http://bugs.freedesktop.org/show_bug.cgi?id=25047

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agodebug: Don't always flush the batch when emitting a debugging flush
Chris Wilson [Mon, 30 Nov 2009 10:13:18 +0000 (10:13 +0000)]
debug: Don't always flush the batch when emitting a debugging flush

I incorrectly changed the logic in 285f286 and caused the batch to
always be flushed when debugging, instead of merely inserting a MI_FLUSH
between operations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agooverlay: Fix build after 646b4a9483
Chris Wilson [Mon, 30 Nov 2009 09:07:57 +0000 (09:07 +0000)]
overlay: Fix build after 646b4a9483

The compile cleanup was not without fault... Apparently I don't have
XVMC enabled anymore and so missed that this variable is actually used.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agouxa-glyphs: Enable TILING_X on glyph caches.
Chris Wilson [Sun, 29 Nov 2009 21:39:41 +0000 (21:39 +0000)]
uxa-glyphs: Enable TILING_X on glyph caches.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agouxa: PutImage acceleration
Chris Wilson [Sun, 29 Nov 2009 21:16:49 +0000 (21:16 +0000)]
uxa: PutImage acceleration

Avoid waiting on dirty buffer object by streaming the upload to a fresh,
non-GPU hot buffer and blitting to the destination.

This should help to redress the regression reported in bug 18075:

  [UXA] XPutImage performance regression
  https://bugs.freedesktop.org/show_bug.cgi?id=18075

Using the particular synthetic benchmark in question on a g45:

Before:
   9542.910448 Ops/s; put composition (!); 15x15
   5623.271889 Ops/s; put composition (!); 75x75
   1685.520362 Ops/s; put composition (!); 250x250

After:
  40173.865300 Ops/s; put composition (!); 15x15
  28670.280612 Ops/s; put composition (!); 75x75
   4794.368601 Ops/s; put composition (!); 250x250

which while not stellar performance is at least an improvement. As
anticipated this has little impact on the non-fallback RENDER paths, for
instance the current cairo-xlib backend is unaffected by this change.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoOnly flush batch during prepare access if it may modify the pixmap.
Chris Wilson [Sun, 29 Nov 2009 21:12:07 +0000 (21:12 +0000)]
Only flush batch during prepare access if it may modify the pixmap.

As we track when a pixmap is active inside a batch buffer, we can avoid
unnecessary flushes of the batch when mapping a pixmap back to the CPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agobatch: Emit a 'pipelined' flush when using a dirty source.
Chris Wilson [Sun, 29 Nov 2009 21:07:45 +0000 (21:07 +0000)]
batch: Emit a 'pipelined' flush when using a dirty source.

Ensure that the render caches and texture caches are appropriately
flushed when switching a pixmap from a target to a source.

This should fix bug 24315,
  [855GM] Rendering corruption in text (usually)
  https://bugs.freedesktop.org/show_bug.cgi?id=24315

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agobatch: Track pixmap domains.
Chris Wilson [Sun, 29 Nov 2009 22:42:03 +0000 (22:42 +0000)]
batch: Track pixmap domains.

In order to detect when we require cache flushes we need to track which
domains the pixmap currently belongs to. So to do so we create a device
private structure to hold the extra information and hook it up.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agouxa-glyphs: Stream uploads via temporary bo
Chris Wilson [Sun, 29 Nov 2009 20:53:35 +0000 (20:53 +0000)]
uxa-glyphs: Stream uploads via temporary bo

Avoid mapping the glyph cache back to the cpu by allocating temporary
buffer objects to store the glyph pixmap and blit to the cache.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoCleanup a few compiler warnings.
Chris Wilson [Sun, 29 Nov 2009 10:53:36 +0000 (10:53 +0000)]
Cleanup a few compiler warnings.

Simple warnings for unused variables and C99-style declarations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoMakefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
Gaetan Nadon [Mon, 23 Nov 2009 14:25:05 +0000 (09:25 -0500)]
Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES

Now that the INSTALL file is generated.
Allows running make maintainer-clean.

8 years agoMakefile.am: Add missing .g4i to be included in the tar file.
Daniel Kahn Gillmor [Fri, 20 Nov 2009 00:52:05 +0000 (01:52 +0100)]
Makefile.am: Add missing .g4i to be included in the tar file.

Apparently Debian packages were having to manually add these files
back in. Distribute them in the first place like we meant to.

8 years agoINSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
Gaetan Nadon [Wed, 28 Oct 2009 18:41:41 +0000 (14:41 -0400)]
INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206

Automake 'foreign' option is specified in configure.ac.
Remove from Makefile.am

8 years agoINSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
Gaetan Nadon [Wed, 28 Oct 2009 18:09:09 +0000 (14:09 -0400)]
INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206

Add missing INSTALL file. Use standard GNU file on building tarball
README may have been updated
Remove AUTHORS file as it is empty and no content available yet.
Remove NEWS file as it is empty and no content available yet.

8 years agoSeveral driver modules do not have a ChangeLog target in Makefile.am #23814
Gaetan Nadon [Mon, 26 Oct 2009 16:54:21 +0000 (12:54 -0400)]
Several driver modules do not have a ChangeLog target in Makefile.am #23814

The git generated ChangeLog replaces the hand written one.
Update configure.ac to xorg-macros level 1.3.
Use XORG_DEFAULT_OPTIONS which replaces four XORG_* macros
Update Makefile.am to add ChangeLog target if missing
Remove ChangeLog from EXTRA_DIST or *CLEAN variables
This is a pre-req for the INSTALL_CMD

8 years ago.gitignore: use common defaults with custom section # 24239
Gaetan Nadon [Thu, 22 Oct 2009 17:02:04 +0000 (13:02 -0400)]
.gitignore: use common defaults with custom section # 24239

Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.

8 years ago.gitignore: use common defaults with custom section # 24239
Gaetan Nadon [Thu, 22 Oct 2009 16:34:17 +0000 (12:34 -0400)]
.gitignore: use common defaults with custom section # 24239

Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.

8 years agoi915: Derive the correct target color from the pixmap by checking its format
Chris Wilson [Fri, 13 Nov 2009 19:35:23 +0000 (19:35 +0000)]
i915: Derive the correct target color from the pixmap by checking its format

Particularly noting to route alpha to the green channel when blending
with a8 destinations.

Fixes:

  rendercheck/repeat/triangles regressed
  http://bugs.freedesktop.org/show_bug.cgi?id=25047

introduced with commit 14109a.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agouxa: Do not remove repeat from solids for 1x1 composites.
Chris Wilson [Fri, 13 Nov 2009 18:35:44 +0000 (18:35 +0000)]
uxa: Do not remove repeat from solids for 1x1 composites.

Or else we hit the buggy 1x1 source path and trigger:

  rendercheck/mcoords regressed
  http://bugs.freedesktop.org/show_bug.cgi?id=25046

caused by the recent commit e581ceb.

8 years agoi915: Fix texture sampling coordinates.
Chris Wilson [Tue, 10 Nov 2009 11:17:23 +0000 (11:17 +0000)]
i915: Fix texture sampling coordinates.

RENDER specifies that texels should sampled from the pixel centre. This
corrects a number of failures in the cairo test suite and a few
off-by-one bug reports.

  Grey border around images
  https://bugs.freedesktop.org/show_bug.cgi?id=21523

Note that the earlier attempt to fix this was subverted by the buggy use
of 1x1R textures for solid sources -- which caused the majority of text
to disappear.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoi915: Use the color channels to pass along solid sources and masks.
Chris Wilson [Tue, 10 Nov 2009 11:14:23 +0000 (11:14 +0000)]
i915: Use the color channels to pass along solid sources and masks.

Instead of allocating and utilising the texture samplers for 1x1R
solid sources and masks we can simply use the default diffuse and
specular colour channels and adjust the fragment shader appropriately.
The big advantage is the reduction in size of batches which should give
a good boost to glyph performance, irrespective of the additional boost
from using simpler shaders.

However, the motivating factor behind the switch is that our use of 1x1
textures turns out to be buggy...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoi915: Check for overflow before overflowing.
Chris Wilson [Tue, 10 Nov 2009 11:09:52 +0000 (11:09 +0000)]
i915: Check for overflow before overflowing.

As the immediate victim of the overflow would be to overwrite the maximum
permissible value, the test was optimistic.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoCheck that batch buffers are atomic.
Chris Wilson [Tue, 10 Nov 2009 11:05:20 +0000 (11:05 +0000)]
Check that batch buffers are atomic.

Since batch buffers are rarely emitted by themselves but as part of a
sequence of state and vertices, the whole sequence is emitted atomically.

Here we just enforce that batches are marked as being part of an atomic
sequence as appropriate.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agouxa: Force alpha bits to fill remaining bits
Chris Wilson [Tue, 10 Nov 2009 11:00:43 +0000 (11:00 +0000)]
uxa: Force alpha bits to fill remaining bits

In the case of x8r8g8b8 and similar where the alpha channel is ignored,
but should be interpreted as being 1, then it is convenient if those bits
are set appropriately in the colour. In order to do so for these formats,
where PIXMAN_FORMAT_A() returns 0 we need to compute the alpha channel
width as the remaining bits instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoRevert "configure: make --disable-dri work even if the server supports DRI"
Eric Anholt [Thu, 5 Nov 2009 23:40:20 +0000 (15:40 -0800)]
Revert "configure: make --disable-dri work even if the server supports DRI"

This reverts commit a851139c2141f6da370186148f2836e18b2acf83.
It broke the build, and I don't see why we should be supporting this
anyway.

Conflicts:

configure.ac
src/Makefile.am

8 years agoFix "Remove flow-control macros for fallbacks in the 2D driver."
Eric Anholt [Wed, 21 Oct 2009 20:30:38 +0000 (13:30 -0700)]
Fix "Remove flow-control macros for fallbacks in the 2D driver."

I guess this is the sort of failure due to rebase-happiness that makes
Linus yell at us for rebasing.

8 years agoKill some more #defines only needed for User-Modesetting
Daniel Vetter [Mon, 26 Oct 2009 13:15:24 +0000 (13:15 +0000)]
Kill some more #defines only needed for User-Modesetting

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agoRemove flow-control macros for fallbacks in the 2D driver.
Eric Anholt [Wed, 21 Oct 2009 20:30:38 +0000 (13:30 -0700)]
Remove flow-control macros for fallbacks in the 2D driver.

It's poor style, and has confused new developers.

8 years agoIncrease stride limit for IGDNG
Jesse Barnes [Thu, 5 Nov 2009 21:33:55 +0000 (13:33 -0800)]
Increase stride limit for IGDNG

It can go up to 32k.  Upping this lets me use my 2560x1600 and 1920x1200
monitors in an extended desktop configuration.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
8 years agoconfigure: drop some more cruft
Rémi Cardona [Wed, 28 Oct 2009 12:12:46 +0000 (13:12 +0100)]
configure: drop some more cruft

DEBUGFLAGS wasn't used anywhere and the configure switch is useless.
"CFLAGS=-g ./configure" does the same thing and actually works.

PKG_CHECK_MODULES already calls AC_SUBST, no need to do it twice.

Signed-off-by: Rémi Cardona <remi@gentoo.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoconfigure: use CWARNFLAGS from xorg-macros.m4
Rémi Cardona [Wed, 28 Oct 2009 12:01:32 +0000 (13:01 +0100)]
configure: use CWARNFLAGS from xorg-macros.m4

Signed-off-by: Rémi Cardona <remi@gentoo.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoconfigure: make --disable-dri work even if the server supports DRI
Rémi Cardona [Wed, 28 Oct 2009 11:37:38 +0000 (12:37 +0100)]
configure: make --disable-dri work even if the server supports DRI

XF86DRI is defined by the SDK so not defining it here just breaks the
build. Define HAVE_DRI instead to avoid collisions.

Note: DRI2 is still enabled/disabled entirely by SDK defines.

Signed-off-by: Rémi Cardona <remi@gentoo.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoconfigure: group system header checks at the top
Rémi Cardona [Wed, 28 Oct 2009 10:45:55 +0000 (11:45 +0100)]
configure: group system header checks at the top

Signed-off-by: Rémi Cardona <remi@gentoo.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoconfigure: check for libdrm and libpciaccess earlier
Rémi Cardona [Wed, 28 Oct 2009 10:42:41 +0000 (11:42 +0100)]
configure: check for libdrm and libpciaccess earlier

Signed-off-by: Rémi Cardona <remi@gentoo.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoFix crash in uxa_acquire_pattern when pDst is NULL
Albert Damen [Sun, 25 Oct 2009 17:02:07 +0000 (18:02 +0100)]
Fix crash in uxa_acquire_pattern when pDst is NULL

This avoids a crash when an XRenderComposite call is made with a
-1 value for width/height, (which apparently compiz's gtk-window-
decorator likes to do). Fixes bug:

X crashes in uxa_acquire_pattern when logging in (gdm)
http://bugs.freedesktop.org/show_bug.cgi?id=24724

Signed-off-by: Albert Damen <albrt@gmx.net>
Reviewed-by: Carl Worth <cworth@cworth.org>
8 years agoFix 64-bit compiler warnings in intel_xvmc_dump_render().
Thomas Arnhold [Mon, 19 Oct 2009 18:35:30 +0000 (11:35 -0700)]
Fix 64-bit compiler warnings in intel_xvmc_dump_render().

Bug #24396.

8 years agoXVMC: Use XCB DRI2 instead of cargo-culting our own copy of Xlib stuff. (v2)
Eric Anholt [Thu, 15 Oct 2009 20:48:56 +0000 (13:48 -0700)]
XVMC: Use XCB DRI2 instead of cargo-culting our own copy of Xlib stuff. (v2)

v2: Incorporate comments from Jamey on device name handling and extension
detection.

8 years agoEnable XVMC by default on gen4.
Eric Anholt [Thu, 15 Oct 2009 18:39:32 +0000 (11:39 -0700)]
Enable XVMC by default on gen4.

8 years agoi965 XvMC cleanup
Zhenyu Wang [Mon, 28 Sep 2009 10:35:57 +0000 (18:35 +0800)]
i965 XvMC cleanup

Remove bo pin for surface buffer access, and remove access
attempt for possible unmapped framebuffer. Using xv buffer
pointer to pass current xvmc surface bo handler, which is
assigned to src image bo and handle that the same way as in Xv.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
[anholt: Fixed up for conflict against the XV rework.  Not tested, because
both mplayer and xine segfault with XVMC currently.]
Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agoXv overlay: fix planar YUV copy for right rotated crtcs
Daniel Vetter [Wed, 14 Oct 2009 16:09:08 +0000 (18:09 +0200)]
Xv overlay: fix planar YUV copy for right rotated crtcs

While copying and rotating the buffer, array access was out of bounds when
rotated to the right (RR_Rotate_270).  My buffer handling changes probably
made this bug much more likely to actually result in a SIGSEGV.

I've checked the logs and the bug exists since rotation has been supported,
i.e.  this looks like a candidate for cherry-picking for all supported
releases.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agoXv overlay: further cleanups
Daniel Vetter [Wed, 14 Oct 2009 13:56:55 +0000 (15:56 +0200)]
Xv overlay: further cleanups

Kill some unnecessary stuff. Small code changes, but no functional ones.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agoXv: fixup the disabled drmmode overlay code
Daniel Vetter [Wed, 14 Oct 2009 13:56:54 +0000 (15:56 +0200)]
Xv: fixup the disabled drmmode overlay code

This code didn't survive the global renaming of vars to saner names.
Fix it up.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agoXv overlay: remove some more dead stuff from ums overlay support
Daniel Vetter [Wed, 14 Oct 2009 13:56:53 +0000 (15:56 +0200)]
Xv overlay: remove some more dead stuff from ums overlay support

Mostly unused definitions and variables, but also some strange ums
debug code. Also kill some now obsolete comments.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agodebug: Enable cache flushing after every operation
Chris Wilson [Wed, 14 Oct 2009 11:04:40 +0000 (12:04 +0100)]
debug: Enable cache flushing after every operation

If DEBUG_FLUSH_CACHES is enabled then emit a MI_FLUSH after every
rendering operation. This is intended to 'fix' cases where we are
missing a required flush in the middle of a sequence of operations, such
as switching between 2D to 3D and render to sampler.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoconf: Add debugging flush options
Chris Wilson [Wed, 14 Oct 2009 10:29:21 +0000 (11:29 +0100)]
conf: Add debugging flush options

Make the following options available via xorg.conf:
  Section "Driver"
    Option "DebugFlushBatches" "1" # Flush the batch buffer after every
                                   # single operation;

    Option "DebugFlushCaches" "1" # Include a MI_FLUSH at the end of every
                                  # batch buffer to force data to be
                                  # flushed out of cache and into memory
                                  # before the completion of the batch.

    Option "DebugWait" "1" # Wait for the completion of every batch buffer
                           # before continuing, i.e. perform synchronous
                           # rendering.
  EndSection

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoReturn failure when the enum-type output property values are not found
Zhao Yakui [Wed, 30 Sep 2009 07:31:57 +0000 (07:31 +0000)]
Return failure when the enum-type output property values are not found

Failure to do so causes xrandr to report incorrect property values.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agoDrop frontbuffer from crtc in I830CloseScreen
Albert Damen [Wed, 7 Oct 2009 19:55:42 +0000 (21:55 +0200)]
Drop frontbuffer from crtc in I830CloseScreen

By dropping the frontbuffer from the crtc, the new frontbuffer
can be properly added to the crtc when the xserver is reset.

Signed-off-by: Albert Damen <albrt@gmx.net>
8 years agodrmmode: with 1.7 server, set mode major doesn't get gamma setup.
Dave Airlie [Fri, 9 Oct 2009 04:16:06 +0000 (14:16 +1000)]
drmmode: with 1.7 server, set mode major doesn't get gamma setup.

Noticed this on Fedora, where 1.7 server does gamma via the randr
codepaths however kms doesn't have this call which happens in the
non set_mode_major path.

probably should be backported to released drivers.

Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agoDRI2 compat build fix: it's drawable->pScreen not drawable->screen
Jesse Barnes [Mon, 12 Oct 2009 21:02:12 +0000 (14:02 -0700)]
DRI2 compat build fix: it's drawable->pScreen not drawable->screen

Fallout from the conversion; DRI2 compat path was broken.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
8 years agouxa: Refactor create Picture for pixman format
Chris Wilson [Mon, 12 Oct 2009 13:31:06 +0000 (14:31 +0100)]
uxa: Refactor create Picture for pixman format

Pull the common methods for creating a Picture given a pixman format
into its own method, and tidy the surrounding code. The benefit is that
we can now composite directly to the Picture and so save an intermediate
copy when creating patterns for gradients.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agouxa: Free the ScratchPixmapHeader after its associated Picture
Chris Wilson [Mon, 12 Oct 2009 13:33:08 +0000 (14:33 +0100)]
uxa: Free the ScratchPixmapHeader after its associated Picture

Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=24459
Intel Driver > 2.8: Cairo rendering bug, triggered in QtCurve GTK engine

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoReplace dolt and shave with relying on current autotools.
Eric Anholt [Fri, 9 Oct 2009 00:34:13 +0000 (17:34 -0700)]
Replace dolt and shave with relying on current autotools.

8 years agoClean up more i830_memory.c madness.
Eric Anholt [Wed, 7 Oct 2009 23:12:25 +0000 (16:12 -0700)]
Clean up more i830_memory.c madness.

It was cooking up insane alignment values for buffers that new libdrm was
justifiably complaining about, but it turns out we don't need the alignment
values anywhere because the only case they're needed, they're computed
entirely by the kernel.  Also, the XVMC code was passing a completely unused
flag in.

8 years agoRename pScreen to screen.
Eric Anholt [Wed, 7 Oct 2009 02:05:24 +0000 (19:05 -0700)]
Rename pScreen to screen.

8 years agoRename pGC to gc.
Eric Anholt [Wed, 7 Oct 2009 02:00:41 +0000 (19:00 -0700)]
Rename pGC to gc.

8 years agoRename pDraw to plain old drawable.
Eric Anholt [Wed, 7 Oct 2009 01:57:22 +0000 (18:57 -0700)]
Rename pDraw to plain old drawable.

8 years agoRename the xv pPriv to adaptor_priv to reflect whose private it is.
Eric Anholt [Wed, 7 Oct 2009 01:50:54 +0000 (18:50 -0700)]
Rename the xv pPriv to adaptor_priv to reflect whose private it is.

8 years agoCall pPixmaps plain old pixmaps.
Eric Anholt [Wed, 7 Oct 2009 01:38:53 +0000 (18:38 -0700)]
Call pPixmaps plain old pixmaps.