Re: [PATCH] drm: Fix lock order reversal between mmap_sem and struct_mutex.

2009-02-25 Thread Eric Anholt
On Fri, 2009-02-20 at 08:36 +0100, Peter Zijlstra wrote: On Thu, 2009-02-19 at 18:04 -0800, Eric Anholt wrote: On Thu, 2009-02-19 at 23:26 +0100, Peter Zijlstra wrote: On Thu, 2009-02-19 at 22:02 +0100, Thomas Hellstrom wrote: It looks to me like the driver preferred locking order

Re: [PATCH] drm: Fix lock order reversal between mmap_sem and struct_mutex.

2009-02-25 Thread Thomas Hellström
Eric Anholt wrote: On Fri, 2009-02-20 at 08:36 +0100, Peter Zijlstra wrote: On Thu, 2009-02-19 at 18:04 -0800, Eric Anholt wrote: On Thu, 2009-02-19 at 23:26 +0100, Peter Zijlstra wrote: On Thu, 2009-02-19 at 22:02 +0100, Thomas Hellstrom wrote: It looks to me

Re: [PATCH] drm: Fix lock order reversal between mmap_sem and struct_mutex.

2009-02-25 Thread Peter Zijlstra
On Wed, 2009-02-25 at 00:15 -0800, Eric Anholt wrote: Or you could get_user_pages() to fault the user pages and pin them, and then do pagefault_disable() and use copy_from_user_inatomic or such, and release the pages again. I started poking at this today, since the get_user_pages sounded

Re: [Intel-gfx] [PATCH] i915: add page flipping ioctl

2009-02-25 Thread Jesse Barnes
On Thursday, February 19, 2009 9:46:06 pm Zou, Nanhai wrote: +if ((pipe = flip_data-pipe) 1) { +DRM_ERROR(bad pipe\n); +return -EINVAL; +} pipe should be unsigned int, if it is int, this check should be if (pipe 1 || pipe 0) Yeah, fixed (the ioctl

Re: [Intel-gfx] [PATCH] i915: add page flipping ioctl

2009-02-25 Thread Jesse Barnes
On Friday, February 20, 2009 2:06:33 am Chris Wilson wrote: On Fri, 2009-02-20 at 13:46 +0800, Zou, Nanhai wrote: +struct drm_i915_gem_page_flip { + /** Handle of new front buffer */ Should this be handle of new front buffer or handle of the execbuf? I can't see how this can be an

Page flipping update

2009-02-25 Thread Jesse Barnes
Here's the kernel, libdrm, mesa and xserver patches Im working with atm. These ones are untested (need to update the xf86-video-intel bits first, which is why they're not included here), but I wanted people to take a look and make sure things are looking ok. -- Jesse Barnes, Intel Open

[PATCH] i915: page flipping support

2009-02-25 Thread Jesse Barnes
This one still doesn't include a KMS version, but the rest of it should be nearly ready. I've taken Chris Nanhai's feedback from the last round and incorporated it, so we'll no longer block with the struct_mutex held at execbuffer time if a flip is pending, and the ring command submission has

[PATCH] libdrm: support page flipping on i915

2009-02-25 Thread Jesse Barnes
diff --git a/shared-core/i915_drm.h b/shared-core/i915_drm.h index 5456e91..a36bcf6 100644 --- a/shared-core/i915_drm.h +++ b/shared-core/i915_drm.h @@ -205,6 +205,7 @@ typedef struct drm_i915_sarea { #define DRM_I915_GEM_GET_TILING0x22 #define DRM_I915_GEM_GET_APERTURE 0x23 #define

[PATCH] mesa/intel: support for DRI2 swapbuffers

2009-02-25 Thread Jesse Barnes
The DRI2 protocol and support bits for Mesa are pretty straightfoward. But I still need to port this forward to the new flush hook code, since at swapbuffers we need to make sure everything is flushed. diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index

[PATCH] xserver: support DRI2 swapbuffers

2009-02-25 Thread Jesse Barnes
Just realized I still need to check whether the driver supports swapbuffers, if not we should fall back to copyarea. Other than that it's pretty simple. diff --git a/glx/glxdri2.c b/glx/glxdri2.c index 4e76c71..42a596e 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -131,10 +131,27 @@

[PATCH] dri2proto: support buffer swaps

2009-02-25 Thread Jesse Barnes
Protocol documentation and support for the new buffer swap request. diff --git a/dri2proto.h b/dri2proto.h index dc3f2d1..6f5ddf0 100644 --- a/dri2proto.h +++ b/dri2proto.h @@ -35,7 +35,7 @@ #define DRI2_NAME DRI2 #define DRI2_MAJOR 1 -#define

[Bug 12705] X200: Brightness broken since 2.6.29-rc4-58-g4c098bc

2009-02-25 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12705 --- Comment #5 from r...@sisk.pl 2009-02-25 15:08 --- On Tuesday 24 February 2009, Nico Schottelius wrote: Still existing. Rafael J. Wysocki [Mon, Feb 23, 2009 at 10:48:13PM +0100]: This message has been generated automatically

[Bug 12613] [Suspend regression][DRM, RADEON]

2009-02-25 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12613 r...@sisk.pl changed: What|Removed |Added Status|NEW |CLOSED Resolution|

[Bug 12419] possible circular locking dependency on i915 dma

2009-02-25 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12419 --- Comment #7 from r...@sisk.pl 2009-02-25 14:54 --- On Tuesday 24 February 2009, Wang Chen wrote: Rafael J. Wysocki said the following on 2009-2-24 5:48: This message has been generated automatically as a part of a report of

[PATCH] drm/ati_pcigart: use memset_io to reset the memory

2009-02-25 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com Also don't setup pci_gart if we aren't going to need it. Signed-off-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/ati_pcigart.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ati_pcigart.c

[PATCH] drm: add DRM_READ/WRITE64 wrappers around readq/writeq.

2009-02-25 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com The readq/writeq stuff is from Dave Miller, and he warns users to be careful about using these. Plans are only r600 to use it so far. Signed-off-by: Dave Airlie airl...@redhat.com --- include/drm/drm_os_linux.h | 19 +++ 1 files changed, 19

[PATCH] drm/r600: fixup r600 gart table accessor like ati_pcigart.c

2009-02-25 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This attempts to fixup the r600 GART accessors so they work on other arches. Signed-off-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/radeon/r600_cp.c | 23 +-- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git

[PATCH] drm/r600: fix rptr address along lines of previous fixes to radeon.

2009-02-25 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com Signed-off-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/radeon/r600_cp.c | 14 -- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index

Re: [Intel-gfx] [PATCH] i915: add page flipping ioctl

2009-02-25 Thread Keith Packard
On Wed, 2009-02-25 at 11:42 -0800, Jesse Barnes wrote: Ok, I'll pull that bit out... but doing that introduces a small race. If we lose the race (the flip happens immediately and we get interrupted before adding the object to the vblank queue) the object will be stalled for one extra