Re: [Intel-gfx] Pending i915 fixes

2011-04-21 Thread Chris Wilson
On Thu, 21 Apr 2011 17:06:30 -0700, Keith Packard wrote: > On Fri, 22 Apr 2011 08:01:46 +1000, Dave Airlie wrote: > > > My one is definitely, I've got a few people who can't use machines > > without it, I was going to push it myself, but I'm being nice ;-) > > I'll review all of them for .39 th

Re: [Intel-gfx] [PATCH 05/17] drm/i915/tv: Clear state sense detection for Cantiga

2011-04-21 Thread Chris Wilson
On Thu, 21 Apr 2011 16:36:08 -0700, Eric Anholt wrote: > Maybe it actually makes things work (both for not-detecting no TV, and > detecting a real TV). But I also didn't like the "because HW > requirement", instead of some specific explanation (some reason why we > need low sense level on the cha

Re: [Intel-gfx] [PATCH 05/17] drm/i915/tv: Clear state sense detection for Cantiga

2011-04-21 Thread Eric Anholt
On Thu, 21 Apr 2011 22:18:20 +0100, Chris Wilson wrote: > From: Zhao Yakui > > ... otherwise the TV type will be misdetected and cause spurious > connections. > > This was originally applied as fb8b5a39b6310379d7b54c0c7113703a8eaf4a57 > (drm/i915: Configure the TV sense state correctly on GM45

Re: [Intel-gfx] Pending i915 fixes

2011-04-21 Thread Keith Packard
On Fri, 22 Apr 2011 08:01:46 +1000, Dave Airlie wrote: > My one is definitely, I've got a few people who can't use machines > without it, I was going to push it myself, but I'm being nice ;-) I'll review all of them for .39 then; it wasn't clear from the original mail whether that was the desire

Re: [Intel-gfx] [PATCH 2/2] drm/i915/lvds: Use i915.lvds_fixed_mode= as a last resort

2011-04-21 Thread Mike Isely
On Thu, 21 Apr 2011, Chris Wilson wrote: > On Thu, 21 Apr 2011 17:30:21 -0500 (CDT), Mike Isely wrote: > > It looks like the driver did notice the specified mode and used it - > > because the display's refresh rate did get adjusted and the overall > > resolution is correct. However the display

Re: [Intel-gfx] Pending i915 fixes

2011-04-21 Thread Chris Wilson
On Thu, 21 Apr 2011 14:56:21 -0700, Keith Packard wrote: > On Thu, 21 Apr 2011 22:18:15 +0100, Chris Wilson > wrote: > > Whilst this may appear to be a big batch, it is actually only a few bug > > fixes from the last couple of weeks broken down into small steps. > > Do you think any of these ar

Re: [Intel-gfx] [PATCH 2/2] drm/i915/lvds: Use i915.lvds_fixed_mode= as a last resort

2011-04-21 Thread Chris Wilson
On Thu, 21 Apr 2011 17:30:21 -0500 (CDT), Mike Isely wrote: > It looks like the driver did notice the specified mode and used it - > because the display's refresh rate did get adjusted and the overall > resolution is correct. However the display timings are slightly "off", > the image is stret

Re: [Intel-gfx] [PATCH 2/2] drm/i915/lvds: Use i915.lvds_fixed_mode= as a last resort

2011-04-21 Thread Mike Isely
On Wed, 20 Apr 2011, Mike Isely wrote: > On Wed, 20 Apr 2011, Chris Wilson wrote: > > > On Wed, 20 Apr 2011 14:48:36 -0500 (CDT), Mike Isely > > wrote: > > > > > > Chris: > > > > > > I've tested this patch and it doesn't help us here. Even if I add > > > lvds_fixed_mode=, the display still

Re: [Intel-gfx] [PATCH 07/17] drm/i915: Only enable the plane after setting the fb base (pre-ILK)

2011-04-21 Thread Jesse Barnes
On Thu, 21 Apr 2011 22:18:22 +0100 Chris Wilson wrote: > When enabling the plane, it is helpful to have already pointed that > plane to valid memory or else we may incur the wrath of a PGTBL_ER. > This code preserved the behaviour from the bad old days for unknown > reasons... > > Found by asser

Re: [Intel-gfx] [PATCH 01/17] drm/i915: Move the irq wait queue initialisation into the ring init

2011-04-21 Thread Jesse Barnes
On Thu, 21 Apr 2011 22:18:16 +0100 Chris Wilson wrote: > Required so that we don't obliterate the queue if initialising the > rings after the global IRQ handler is installed. > > [Jesse, you recently looked at refactoring the IRQ installation > routines, does moving the initialisation of ring bu

Re: [Intel-gfx] Pending i915 fixes

2011-04-21 Thread Dave Airlie
On Fri, Apr 22, 2011 at 7:56 AM, Keith Packard wrote: > On Thu, 21 Apr 2011 22:18:15 +0100, Chris Wilson > wrote: >> Whilst this may appear to be a big batch, it is actually only a few bug >> fixes from the last couple of weeks broken down into small steps. > > Do you think any of these are need

Re: [Intel-gfx] Pending i915 fixes

2011-04-21 Thread Keith Packard
On Thu, 21 Apr 2011 22:18:15 +0100, Chris Wilson wrote: > Whilst this may appear to be a big batch, it is actually only a few bug > fixes from the last couple of weeks broken down into small steps. Do you think any of these are needed in .39? -- keith.pack...@intel.com pgpAZG9Gv4Qio.pgp Desc

[Intel-gfx] [PATCH 09/17] drm/i915: Simplify return value from intel_get_load_detect_pipe

2011-04-21 Thread Chris Wilson
... and so remove the confusion as to whether to use the returned crtc or intel_encoder->base.crtc with the subsequent load-detection. Even though they were the same, the two instances of load-detection code disagreed over which was the more correct. Signed-off-by: Chris Wilson --- drivers/gpu/d

[Intel-gfx] [PATCH 02/17] drm/i915: Disable all outputs early, before KMS takeover

2011-04-21 Thread Chris Wilson
If the outputs are active and continuing to access the GATT when we teardown the PTEs, then there is a potential for us to hang the GPU. The hang tends to be a PGTBL_ER with either an invalid host access or an invalid display plane fetch. v2: Reorder IRQ initialisation to defer until after GEM is

[Intel-gfx] [PATCH 08/17] drm/i915: Move the tracking of dpms_mode down into crtc enable/disable

2011-04-21 Thread Chris Wilson
As we failed to update the dpms_mode after modeset, where it is presumed to have been changed to DRM_MODE_DPMS_ON by the upper layers the dpms state on the crtc became inconsistent with its actual active state. This notably confused code and left the pipe active when it was meant to be disabled, le

[Intel-gfx] [PATCH 11/17] drm/i915: Don't store temporary load-detect variables in the generic encoder

2011-04-21 Thread Chris Wilson
Keep all the state required for undoing and restoring the previous pipe configuration together in a single struct passed from intel_get_load_detect_pipe() to intel_release_load_detect_pipe() rather than stuffing them inside the common encoder structure. Signed-off-by: Chris Wilson Reviewed-by: Ke

[Intel-gfx] [PATCH 06/17] drm/i915: Check that the plane points to the pipe's framebuffer before enabling

2011-04-21 Thread Chris Wilson
Knut Petersen reported a GPU hang when he left x11perf running overnight. The error state quite clearly indicates that plane A was enabled without being fully setup: PGTBL_ER: 0x0010 Display A: Invalid GTT PTE Plane [0]: CNTR: c100 STRIDE: 0c80 SIZE: 03ff04ff POS:

[Intel-gfx] [PATCH 13/17] drm/i915: Pass the saved adjusted_mode when adding to the load-detect crtc

2011-04-21 Thread Chris Wilson
Signed-off-by: Chris Wilson Reviewed-by: Keith Packard --- drivers/gpu/drm/i915/intel_display.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index cfd58a2..132f83d 100644 --- a/drivers/gpu/d

[Intel-gfx] [PATCH 07/17] drm/i915: Only enable the plane after setting the fb base (pre-ILK)

2011-04-21 Thread Chris Wilson
When enabling the plane, it is helpful to have already pointed that plane to valid memory or else we may incur the wrath of a PGTBL_ER. This code preserved the behaviour from the bad old days for unknown reasons... Found by assert_fb_bound_for_plane(). References: https://bugs.freedesktop.org/sho

[Intel-gfx] [PATCH 17/17] drm/i915: restore only the mode of this driver on lastclose (v2)

2011-04-21 Thread Chris Wilson
From: Dave Airlie i915 calls the panic handler function on last close to reset the modes, however this is a really bad idea for multi-gpu machines, esp shareable gpus machines. So add a new entry point for the driver to just restore its own fbcon mode. v2: move code into fb helper, fix panic cod

[Intel-gfx] [PATCH 15/17] drm/i915: Remove dead code from intel_release_load_detect_pipe()

2011-04-21 Thread Chris Wilson
As we now never attempt to steal a crtc for load detection, we either set a mode on a new pipe, or change the dpms mode on an existing pipe. Never both, so we can simplify the code slightly. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_display.c |8 +++- 1 files changed, 3

[Intel-gfx] [PATCH 04/17] drm/i915/dp: Be paranoid in case we disable a DP before it is attached

2011-04-21 Thread Chris Wilson
Given that the hardware may be left in a random condition by the BIOS, it is conceivable that we then attempt to clear the DP_PIPEB_SELECT bit without us ever enabling/attaching the DP encoder to a pipe. Thus causing a NULL deference when we attempt to wait for a vblank on that crtc. Reported-and-

[Intel-gfx] [PATCH 03/17] drm/i915: Release object along create user fb error path

2011-04-21 Thread Chris Wilson
Reported-by: Alan Cox Signed-off-by: Chris Wilson Cc: sta...@kernel.org --- drivers/gpu/drm/i915/intel_display.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 2183c4d..16f38e4 100644

[Intel-gfx] [PATCH 10/17] drm/i915: Propagate failure to set mode for load-detect pipe

2011-04-21 Thread Chris Wilson
Check the return value from drm_crtc_set_mode(), report the failure via a debug message and propagate the error back to the caller. This prevents us from blissfully continuing to do the load detection on a disabled pipe. Fortunately actual failure for modesetting is very rare, and reported failures

[Intel-gfx] [PATCH 14/17] drm/i915: Remove dead code from intel_get_load_detect_pipe()

2011-04-21 Thread Chris Wilson
As we only allow the use of a disabled CRTC, we don't need to handle the case where we are reusing an already enabled pipe. Signed-off-by: Chris Wilson Reviewed-by: Keith Packard --- drivers/gpu/drm/i915/intel_display.c | 28 ++-- 1 files changed, 10 insertions(+), 18

[Intel-gfx] [PATCH 01/17] drm/i915: Move the irq wait queue initialisation into the ring init

2011-04-21 Thread Chris Wilson
Required so that we don't obliterate the queue if initialising the rings after the global IRQ handler is installed. [Jesse, you recently looked at refactoring the IRQ installation routines, does moving the initialisation of ring buffer data structures away from that routine make sense in your gran

[Intel-gfx] [PATCH 12/17] drm/i915: Remove unused supported_crtc from intel_load_detect_pipe

2011-04-21 Thread Chris Wilson
... and the no longer relevant comment. The code ceased stealing a pipe for load detection a long time ago. Signed-off-by: Chris Wilson Reviewed-by: Keith Packard --- drivers/gpu/drm/i915/intel_display.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/

[Intel-gfx] [PATCH 16/17] drm/i915: Attach a fb to the load-detect pipe

2011-04-21 Thread Chris Wilson
We need to ensure that we feed valid memory into the display plane attached to the pipe when switching the pipe on. Otherwise, the display engine may read through an invalid PTE and so throw an PGTBL_ER exception. As we need to perform load detection before even the first object is allocated for t

[Intel-gfx] [PATCH 05/17] drm/i915/tv: Clear state sense detection for Cantiga

2011-04-21 Thread Chris Wilson
From: Zhao Yakui ... otherwise the TV type will be misdetected and cause spurious connections. This was originally applied as fb8b5a39b6310379d7b54c0c7113703a8eaf4a57 (drm/i915: Configure the TV sense state correctly on GM45 to make TV detection reliable) Eric: Shortly after applying this patch

[Intel-gfx] Pending i915 fixes

2011-04-21 Thread Chris Wilson
Whilst this may appear to be a big batch, it is actually only a few bug fixes from the last couple of weeks broken down into small steps. 1,2: Seem to be well tested now and fix the condition where the pipes are still active and reading from memory as we rewrite the GTT. This impacts both boot and

[Intel-gfx] [PATCH] drm/i915/dp: Be paranoid in case we disable a DP before it is attached

2011-04-21 Thread Chris Wilson
Given that the hardware may be left in a random condition by the BIOS, it is conceivable that we then attempt to clear the DP_PIPEB_SELECT bit without us ever enabling/attaching the DP encoder to a pipe. Thus causing a NULL deference when we attempt to wait for a vblank on that crtc. Reported-and-

Re: [Intel-gfx] [PATCH 0/5] various small patches for -next

2011-04-21 Thread Chris Wilson
On Tue, 19 Apr 2011 22:45:59 +0200, Daniel Vetter wrote: > The first 3 are stuff that I've found useful while hunting down gem_stress > fallout. > > The latter 2 wrap up the gen2 tiling on the kernel side. > > Please review and consider merging for -next. I've picked up the last 4 patches. The

[Intel-gfx] [PATCH 3/3] drm/i915: Move the tracking of dpms_mode down into crtc enable/disable

2011-04-21 Thread Chris Wilson
As we failed to update the dpms_mode after modeset, where it is presumed to have been changed to DRM_MODE_DPMS_ON by the upper layers the dpms state on the crtc became inconsistent with its actual active state. This notably confused code and left the pipe active when it was meant to be disabled, le

[Intel-gfx] [PATCH 1/3] drm/i915: Remove dead code from intel_release_load_detect_pipe()

2011-04-21 Thread Chris Wilson
As we now never attempt to steal a crtc for load detection, we either set a mode on a new pipe, or change the dpms mode on an existing pipe. Never both, so we can simplify the code slightly. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_display.c |8 +++- 1 files changed, 3

[Intel-gfx] [PATCH 2/3] drm/i915: Attach a fb to the load-detect pipe

2011-04-21 Thread Chris Wilson
We need to ensure that we feed valid memory into the display plane attached to the pipe when switching the pipe on. Otherwise, the display engine may read through an invalid PTE and so throw an PGTBL_ER exception. As we need to perform load detection before even the first object is allocated for t

[Intel-gfx] When in doubt, use a temporary fb

2011-04-21 Thread Chris Wilson
I've had the opportunity to test this now on my 915GM. Lo and behold, the very first thing it did was report a PGTBL_ER. Some head scratching later, it became clear that we were never actually disabling the pipe after load detection, leaving the plane pointing off into never-never land. -Chris ___