Re: [Intel-gfx] [PATCH] drm/i915: Make G4X-style PLL search more permissive

2010-07-02 Thread Adam Jackson
On Fri, 2010-07-02 at 16:43 -0400, Adam Jackson wrote: > Worst dotclock for Ironlake DAC refclk is 35kHz (error 0.00571) > Worst dotclock for Ironlake SL-LVDS refclk is 102321kHz (error 0.00524) > Worst dotclock for Ironlake DL-LVDS refclk is 219642kHz (error 0.00488) > Worst dotclock for Iron

[Intel-gfx] [PATCH] drm/i915: Make G4X-style PLL search more permissive

2010-07-02 Thread Adam Jackson
Fixes an Ironlake laptop with a 68.940MHz 1280x800 panel and 120MHz SSC reference clock. More generally, the 0.488% tolerance used before is just too tight to reliably find a PLL setting. I extracted the search algorithm and modified it to find the dot clocks with maximum error over the valid ran

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 wrote: > On Fri, 02 Jul 2010 09:24:07 +0100, Chris Wilson > wrote: > > > This looks like the responsibility of miCloseScreen(). Are we failing to > > chain up properly? > > I don't think miCloseScreen (or fbCloseScreen) can do this -- before >

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

2010-07-02 Thread Keith Packard
On Fri, 02 Jul 2010 09:24:07 +0100, Chris Wilson wrote: > This looks like the responsibility of miCloseScreen(). Are we failing to > chain up properly? I don't think miCloseScreen (or fbCloseScreen) can do this -- before we're called, rendering may not have been finished, after we're called, th

Re: [Intel-gfx] [PATCH 07/11] drm/i915: prepare for fair lru eviction

2010-07-02 Thread Chris Wilson
On Fri, 2 Jul 2010 15:02:17 +0100, Chris Wilson wrote: > 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 fallba

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

2010-07-02 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 10/11] drm/i915: Implement fair lru eviction across both rings.

2010-07-02 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 09/11] drm/i915: Move the eviction logic to its own file.

2010-07-02 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 08/11] drm/i915: Use a common seqno for all rings.

2010-07-02 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] [PATCH 07/11] drm/i915: prepare for fair lru eviction

2010-07-02 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 06/11] drm: implement helper functions for scanning lru list

2010-07-02 Thread Chris Wilson
From: Daniel Vetter These helper functions can be used to efficiently scan lru list for eviction. Eviction becomes a three stage process: 1. Scanning through the lru list until a suitable hole has been found. 2. Scan backwards to restore drm_mm consistency and find out which objects fall into

[Intel-gfx] [PATCH 05/11] drm_mm: extract check_free_mm_node

2010-07-02 Thread Chris Wilson
From: Daniel Vetter There are already two copies of this logic. And the new scanning stuff will add some more. So extract it into a small helper function. Signed-off-by: Daniel Vetter Acked-by: Thomas Hellstrom Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_mm.c | 71 +

[Intel-gfx] [PATCH 04/11] drm: sane naming for drm_mm.c

2010-07-02 Thread Chris Wilson
From: Daniel Vetter Yeah, I've kinda noticed that fl_entry is the free stack. Still give it (and the memory node list ml_entry) decent names. Signed-off-by: Daniel Vetter Acked-by: Thomas Hellstrom Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_mm.c | 72 ++

[Intel-gfx] [PATCH 03/11] drm: kill dead code in drm_mm.c

2010-07-02 Thread Chris Wilson
From: Daniel Vetter Signed-off-by: Daniel Vetter Acked-by: Thomas Hellstrom Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_mm.c | 45 - 1 files changed, 0 insertions(+), 45 deletions(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm

[Intel-gfx] [PATCH 02/11] drm: kill drm_mm_node->private

2010-07-02 Thread Chris Wilson
From: Daniel Vetter Only ever assigned, never used. Signed-off-by: Daniel Vetter [glisse: I will re-add if needed for range-restricted allocations] Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c |4 +--- drivers/gpu/drm/ttm/ttm_bo.c |6 -- drivers/gpu/drm/t

[Intel-gfx] [PATCH 01/11] drm: use list_for_each_entry in drm_mm.c

2010-07-02 Thread Chris Wilson
From: Daniel Vetter Signed-off-by: Daniel Vetter Signed-off-by: Chris Wilson Acked-by: Thomas Hellstrom --- drivers/gpu/drm/drm_mm.c |8 ++-- 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index 2ac074c..b75eb55 10064

[Intel-gfx] Fair eviction for i915, based on Daniel's drm_mm scanner

2010-07-02 Thread Chris Wilson
This is a resend of Daniel Vetter's drm mm work to provide a basis for performing fair eviction in i915. I've taken the liberty of attaching the acks and review comments from the previous round, so please look over and check that they still hold true. drivers/gpu/drm/drm_mm.c| 35

Re: [Intel-gfx] [PATCH] gpu/drm/i915: Add a blacklist to omit modeset on LID open

2010-07-02 Thread Thomas Bächler
Am 02.07.2010 00:41, schrieb Eric Anholt: > On Wed, 9 Jun 2010 21:40:54 +0200, Thomas Bächler > wrote: >> On some machines (currently only the Toshiba Tecra A11 is known), the GPU >> locks up when modeset is forced on LID open. This patch adds a new DMI >> blacklist and omits modesetting for all

[Intel-gfx] [PATCH] gpu/drm/i915: Add a blacklist to omit modeset on LID open

2010-07-02 Thread Thomas Bächler
On some machines (currently only the Toshiba Tecra A11 is known), the GPU locks up when modeset is forced on LID open. This patch adds a new DMI blacklist and omits modesetting for all matches. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15550 Signed-off-by: Thomas Bächler --- drivers/gpu

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

2010-07-02 Thread Chris Wilson
On Thu, 1 Jul 2010 09:56:40 -0400, Keith Packard wrote: > This avoids a memory leak on server reset. > > Signed-off-by: Keith Packard > --- > uxa/uxa.c |6 -- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/uxa/uxa.c b/uxa/uxa.c > index a9a705c..dcfaaa9 100644 > --

Re: [Intel-gfx] implement 'wait' instruction

2010-07-02 Thread Zhenyu Wang
On 2010.07.01 11:39:47 -0700, Eric Anholt wrote: > On Tue, 29 Jun 2010 11:04:09 +0800, Zhenyu Wang > wrote: > > > > 'Wait' instruction allows EU to stop and wait notification > > register state clear to continue the execution. And we can > > clear the notifications through MMIO, so we can track

[Intel-gfx] [PATCH] drm/i915: Explosion following OOM in do_execbuffer.

2010-07-02 Thread Chris Wilson
Oops, when merging the extra details following an OOM, I missed that driver_private is now NULL and the correct way to convert from the drm_gem_object into the drm_i915_gem_object is to use to_intel_bo(). BUG: unable to handle kernel NULL pointer dereference at 0069 IP: [] i915_gem_do_execbuff