* [PATCH] drm/i915: Sanitize BIOS debugging bits from PIPECONF
@ 2012-03-22 15:00 Chris Wilson
2012-03-22 15:40 ` Eugeni Dodonov
2012-03-30 16:15 ` Chris Wilson
0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2012-03-22 15:00 UTC (permalink / raw)
To: intel-gfx; +Cc: stable
Quoting the BSpec from time immemorial:
PIPEACONF, bits 28:27: Frame Start Delay (Debug)
Used to delay the frame start signal that is sent to the display planes.
Care must be taken to insure that there are enough lines during VBLANK
to support this setting.
An instance of the BIOS leaving these bits set was found in the wild,
where it caused our modesetting to go all squiffy and skewiff.
References: https://bugs.freedesktop.org/show_bug.cgi?id=47271
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
---
drivers/gpu/drm/i915/i915_reg.h | 1 +
drivers/gpu/drm/i915/intel_display.c | 6 ++++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index f59cd3a..e65fb20 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2385,6 +2385,7 @@
#define PIPECONF_DISABLE 0
#define PIPECONF_DOUBLE_WIDE (1<<30)
#define I965_PIPECONF_ACTIVE (1<<30)
+#define PIPECONF_FRAME_START_DELAY_MASK (3<<27)
#define PIPECONF_SINGLE_WIDE 0
#define PIPECONF_PIPE_UNLOCKED 0
#define PIPECONF_PIPE_LOCKED (1<<25)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2942e02..7ea5d4d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7673,6 +7673,12 @@ static void intel_sanitize_modesetting(struct drm_device *dev,
struct drm_i915_private *dev_priv = dev->dev_private;
u32 reg, val;
+ /* Clear any frame start delays used for debugging left by the BIOS */
+ for_each_pipe(pipe) {
+ reg = PIPECONF(pipe);
+ I915_WRITE(reg, I915_READ(reg) & ~PIPECONF_FRAME_START_DELAY_MASK);
+ }
+
if (HAS_PCH_SPLIT(dev))
return;
--
1.7.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Sanitize BIOS debugging bits from PIPECONF
2012-03-22 15:00 [PATCH] drm/i915: Sanitize BIOS debugging bits from PIPECONF Chris Wilson
@ 2012-03-22 15:40 ` Eugeni Dodonov
2012-03-30 16:15 ` Chris Wilson
1 sibling, 0 replies; 3+ messages in thread
From: Eugeni Dodonov @ 2012-03-22 15:40 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, stable
[-- Attachment #1.1: Type: text/plain, Size: 810 bytes --]
On Thu, Mar 22, 2012 at 12:00, Chris Wilson <chris@chris-wilson.co.uk>wrote:
> Quoting the BSpec from time immemorial:
>
> PIPEACONF, bits 28:27: Frame Start Delay (Debug)
>
> Used to delay the frame start signal that is sent to the display planes.
> Care must be taken to insure that there are enough lines during VBLANK
> to support this setting.
>
> An instance of the BIOS leaving these bits set was found in the wild,
> where it caused our modesetting to go all squiffy and skewiff.
>
Just complementing Chris patch and calling for some testing in the wild...
For the ones affected by the latest VBIOS update on Ivy Bridge which
resulted in somewhat strange display issues, could you please test this
patch and verify if it fixes the issue for you?
--
Eugeni Dodonov
<http://eugeni.dodonov.net/>
[-- Attachment #1.2: Type: text/html, Size: 1177 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Sanitize BIOS debugging bits from PIPECONF
2012-03-22 15:00 [PATCH] drm/i915: Sanitize BIOS debugging bits from PIPECONF Chris Wilson
2012-03-22 15:40 ` Eugeni Dodonov
@ 2012-03-30 16:15 ` Chris Wilson
1 sibling, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2012-03-30 16:15 UTC (permalink / raw)
To: intel-gfx; +Cc: stable
On Thu, 22 Mar 2012 15:00:50 +0000, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting the BSpec from time immemorial:
>
> PIPEACONF, bits 28:27: Frame Start Delay (Debug)
>
> Used to delay the frame start signal that is sent to the display planes.
> Care must be taken to insure that there are enough lines during VBLANK
> to support this setting.
>
> An instance of the BIOS leaving these bits set was found in the wild,
> where it caused our modesetting to go all squiffy and skewiff.
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=47271
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: stable@kernel.org
Reported-and-tested-by: Carl Richell <carl@system76.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43012
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-30 16:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-22 15:00 [PATCH] drm/i915: Sanitize BIOS debugging bits from PIPECONF Chris Wilson
2012-03-22 15:40 ` Eugeni Dodonov
2012-03-30 16:15 ` Chris Wilson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.