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

2009-02-04 Thread Chris Wilson
On Tue, 2009-02-03 at 22:33 -0800, Eric Anholt wrote: The basic problem was mmap_sem (do_mmap()) - struct_mutex (drm_gem_mmap()) struct_mutex (i915_gem_execbuffer()) - mmap_sem (copy_from/to_user()) We have plenty of places where we want to hold device state the same (struct_mutex) while we

Re: Gem GTT mmaps..

2009-02-06 Thread Chris Wilson
I tried it, it's not too happy. My only concern is that this now relies on userspace to correctly call SW_FINISH (and not unmap after mmapping the GTT_MMAP) or otherwise the object is leaked? Patch comments inline. On Fri, 2009-02-06 at 14:24 -0800, Jesse Barnes wrote: This one should cover the

Re: [PATCH] [drm] Release user fbs in drm_release

2009-02-13 Thread Chris Wilson
On Thu, 2009-02-12 at 14:37 -0500, Kristian Høgsberg wrote: Avoids leaking fbs and associated buffers on release. Signed-off-by: Kristian Høgsberg k...@redhat.com Tested-by: Chris Wilson ch...@chris-wilson.co.uk

Re: [PATCH] i915: add page flipping ioctl

2009-02-15 Thread Chris Wilson
On Thu, 2009-02-12 at 16:52 -0800, Jesse Barnes wrote: This adds a new ioctl for queueing a page flip with GEM objects. There's a completion per private object, that we use at execbuf time to wait for any pending flips; it's cleared at vblank interrupt time when the flip occurs. The kernel

Re: [PATCH] i915: add page flipping ioctl

2009-02-19 Thread Chris Wilson
On Mon, 2009-02-16 at 10:55 -0800, Jesse Barnes wrote: On Sunday, February 15, 2009 4:02 pm Chris Wilson wrote: On my i915, the flip never occurs and we wait forever on the the vblank. So I presume the command we sent the chip is invalid, or we miss the irq? (I double-checked with lockdep

Re: [PATCH] i915: add page flipping ioctl

2009-02-19 Thread Chris Wilson
With a few additional suggestions by Jesse, I've managed to get tear-free compositing working on i915. Here's the diff on top of the original patch (though obviously this is just a suggestion, still need to prevent multiple pending flips to the same plane and ensure that the old buffer is

Re: [PATCH] i915: add page flipping ioctl

2009-02-20 Thread Chris Wilson
On Thu, 2009-02-19 at 16:43 -0800, Jesse Barnes wrote: On Thursday 19 February 2009 11:37:01 Chris Wilson wrote: With a few additional suggestions by Jesse, I've managed to get tear-free compositing working on i915. Here's the diff on top of the original patch (though obviously this is just

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

2009-02-20 Thread Chris Wilson
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 execbuf here. Do you mind elaborating? Anyway this reminded

Acid-like effect in dark regions on key press

2009-02-20 Thread Chris Wilson
Hello all, I'm seeing a bizarre problem whilst running wayland/cairo-drm/i915 under KMS. Occasionally after pressing a key (which is handled by wayland through the input layer) the dark regions (I'm estimating where the value is less than ~4) become garbage. I've managed to capture a screenshot

[PATCH] drm/i915: Fix regression in 95ca9d

2009-02-20 Thread Chris Wilson
The object is dereferenced before the NULL check. Oops. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=20235 Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_gem.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

Re: [Intel-gfx] [PATCH] i915: support page flipping

2009-02-26 Thread Chris Wilson
On Thu, 2009-02-26 at 13:28 -0800, Jesse Barnes wrote: Add a new page flip ioctl to the i915 driver. The new ioctl takes the new drm_i915_gem_page_flip arg, which contains a buffer object target for the flip, an offset into that buffer, and other buffer parameters to be used for the flip.

Re: [Intel-gfx] [PATCH] i915: support page flipping

2009-03-03 Thread Chris Wilson
On Thu, 2009-02-26 at 14:35 -0800, Jesse Barnes wrote: + ret = i915_gem_object_pin(obj, 0); + if (ret) { + DRM_ERROR(failed to pin object for flip\n); + ret = -EBUSY; What's the rationale for changing the reported error here? (And it

[PATCH] drm/i915: Check for dev-primary-master before dereference.

2009-03-06 Thread Chris Wilson
I've hit the occasional oops inside i915_wait_ring() with an indication of a NULL derefence of dev-primary-master. Adding a NULL check is consistent with the other potential users of dev-primary-master. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_dma.c

Re: [Intel-gfx] [PATCH] i915: support page flipping

2009-03-13 Thread Chris Wilson
On Thu, 2009-02-26 at 14:35 -0800, Jesse Barnes wrote: On Thursday, February 26, 2009 1:56:52 pm Chris Wilson wrote: On Thu, 2009-02-26 at 13:28 -0800, Jesse Barnes wrote: Add a new page flip ioctl to the i915 driver. The new ioctl takes the new drm_i915_gem_page_flip arg, which contains

Re: A17 tiling series V2

2009-04-08 Thread Chris Wilson
2001 From: Chris Wilson ch...@chris-wilson.co.uk Date: Wed, 11 Feb 2009 10:45:16 + Subject: [PATCH] drm/i915: Clear fence register on tiling stride change. The fence register value also depends upon the stride of the object, so we need to clear the fence if that is changed as well. Signed-off

[PATCH] drm: Memory fragmentation from lost alignment blocks

2009-05-22 Thread Chris Wilson
If the block needs an alignment but otherwise fits exactly into the tail, then the split-off block from the start would remain marked as non-free. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- drivers/gpu/drm/drm_mm.c | 20 +--- 1 files changed, 9 insertions(+), 11

Re: [git pull] drm v2.6.31 merge (part 1)

2009-06-12 Thread Chris Wilson
Dave, this is an old patch that seems to have slip through the net, without it my i915 runs out of GTT space within seconds during firefox replays. From e2cf2574d43f12934a20d2672d47fec082db7c5a Mon Sep 17 00:00:00 2001 From: Chris Wilson ch...@chris-wilson.co.uk Date: Fri, 22 May 2009 13:52:03

Re: [git pull] drm: previous pull req + 1.

2009-06-21 Thread Chris Wilson
On Sun, 2009-06-21 at 17:47 +0300, Maxim Levitsky wrote: 52dc7d32b88156248167864f77a9026abe27b432 is first bad commit commit 52dc7d32b88156248167864f77a9026abe27b432 Author: Chris Wilson ch...@chris-wilson.co.uk Date: Sat Jun 6 09:46:01 2009 +0100 The error here seems to be my

Re: [git pull] drm: previous pull req + 1.

2009-06-30 Thread Chris Wilson
Revised patch, unmap_mapping_range() on unbind and clear register. From 8f13b6389ee0c8a39a2073279928a3a228bd27dc Mon Sep 17 00:00:00 2001 From: Chris Wilson ch...@chris-wilson.co.uk Date: Mon, 29 Jun 2009 08:45:31 +0100 Subject: [PATCH] drm/i915: Remove mappings on clearing fence register

Re: [Intel-gfx] [PATCH] Add modesetting pageflip ioctl and corresponding drm event

2009-06-30 Thread Chris Wilson
patch prevents the glitch for me: From aa017e6056cf2faf6be7eeaa71d2fded4a9f6295 Mon Sep 17 00:00:00 2001 From: Chris Wilson ch...@chris-wilson.co.uk Date: Tue, 30 Jun 2009 18:21:54 +0100 Subject: [PATCH 1/3] drm: delay unpinning the current fb til after the flip is complete --- drivers/gpu/drm

[PATCH] drm: Silence the warning for headless machines

2009-10-14 Thread Chris Wilson
+0xd2/0x22f [ 379.173202] [81010b42] system_call_fastpath+0x16/0x1b An unhelpful warning, especially if we anticipate hotplug events as connectors are brought online. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk Cc: Dave Airlie airl...@redhat.com --- drivers/gpu/drm

[PATCH] drm/i915: Avoid potential sleep whilst holding spinlock

2009-10-20 Thread Chris Wilson
] sys_read+0x3b/0x5d [c1002a8f] sysenter_do_call+0x12/0x36 The fix is relatively simple, use the atomic variants of kmap() that avoid the potential sleep. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk Cc: Miles Lane miles.l...@gmail.com --- drivers/gpu/drm/i915/i915_debugfs.c |4

[PATCH 2/2] intel: APPLE_object_purgeable

2009-11-11 Thread Chris Wilson
Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- src/mesa/drivers/dri/intel/intel_buffer_objects.c | 43 + src/mesa/drivers/dri/intel/intel_context.c|1 + 2 files changed, 44 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/intel

Re: [PATCH 2/2] intel: APPLE_object_purgeable

2009-11-12 Thread Chris Wilson
Excerpts from Ian Romanick's message of Wed Nov 11 20:18:58 + 2009: Chris Wilson wrote: +#if FEATURE_APPLE_object_purgeable +static GLenum +intel_bufferobj_purgeable(GLcontext * ctx, + struct gl_buffer_object *obj, + GLenum option) +{ + struct

Re: [PATCH 1/2] APPLE_object_purgeable

2009-11-12 Thread Chris Wilson
, regeneration, real code) is probably even better. Yes, this makes a lot of sense when trying to review these paths. Substantive comments are below. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- src/mesa/glapi/APPLE_object_purgeable.xml | 35 + src/mesa/glapi/Makefile

[PATCH 4/4] APPLE_object_purgeable: intel

2009-11-12 Thread Chris Wilson
Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- src/mesa/drivers/dri/intel/intel_buffer_objects.c | 43 + src/mesa/drivers/dri/intel/intel_extensions.c |2 + 2 files changed, 45 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/intel

[PATCH 3/4] APPLE_object_purgeable: core

2009-11-12 Thread Chris Wilson
Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- src/mesa/main/api_exec.c |6 ++ src/mesa/main/bufferobj.c | 161 src/mesa/main/bufferobj.h | 11 +++ src/mesa/main/dd.h | 10 +++ src/mesa/main/extensions.c |4 + src

APPLE_object_purgeable [v2]

2009-11-12 Thread Chris Wilson
Thank you Ian and Brian for your review, hopefully I've interpreted your comments correctly and updated the patches appropriately. -ickle -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day

[PATCH 1/4] APPLE_object_purgeable: xml

2009-11-12 Thread Chris Wilson
Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- src/mesa/glapi/APPLE_object_purgeable.xml | 37 + src/mesa/glapi/Makefile |1 + src/mesa/glapi/gl_API.xml |1 + 3 files changed, 39 insertions(+), 0 deletions

[PATCH 3/4] APPLE_object_purgeable: core

2009-11-18 Thread Chris Wilson
Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- src/mesa/main/api_exec.c |6 + src/mesa/main/bufferobj.c | 350 src/mesa/main/bufferobj.h | 11 ++ src/mesa/main/dd.h | 15 ++ src/mesa/main/dlist.c |6 + src/mesa

APPLE_object_purgeable [v3]

2009-11-18 Thread Chris Wilson
Large correction after Ian pointed out the fundamental flaw that the various objects are separate structures and so require independent interfaces. Please review. -ickle -- Let Crystal Reports handle the reporting -

[PATCH 1/4] APPLE_object_purgeable: xml

2009-11-18 Thread Chris Wilson
Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- src/mesa/glapi/APPLE_object_purgeable.xml | 37 + src/mesa/glapi/Makefile |1 + src/mesa/glapi/gl_API.xml |1 + 3 files changed, 39 insertions(+), 0 deletions

[PATCH 4/4] APPLE_object_purgeable: intel

2009-11-18 Thread Chris Wilson
Implement support for purgeable objects by using the GEM madvise ioctl. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk --- src/mesa/drivers/dri/intel/intel_buffer_objects.c | 134 - src/mesa/drivers/dri/intel/intel_extensions.c |2 + 2 files changed, 135

Re: [Intel-gfx] [PATCH] drm/i915: let pin routine figure out appropriate alignment

2009-11-18 Thread Chris Wilson
why pin() took an alignment parameter was so that we could specify a minimum alignment of 64k for untiled scan out buffers. Are we confident that this is not the case? -ickle -- Chris Wilson, Intel Open Source Technology Centre

Re: 945GM crash

2009-12-02 Thread Chris Wilson
function pointer when calling glGenBuffers. However if the application truly wishes to be cross-device, it can check for ARB_vertex_buffer_object and use the glGenBuffersARB [and friends] extension points instead. Hope this helps, -ickle -- Chris Wilson, Intel Open Source Technology Centre

Re: 2.6.33-rc4-git1 -- [drm:i915_gem_execbuffer] *ERROR* i915_gem_do_execbuffer returns -512

2010-01-15 Thread Chris Wilson
] [drm:i915_gem_execbuffer] *ERROR* i915_gem_do_execbuffer returns -512 Apologies, this is not an error. It is an interrupted system call with an overzealous DRM_ERROR() -- we will hopefully remove this printk promptly. -ickle -- Chris Wilson, Intel Open Source Technology Centre

Re: [2.6.33-rc6-git regression] idr fix breaks Xorg

2010-02-04 Thread Chris Wilson
lazy error handling in the userspace driver; the impossible just happened. -ickle -- Chris Wilson, Intel Open Source Technology Centre -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online

Re: [patch 3/3] drm/i915: blacklist lid status: Sony VGN-BX196VP, Dell Inspiron 700m

2010-03-11 Thread Chris Wilson
jbar...@virtuousgeek.org Cc: sta...@kernel.org Signed-off-by: Eric Anholt e...@anholt.net The Sony has a GMA 900, so does indeed need the quirk. -ickle -- Chris Wilson, Intel Open Source Technology Centre

[PATCH] drm: Return ENODEV if the inode mapping changes

2010-03-18 Thread Chris Wilson
: [c11c70e3] drm_open+0x4b1/0x4e2 SS:ESP 0068:f647adfc [ 644.292175] ---[ end trace 2ddd476af89a60fa ]--- Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk Cc: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/drm_fops.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions

Re: [PATCH 11/18] i915: Provide config option for enabling tracepoints

2010-03-23 Thread Chris Wilson
what may be a useful aid in desktop systems. Also is TRACER the right name, that would seem to confuse the option with a standalone tracer as opposed to simply enabling tracepoints. -ickle -- Chris Wilson, Intel Open Source Technology Centre

Re: [2.6.35-rc regression] i915: cursor corruption on Arrandale caused by 9b8c4a0b215e

2010-06-06 Thread Chris Wilson
with the new cursor image on a row-by-row basis. Some kind of cache flush issue? Exactly; a missing move-to-GTT-domain causing the cursor data to remain in the CPU cache. https://bugs.freedesktop.org/show_bug.cgi?id=28335 -- Chris Wilson, Intel Open Source Technology Centre

Re: [Intel-gfx] [PATCH] Destroy screen pixmap on screen close.

2010-07-02 Thread Chris Wilson
it not be fbCloseScreen that calls miCloseScreen, since fb has taken over the management of the mi interface? -- Chris Wilson, Intel Open Source Technology Centre -- This SF.net email is sponsored by Sprint What will you

Re: [Intel-gfx] [PATCH] Destroy screen pixmap on screen close.

2010-07-02 Thread Chris Wilson
On Fri, 02 Jul 2010 11:54:44 -0400, Keith Packard kei...@keithp.com wrote: On Fri, 02 Jul 2010 09:24:07 +0100, Chris Wilson ch...@chris-wilson.co.uk wrote: This looks like the responsibility of miCloseScreen(). Are we failing to chain up properly? I don't think miCloseScreen

Re: [Regression] [PATCH] intel_crt_detect_ddc() seems to be broken for DVI-I

2011-01-06 Thread Chris Wilson
. -Chris -- Chris Wilson, Intel Open Source Technology Centre -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment

[ANNOUNCE] libdrm 2.4.24

2011-03-02 Thread Chris Wilson
modetest: Do no flip twice to a current front buffer Chris Wilson (7): intel: Export CONSTANT_BUFFER addressing mode intel: Fallback to old exec if no mrb_exec is available intel: compile fix for previous commit after rebasing intel: Set the public handle after opening

Re: drm: Branch 'master' - 2 commits

2011-12-06 Thread Chris Wilson
On Mon, 05 Dec 2011 14:23:55 -0800, Eric Anholt e...@anholt.net wrote: On Mon, 5 Dec 2011 02:31:58 -0800 (PST), ic...@kemper.freedesktop.org (Chris Wilson) wrote: configure.ac |2 +- intel/intel_bufmgr_gem.c | 27 +-- 2 files changed, 22