Re: [Intel-gfx] [PATCH] drm/i915: Suppress hotplug work during PM suspend/resume

2012-04-25 Thread Takashi Iwai
At Thu, 19 Apr 2012 20:11:53 +0200, Takashi Iwai wrote: > > At Thu, 19 Apr 2012 13:55:04 -0400, > Adam Jackson wrote: > > > > On Thu, 2012-04-19 at 18:10 +0200, Takashi Iwai wrote: > > > > > This patch adds a flag to disable the hotplug during PM operation for > > > avoiding such a race. > > >

Re: [Intel-gfx] [PATCH] drm/i915: Use a global lock for modifying global irq flags

2012-04-25 Thread Daniel Vetter
On Tue, Apr 24, 2012 at 02:05:25PM -0700, Ben Widawsky wrote: > On Tue, 24 Apr 2012 21:48:47 +0100 > Chris Wilson wrote: > > > We were attempting to use a per-ring spinlock whilst modifying global > > IRQ flags. A recipe for rare missed interrupts. > > > > Signed-off-by: Chris Wilson > > Regar

Re: [Intel-gfx] [PATCH] drm/i915: Remove too early plane enable on pre-PCH hardware

2012-04-25 Thread Daniel Vetter
On Tue, Apr 24, 2012 at 12:10:09PM -0700, Jesse Barnes wrote: > On Tue, 24 Apr 2012 16:36:50 +0100 > Chris Wilson wrote: > > > Enabling the plane before we have assigned valid address means that it > > will access random PTE (often with conflicting memory types) and cause > > GPU lockups. However

Re: [Intel-gfx] [PATCH] drm/i915: Bump the inactive LRU on set-to-GTT-domain

2012-04-25 Thread Daniel Vetter
On Tue, Apr 24, 2012 at 03:52:35PM +0100, Chris Wilson wrote: > Currently, we only bump the LRU of an object when we bind into the GTT > for a page-fault. As the object may be used many times before its > mapping is zapped, we do not mark it as active as frequently as we > should. Userspace should

Re: [Intel-gfx] [PATCH] [-1/28] drm/i915: Remove i915_gem_evict_inactive()

2012-04-25 Thread Daniel Vetter
On Tue, Apr 24, 2012 at 06:22:52PM +0100, Chris Wilson wrote: > This was only used by one external caller who would just be as happy > with evict-everything, so perform the replacement and make the function > private. > > In the process we note that unbinding the inactive list should not fail, > a

Re: [Intel-gfx] [PATCH] drm/i915: CR clock gating is recommend to be set on PineView

2012-04-25 Thread Daniel Vetter
On Tue, Apr 24, 2012 at 02:51:43PM +0100, Chris Wilson wrote: > The specs recommend that this bit be set on PineView. No reason is > given, but it sounds like a powersaving bit that we should expect the > BIOS to be setting... > > v2: Rebase on top of _MASKED_ENABLE_BIT > > Signed-off-by: Chris W

Re: [Intel-gfx] [PATCH] drm/i915: check for kms in dri1 ioctls

2012-04-25 Thread Daniel Vetter
On Tue, Apr 24, 2012 at 08:29:42AM +0200, Daniel Vetter wrote: > Calling these when gem assumes full control of the hw won't end > in anything else than tears. So be a bit more paranoid here. > > Just serves as documentation. > > v2: Bail out with ENODEV as suggested by Chris Wilson. > > Reviewe

[Intel-gfx] [PATCH 0/6] gpu hangman support

2012-04-25 Thread Daniel Vetter
Hi all, In the light of the recent oops in the error state code I've resurrected my gpu hangman and brushed it up a bit. Together with the hangman check in i-g-t (which now also works a bit more reliable) we'll have a basic test of our hangcheck, reset and error state infrastructure. Comments, fl

[Intel-gfx] [PATCH 1/6] drm/i915: add interface to simulate gpu hangs

2012-04-25 Thread Daniel Vetter
gpu reset is a very important piece of our infrastructure. Unfortunately we only really it test by actually hanging the gpu, which often has bad side-effects for the entire system. And the gpu hang handling code is one of the rather complicated pieces of code we have, consisting of - hang detection

[Intel-gfx] [PATCH 3/6] drm/i915: destroy existing error_state when simulating a gpu hang

2012-04-25 Thread Daniel Vetter
This way we can simulate a bunch of gpu hangs and run the error_state capture code every time (without the need to reload the module). Signed-Off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_debugfs.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i9

[Intel-gfx] [PATCH 2/6] drm/i915: rework dev->first_error locking

2012-04-25 Thread Daniel Vetter
- reduce the irq disabled section, even for a debugfs file this was way too long. - always disable irqs when taking the lock. v2: Thou shalt not mistake locking for reference counting, so: - reference count the error_state to protect from concurent freeeing. This will be only really used in th

[Intel-gfx] [PATCH 4/6] drm/i915: simplify i915_reset a bit

2012-04-25 Thread Daniel Vetter
- need_display is always true, scrap it. - don't reacquire the mutex to do nothing after having restored the gem state. Signed-Off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_drv.c | 19 +-- 1 files changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i

[Intel-gfx] [PATCH 5/6] drm/i915: extract i915_do_reset

2012-04-25 Thread Daniel Vetter
Slightly cleans up the code and could be useful for e.g. Ben Widawsky's hw context patches. Cc: Ben Widawsky Signed-Off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_drv.c | 43 -- 1 files changed, 27 insertions(+), 16 deletions(-) diff --git a/drivers/g

[Intel-gfx] [PATCH 6/6] drm/i915: make gpu hangman more resilient

2012-04-25 Thread Daniel Vetter
- reset the stop_rings infrastructure while resetting the hw to avoid angering the hangcheck right away (and potentially declaring the gpu permanently wedged). - ignore reset failures when hanging due to the hangman - we don't have reset code for all generations. Signed-off-by: Daniel Vette

Re: [Intel-gfx] [PATCH 0/6] gpu hangman support

2012-04-25 Thread Chris Wilson
On Wed, 25 Apr 2012 13:57:07 +0200, Daniel Vetter wrote: > Hi all, > > In the light of the recent oops in the error state code I've resurrected my > gpu > hangman and brushed it up a bit. Together with the hangman check in i-g-t > (which > now also works a bit more reliable) we'll have a basic

[Intel-gfx] [PATCH] drm/i915: extract intel_gpu_reset

2012-04-25 Thread Daniel Vetter
Slightly cleans up the code and could be useful for e.g. Ben Widawsky's hw context patches. v2: New colours! Cc: Ben Widawsky Signed-Off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_drv.c | 43 -- 1 files changed, 27 insertions(+), 16 deletions(-) diff

Re: [Intel-gfx] [PATCH 4/6] drm/i915: simplify i915_reset a bit

2012-04-25 Thread Jesse Barnes
On Wed, 25 Apr 2012 13:57:11 +0200 Daniel Vetter wrote: > - need_display is always true, scrap it. > - don't reacquire the mutex to do nothing after having restored the > gem state. > Actually I think we generally *don't* need to reset display. It's currently there just because we haven't tr

Re: [Intel-gfx] [PATCH] drm/i915: extract intel_gpu_reset

2012-04-25 Thread Ben Widawsky
On Wed, 25 Apr 2012 15:14:05 +0200 Daniel Vetter wrote: > Slightly cleans up the code and could be useful for e.g. Ben > Widawsky's hw context patches. > > v2: New colours! > > Cc: Ben Widawsky > Signed-Off-by: Daniel Vetter I have this queued for both HW context, and DPF, but you've beaten

Re: [Intel-gfx] [PATCH 1/2] drm/i915: time out of load detect busy-waits

2012-04-25 Thread Chris Wilson
On Fri, 20 Apr 2012 21:03:35 +0200, Daniel Vetter wrote: > If we try to do that and the scanlines just wouldn't advance, we > busy-hang the machine holding the modeset mutex. Not great for > debugging. > > References: https://bugzilla.kernel.org/show_bug.cgi?id=43020 > Signed-off-by: Daniel Vett

[Intel-gfx] [PATCH 1/2] drm/i915: i915.enable_backlight=0 disables intel_backlight

2012-04-25 Thread Kamal Mostafa
i915.enable_backlight=0 can be used to disable i915 backlight control and the /sys/class/backlight/intel_backlight interface -- useful for systems where intel_backight conflicts with BIOS backlight control. BugLink: https://launchpad.net/bugs/954661 Signed-off-by: Kamal Mostafa --- drivers/gpu/d

[Intel-gfx] [PATCH 2/2] drm/i915: quirk disable i915 backlight on Dell XPS 13z

2012-04-25 Thread Kamal Mostafa
From: Robert Hooker Dell XPS 13z exhibits problems (backlight flashing/pulsating) when intel_backlight is enabled at all, so disable it. BugLink: https://launchpad.net/bugs/954661 Signed-off-by: Robert Hooker Signed-off-by: Kamal Mostafa --- drivers/gpu/drm/i915/intel_display.c | 17 +++

[Intel-gfx] [PATCH] drm/i915: Always unsuppress down-interrupts when programming a non-min value

2012-04-25 Thread Chris Wilson
The GT power programing guide recommends always unsuppressing the down interrupt when programming any render frequency above the minimum. This is because the GT unit doesn't emit interrupts whilst it is asleep which can lead to the down interrupt being lost. Also due to our own coalescing of interr

Re: [Intel-gfx] [PATCH 1/2] drm/i915: time out of load detect busy-waits

2012-04-25 Thread Daniel Vetter
On Wed, Apr 25, 2012 at 06:14:37PM +0100, Chris Wilson wrote: > On Fri, 20 Apr 2012 21:03:35 +0200, Daniel Vetter > wrote: > > If we try to do that and the scanlines just wouldn't advance, we > > busy-hang the machine holding the modeset mutex. Not great for > > debugging. > > > > References: ht

[Intel-gfx] [PATCH] drm/i915: allow the existing error_state to be destroyed

2012-04-25 Thread Daniel Vetter
... by writing (anything) to i915_error_state. This way we can simulate a bunch of gpu hangs and run the error_state capture code every time (without the need to reload the module). To make that happen we need to abandon the simple seq_file wrappers provided by the drm core. While at it, but the

Re: [Intel-gfx] [PATCH 4/6] drm/i915: simplify i915_reset a bit

2012-04-25 Thread Daniel Vetter
On Wed, Apr 25, 2012 at 09:18:21AM -0700, Jesse Barnes wrote: > On Wed, 25 Apr 2012 13:57:11 +0200 > Daniel Vetter wrote: > > > - need_display is always true, scrap it. > > - don't reacquire the mutex to do nothing after having restored the > > gem state. > > > > Actually I think we generally

Re: [Intel-gfx] [PATCH 4/6] drm/i915: simplify i915_reset a bit

2012-04-25 Thread Jesse Barnes
On Wed, 25 Apr 2012 22:27:12 +0200 Daniel Vetter wrote: > On Wed, Apr 25, 2012 at 09:18:21AM -0700, Jesse Barnes wrote: > > On Wed, 25 Apr 2012 13:57:11 +0200 > > Daniel Vetter wrote: > > > > > - need_display is always true, scrap it. > > > - don't reacquire the mutex to do nothing after having

Re: [Intel-gfx] [PATCH 05/12] drm/i915: Clear FlipDone semantics change for pageflipping on gen3

2012-04-25 Thread Jesse Barnes
On Tue, 24 Apr 2012 22:59:45 +0100 Chris Wilson wrote: > On later gen3, you are able to select the meaning of the FlipPending > status bit in IIR and change it to FlipDone. This was sometimes done by > the BIOS leading to confusion on just how pageflipping worked on gen3. > Simplify the implement

Re: [Intel-gfx] [PATCH 06/12] drm/i915: Remove gen3 irq code from gen4 irq routine

2012-04-25 Thread Jesse Barnes
On Tue, 24 Apr 2012 22:59:46 +0100 Chris Wilson wrote: > And a couple of miscellaneous cleanups to the main body of the IRQ loop; > move per-loop condition variables within the scope of the loop and move > the old DRI1 breadcrumb to the tail of the function and so only execute > it once. > > Sig

Re: [Intel-gfx] [PATCH 07/12] drm/i915: Remove gen4 irq code from gen3 irq routine

2012-04-25 Thread Jesse Barnes
On Tue, 24 Apr 2012 22:59:47 +0100 Chris Wilson wrote: > A couple of miscellaneous cleanups as well to move per-loop condition > variables within the scope of the loop and the update of the DRI1 > breadcrumb to the tail of the function. > > Signed-off-by: Chris Wilson > --- Reviewed-by: Jesse

Re: [Intel-gfx] [PATCH 08/12] drm/i915: HWSTAM is only 16-bit on gen3

2012-04-25 Thread Jesse Barnes
On Tue, 24 Apr 2012 22:59:48 +0100 Chris Wilson wrote: > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/i915_irq.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > index 878f1c3..a4e074

Re: [Intel-gfx] [PATCH 09/12] drm/i915: Cleanup gen3 irq uninstall

2012-04-25 Thread Jesse Barnes
On Tue, 24 Apr 2012 22:59:49 +0100 Chris Wilson wrote: > Bring the for-each-pipe loops together so that the code is easier on the > eyes. > > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/i915_irq.c | 11 --- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --gi

Re: [Intel-gfx] [PATCH 10/12] drm/i915: Handle PendingFlip on gen3 robustly

2012-04-25 Thread Jesse Barnes
On Tue, 24 Apr 2012 22:59:50 +0100 Chris Wilson wrote: > We appear to allow too many pending pageflips as evidenced by an > apparent pin-leak. So borrow the pageflip completion logic from i8xx for > handling PendingFlip in a robust manner. > > v2: Address Jesse's reminders about the nuances of g

Re: [Intel-gfx] [PATCH 11/12] drm/i915: Inline I915_INTERRUPT_ENABLE_FIX

2012-04-25 Thread Jesse Barnes
On Tue, 24 Apr 2012 22:59:51 +0100 Chris Wilson wrote: > Since there is only one remaining user of I915_INTERRUPT_ENABLE_FIX, > expand it at the callsite. Quoting Jesse Barnes: > > "I'd really like to get rid of these defines at the top of i915_irq.c. > Some are unused and the others just make y

Re: [Intel-gfx] [PATCH 12/12] drm/i915: Remove unused and unloved vblank macros

2012-04-25 Thread Jesse Barnes
On Tue, 24 Apr 2012 22:59:52 +0100 Chris Wilson wrote: > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/i915_irq.c | 11 --- > 1 file changed, 11 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > index a1150b7..d3500c7 100644

Re: [Intel-gfx] [PATCH 4/6] drm/i915: simplify i915_reset a bit

2012-04-25 Thread Daniel Vetter
On Wed, Apr 25, 2012 at 01:34:45PM -0700, Jesse Barnes wrote: > On Wed, 25 Apr 2012 22:27:12 +0200 > Daniel Vetter wrote: > > > On Wed, Apr 25, 2012 at 09:18:21AM -0700, Jesse Barnes wrote: > > > On Wed, 25 Apr 2012 13:57:11 +0200 > > > Daniel Vetter wrote: > > > > > > > - need_display is alway

Re: [Intel-gfx] [PATCH 11/12] drm/i915: Inline I915_INTERRUPT_ENABLE_FIX

2012-04-25 Thread Chris Wilson
On Wed, 25 Apr 2012 13:55:12 -0700, Jesse Barnes wrote: > On Tue, 24 Apr 2012 22:59:51 +0100 > Chris Wilson wrote: > > + dev_priv->irq_mask = ~(I915_ASLE_INTERRUPT | > > + I915_DISPLAY_PIPE_A_EVENT_INTERRUPT | > > + I915_DISPLAY_PIPE_B_EVENT_IN

Re: [Intel-gfx] [PATCH 4/6] drm/i915: simplify i915_reset a bit

2012-04-25 Thread Eric Anholt
On Wed, 25 Apr 2012 22:27:12 +0200, Daniel Vetter wrote: > On Wed, Apr 25, 2012 at 09:18:21AM -0700, Jesse Barnes wrote: > > On Wed, 25 Apr 2012 13:57:11 +0200 > > Daniel Vetter wrote: > > > > > - need_display is always true, scrap it. > > > - don't reacquire the mutex to do nothing after having

Re: [Intel-gfx] [PATCH 1/6] drm/i915: add interface to simulate gpu hangs

2012-04-25 Thread Eugeni Dodonov
On Wed, Apr 25, 2012 at 08:57, Daniel Vetter wrote: > gpu reset is a very important piece of our infrastructure. > Unfortunately we only really it test by actually hanging the gpu, > which often has bad side-effects for the entire system. And the gpu > hang handling code is one of the rather comp

[Intel-gfx] [QA] Testing report for `drm-intel-testing` (was: Updated -next)

2012-04-25 Thread Sun, Yi
We finished a new round of kernel testing. The version of kernel is: Kernel: (drm-intel-testing)d5eef3cd2b702d875e35673f46f8c6e0e874fb03 Some additional commit info: Merge: 0e31d4e 99d9acd Author: Daniel Vetter Date: Sat Apr 21 17:50:35 2012 +0200 We covered the platform IvyBridge, SandyBridge,