[Intel-gfx] hotplug CRT detection

2010-08-04 Thread Dave Airlie
So I've been reviewing the i915/ironlake CRT detect code and am a bit confused. I though on the i945 and above that we had proper CRT hotplug detection with an IRQ, that didn't require any polling. Now looking at the code when we do a CRT detect, the first thing we do is try the hotplug method, h

Re: [Intel-gfx] [PATCH] drm/i915: Enable aspect/centering panel fitting for Ironlake.

2010-08-04 Thread Zhenyu Wang
On 2010.08.04 15:04:01 +0100, Chris Wilson wrote: > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/i915_drv.h |2 + > drivers/gpu/drm/i915/intel_display.c | 16 +++ > drivers/gpu/drm/i915/intel_lvds.c| 70 > -- > 3 files changed, 75

Re: [Intel-gfx] [PATCH 4/5] drm/i915: Implement fair lru eviction across both rings.

2010-08-04 Thread Chris Wilson
On Wed, 4 Aug 2010 22:16:58 +0200, Daniel Vetter wrote: > This way active buffers are scanned in retiring order, whereas your code > scans them in issuing order. IMHO the former is the fairer approach for > eviction when both rings are busy. I also think the code would look > slightly less scary ;

Re: [Intel-gfx] [PATCH 2/2] drm/i915: i8xx also doesn't like multiple oustanding pageflips

2010-08-04 Thread Pedro Ribeiro
On 4 August 2010 20:49, Jesse Barnes wrote: > On Wed,  4 Aug 2010 21:22:10 +0200 > Daniel Vetter wrote: > >> My i855GM suffers from a 80k/s interrupt storm without this. >> So add 2nd gen to the list of things that don't like more than >> one outstanding pageflip request. >> >> Furthermore I've c

Re: [Intel-gfx] [PATCH 2/2] drm/i915: i8xx also does not like multiple oustanding pageflips

2010-08-04 Thread Daniel Vetter
On Wed, Aug 04, 2010 at 09:06:46PM +0100, Chris Wilson wrote: > If you move the if(intel_crtc->plane) inside the gen2/3 block, then I'll > test it on my netbooks. :) I believe the compiler will happily do that for you ;) > Starting to look like intel_overlay.c ;-) Well, that's actually one of the

Re: [Intel-gfx] [PATCH 4/5] drm/i915: Implement fair lru eviction across both rings.

2010-08-04 Thread Daniel Vetter
On Wed, Aug 04, 2010 at 12:20:36PM +0100, Chris Wilson wrote: > Based in a large part upon Daniel Vetter's implementation and adapted > for handling multiple rings in a single pass. I've thought some more about this and I'm not sold on the idea that your One Scan to Rule Them All is any fairer tha

Re: [Intel-gfx] [PATCH 2/2] drm/i915: i8xx also does not like multiple oustanding pageflips

2010-08-04 Thread Chris Wilson
On Wed, 4 Aug 2010 21:22:10 +0200, Daniel Vetter wrote: > My i855GM suffers from a 80k/s interrupt storm without this. > So add 2nd gen to the list of things that don't like more than > one outstanding pageflip request. > > Furthermore I've changed the busy loop into a ringbuffer wait. > Busy-l

Re: [Intel-gfx] [PATCH 2/2] drm/i915: i8xx also doesn't like multiple oustanding pageflips

2010-08-04 Thread Jesse Barnes
On Wed, 4 Aug 2010 21:22:10 +0200 Daniel Vetter wrote: > My i855GM suffers from a 80k/s interrupt storm without this. > So add 2nd gen to the list of things that don't like more than > one outstanding pageflip request. > > Furthermore I've changed the busy loop into a ringbuffer wait. > Busy-lo

Re: [Intel-gfx] [PATCH 1/2] drm/i915: fixup pageflip ringbuffer commands for i8xx

2010-08-04 Thread Jesse Barnes
On Wed, 4 Aug 2010 21:22:09 +0200 Daniel Vetter wrote: > Add a new path for 2nd gen chips that uses the commands for i81x > chips (where public docs do exist) augmented with the plane bits > from i915. It seems to work and doesn't result in a black screen > like before. > > Signed-off-by: Danie

Re: [Intel-gfx] [PATCH] drm/i915: Capture the overlay status upon a GPU hang.

2010-08-04 Thread Daniel Vetter
On Wed, Aug 04, 2010 at 08:26:07PM +0100, Chris Wilson wrote: > v2: Add the interrupt status and address. > > Signed-off-by: Chris Wilson > Cc: Daniel Vetter Reviewed-by: Daniel Vetter -- Daniel Vetter Mail: dan...@ffwll.ch Mobile: +41 (0)79 365 57 48 __

[Intel-gfx] [PATCH] drm/i915: Capture the overlay status upon a GPU hang.

2010-08-04 Thread Chris Wilson
v2: Add the interrupt status and address. Signed-off-by: Chris Wilson Cc: Daniel Vetter --- drivers/gpu/drm/i915/i915_debugfs.c |3 + drivers/gpu/drm/i915/i915_drv.h | 10 +++- drivers/gpu/drm/i915/i915_irq.c |3 + drivers/gpu/drm/i915/intel_overlay.c | 96 +++

[Intel-gfx] [PATCH 2/2] drm/i915: i8xx also doesn't like multiple oustanding pageflips

2010-08-04 Thread Daniel Vetter
My i855GM suffers from a 80k/s interrupt storm without this. So add 2nd gen to the list of things that don't like more than one outstanding pageflip request. Furthermore I've changed the busy loop into a ringbuffer wait. Busy-loops that don't check whether the chip died are simply evil. And perfor

[Intel-gfx] [PATCH 1/2] drm/i915: fixup pageflip ringbuffer commands for i8xx

2010-08-04 Thread Daniel Vetter
Add a new path for 2nd gen chips that uses the commands for i81x chips (where public docs do exist) augmented with the plane bits from i915. It seems to work and doesn't result in a black screen like before. Signed-off-by: Daniel Vetter Cc: sta...@kernel.org --- drivers/gpu/drm/i915/intel_displa

[Intel-gfx] [PATCH 0/2] fixup pageflip for i8xx class hw

2010-08-04 Thread Daniel Vetter
Hi all, Kde4 started using pageflips and I started noticing that it's decently broken on my i855. These two patches fix things up, here. Please review and merge for -next. Thanks, Daniel PS: Any news on a documentation drop for gen2/gen3? Switching on my X-ray vision and deducing the correct ma

Re: [Intel-gfx] [PATCH] drm/i915: report all active objects as busy

2010-08-04 Thread Daniel Vetter
On Wed, Aug 04, 2010 at 08:57:26PM +0200, Daniel Vetter wrote: > On Wed, Aug 04, 2010 at 03:36:30PM +0100, Chris Wilson wrote: > > Incorporates a similar patch by Daniel Vetter, the alteration being to > > report the current busy state after retiring. > Woot, nice idea to exactly preserve the seman

Re: [Intel-gfx] [PATCH] drm/i915: report all active objects as busy

2010-08-04 Thread Daniel Vetter
On Wed, Aug 04, 2010 at 03:36:30PM +0100, Chris Wilson wrote: > Incorporates a similar patch by Daniel Vetter, the alteration being to > report the current busy state after retiring. Woot, nice idea to exactly preserve the semantics of the old implementation. /me bangs the head against the wall fo

Re: [Intel-gfx] Small ringbuffer cleanup

2010-08-04 Thread Daniel Vetter
On Wed, Aug 04, 2010 at 03:18:11PM +0100, Chris Wilson wrote: > The goal here is to simplify the ringbuffer emission so that we can avoid > the function call overhead when writing into the ringbuffer. Yeah! I've started shooting at intel_ringbuffer.[ch], too (with different ideas). But I think I'l

[Intel-gfx] [PATCH] drm/i915: Truncate the inode as well as the backing pages on purge

2010-08-04 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 4cf2789..f599d77 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915

[Intel-gfx] [PATCH] drm/i915: Capture the overlay status upon a GPU hang.

2010-08-04 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c |3 + drivers/gpu/drm/i915/i915_drv.h | 10 +++- drivers/gpu/drm/i915/i915_irq.c |3 + drivers/gpu/drm/i915/intel_overlay.c | 85 ++ 4 files changed, 99 insertions(+), 2 dele

[Intel-gfx] [PATCH] drm/i915: report all active objects as busy

2010-08-04 Thread Chris Wilson
Incorporates a similar patch by Daniel Vetter, the alteration being to report the current busy state after retiring. Signed-off-by: Chris Wilson Cc : Daniel Vetter --- drivers/gpu/drm/i915/i915_gem.c | 40 +- 1 files changed, 26 insertions(+), 14 deletions(

[Intel-gfx] [PATCH] drm/i915: Mark the static memory latency tables const.

2010-08-04 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_display.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f9d88c2..5fd9516 100644 --- a/drivers/gpu/drm/i915/intel_di

[Intel-gfx] [PATCH] drm/i915: Write to display base last.

2010-08-04 Thread Chris Wilson
Writing to the DSPBASE register triggers the double-buffered update to all the control registers, so always write it last in the update sequence. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_display.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dri

[Intel-gfx] [PATCH 2/4] drm/i915: Move ringbuffer accounting to begin/advance.

2010-08-04 Thread Chris Wilson
As we check that the ringbuffer will not wrap upon emission, we do not need to check that incrementing the tail wrapped every time. However, we do upon advancing just in case the tail is now pointing at the very end of the ring. Likewise we can account for the space used during emission in begin()

[Intel-gfx] [PATCH 1/4] drm/i915: Unroll wrapping of the ringbuffer.

2010-08-04 Thread Chris Wilson
The tail is quadword aligned, so we can add two MI_NOOP as a time. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_ringbuffer.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffe

[Intel-gfx] [PATCH 4/4] drm/i915: Use an uncommon name for the local dev_priv in macros

2010-08-04 Thread Chris Wilson
Using dev_priv__ avoids sparse complaining about shadowed variables in the *LP_RING() macros. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i9

[Intel-gfx] [PATCH 3/4] drm/i915: Inline ringbuffer_emit()

2010-08-04 Thread Chris Wilson
As the function has been reduced to a store plus increment, the body is now smaller than the call so inline it. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_ringbuffer.c |8 drivers/gpu/drm/i915/intel_ringbuffer.h | 12 ++-- 2 files changed, 10 insertions(+),

[Intel-gfx] Small ringbuffer cleanup

2010-08-04 Thread Chris Wilson
The goal here is to simplify the ringbuffer emission so that we can avoid the function call overhead when writing into the ringbuffer. ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH] drm/i915: Enable aspect/centering panel fitting for Ironlake.

2010-08-04 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h |2 + drivers/gpu/drm/i915/intel_display.c | 16 +++ drivers/gpu/drm/i915/intel_lvds.c| 70 -- 3 files changed, 75 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH] drm/i915/sdvo: Markup a few constant strings.

2010-08-04 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_sdvo.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index ccf6574..234c856 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/

[Intel-gfx] [PATCH 1/2] drm, io-mapping: Specify slot to use for atomic mappings

2010-08-04 Thread Chris Wilson
This is required should we ever attempt to use an io-mapping where KM_USER0 is verboten, such as inside an IRQ context. Signed-off-by: Chris Wilson Cc: Eric Anholt --- drivers/gpu/drm/i915/i915_gem.c|9 + drivers/gpu/drm/i915/intel_overlay.c |5 +++-- drivers/gpu/drm/n

[Intel-gfx] [PATCH 2/2] drm/i915: Record error batch buffers using iomem

2010-08-04 Thread Chris Wilson
Directly read the GTT mapping for the contents of the batch buffers rather than relying on possibly stale CPU caches. Also for completeness scan the flushing/inactive lists for the current buffers - we are collecting error state after all. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i91

[Intel-gfx] [PATCH] drm: Use ENOENT consistently for the error return for an unmatched handle.

2010-08-04 Thread Chris Wilson
This is consistent with trying to access a filename that not exist within a directory which is a good analogy here. The main reason for the change is that it is easy to confuse the error code of EBADF as an performing an ioctl on an invalid file descriptor (rather than an unknown object). Signed-o

[Intel-gfx] [PATCH] drm/i915: Kill the active list spinlock

2010-08-04 Thread Chris Wilson
This spinlock only served debugging purposes in a time when we could not be sure of the mutex ever being released upon a GPU hang. As we now should be able rely on hangcheck to do the job for us (and that error reporting should not itself require the struct mutex) we can kill the incomplete and mis

[Intel-gfx] [PATCH] drm/i915: Only emit flushes on active rings.

2010-08-04 Thread Chris Wilson
This avoids the excess flush and requests on idle rings (and spamming the debug log ;-) Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h |3 +++ drivers/gpu/drm/i915/i915_gem.c | 26 -- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/

[Intel-gfx] [PATCH 3/7] drm/i915/sdvo: Propagate errors from reading/writing control bus.

2010-08-04 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_sdvo.c | 930 +--- drivers/gpu/drm/i915/intel_sdvo_regs.h |2 +- 2 files changed, 380 insertions(+), 552 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo

[Intel-gfx] [PATCH 4/7] drm/i915/sdvo: Use an integer mapping for supported tv format modes

2010-08-04 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_sdvo.c | 34 +++--- 1 files changed, 11 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 5cc83e5..0e03f40 100644 --- a/drivers/gpu/drm/

[Intel-gfx] [PATCH 5/7] drm/i915/sdvo: Check for allocation failure when constructing properties

2010-08-04 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_sdvo.c | 40 +++- 1 files changed, 38 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 0e03f40..c668010 100644 --- a/drivers/gpu/drm

[Intel-gfx] [PATCH 6/7] drm/i915/sdvo: Add missing TV filters

2010-08-04 Thread Chris Wilson
Reference: Bug 28634 - missing TV parameter "Flicker Filter" https://bugs.freedesktop.org/show_bug.cgi?id=28634 Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_sdvo.c | 644 ++-- drivers/gpu/drm/i915/intel_sdvo_regs.h | 48 ++-- 2 files changed

[Intel-gfx] [PATCH 2/7] drm/i915: Subclass intel_connector.

2010-08-04 Thread Chris Wilson
Make the code that tiny bit clearer by reducing the pointer dance. 2 files changed, 130 insertions(+), 147 deletions(-) Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_drv.h |1 - drivers/gpu/drm/i915/intel_sdvo.c | 276 +--- 2 files changed, 130

[Intel-gfx] [PATCH 7/7] drm/i915/sdvo: Add dot crawl property

2010-08-04 Thread Chris Wilson
This property is slightly unusual in that it is a boolean and so has no GET_MAX command. Reference: Bug 28636 - missing TV parameter "Dot Crawl freeze" https://bugs.freedesktop.org/show_bug.cgi?id=28636 Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_sdvo.c | 24 ++

[Intel-gfx] SVDO properties patchset

2010-08-04 Thread Chris Wilson
This patchset touches virtually all of i915/intel*.c simply to subclass encoders and connectors, then cleans up intel_sdvo in order to add a few more TV properties. ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/m

[Intel-gfx] [PATCH] drm/i915: Emit a backtrace if we attempt to rebind a pinned buffer

2010-08-04 Thread Chris Wilson
This debugging trace was useful for finding the fbcon regression on i965, and it may prove useful again in future. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers

[Intel-gfx] [PATCH] drm/i915: Disable the cursor for DPMS_OFF

2010-08-04 Thread Chris Wilson
The comments have long desired that we should switch off the cursor along with the display plane, make it so. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_display.c |8 drivers/gpu/drm/i915/intel_drv.h |2 +- 2 files changed, 5 insertions(+), 5 deletions(-) di

[Intel-gfx] [PATCH 5/5] drm/i915: Maintain LRU order of inactive objects upon access by CPU

2010-08-04 Thread Chris Wilson
In order to reduce the penalty of fallbacks under memory pressure and to avoid a potential immediate ping-pong of evicting a mmaped buffer, we move the object to the tail of the inactive list when a page is freshly faulted or the object is moved into the CPU domain. We choose not to protect the CP

[Intel-gfx] [PATCH 4/5] drm/i915: Implement fair lru eviction across both rings.

2010-08-04 Thread Chris Wilson
Based in a large part upon Daniel Vetter's implementation and adapted for handling multiple rings in a single pass. This should lead to better gtt usage and fixes the page-fault-of-doom triggered. The fairness is provided by scanning through the GTT space amalgamating space in rendering order. As

[Intel-gfx] [PATCH 3/5] drm/i915: Move the eviction logic to its own file.

2010-08-04 Thread Chris Wilson
The eviction code is the gnarly underbelly of memory management, and is clearer if kept separated from the normal domain management in GEM. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/Makefile |1 + drivers/gpu/drm/i915/i915_drv.h |6 + drivers/gpu/drm/i915/i915_ge

[Intel-gfx] [PATCH 1/5] drm/i915: prepare for fair lru eviction

2010-08-04 Thread Chris Wilson
From: Daniel Vetter This does two little changes: - Add an alignment parameter for evict_something. It's not really great to whack a carefully sized hole into the gtt with the wrong alignment. Especially since the fallback path is a full evict. - With the inactive scan stuff we need to evic

[Intel-gfx] [PATCH 2/5] drm/i915: Use a common seqno for all rings.

2010-08-04 Thread Chris Wilson
This will be used by the eviction logic to maintain fairness between the rings. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h |3 +- drivers/gpu/drm/i915/i915_gem.c |2 + drivers/gpu/drm/i915/intel_ringbuffer.c | 46 +- driv

[Intel-gfx] Fair eviction patchset.

2010-08-04 Thread Chris Wilson
The fair-eviction patches rebased upon drm-(core|intel)-next. ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH] drm/i915: Do not clobber the contents of TRANS_DP_CTL when enabling.

2010-08-04 Thread Chris Wilson
Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_reg.h |1 + drivers/gpu/drm/i915/intel_display.c |7 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 281db6e..97a35a4 100644 --- a/

[Intel-gfx] [PATCH] drm/i915: Remove useless message when disabling "Big FIFO" on PineView

2010-08-04 Thread Chris Wilson
As we already have appropriate debug and warnings when we activate and deactivate the self-refresh FIFO, having a further INFO is just annoying. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_display.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a

Re: [Intel-gfx] regression after: drm/i915: Warn if we run out of FIFO space for a mode

2010-08-04 Thread Alexey Fisher
On Di, 2010-08-03 at 17:15 +0200, Alexey Fisher wrote: > On Mo, 2010-08-02 at 20:42 +0100, Chris Wilson wrote: > > On Mon, 02 Aug 2010 12:16:16 +0200, Alexey Fisher > > wrote: > > > Hallo all, > > > i have regression coused by this patch: > > > > > > commit b9421ae8f30958deea98d71477b4a77a066856