drm/i915: Ensure that the crtcinfo is populated during mode_fixup() (Closes: #592415)

svn path=/dists/trunk/linux-2.6/; revision=16362
This commit is contained in:
Ben Hutchings 2010-09-27 23:54:29 +00:00
parent 3ce11d748c
commit 826a4ea552
3 changed files with 45 additions and 0 deletions

2
debian/changelog vendored
View File

@ -2,6 +2,8 @@ linux-2.6 (2.6.36~rc5-1~experimental.2) UNRELEASED; urgency=low
[ Ben Hutchings ]
* linux-base: Remove dependency on libapt-pkg-perl (Closes: #589996, really)
* drm/i915: Ensure that the crtcinfo is populated during mode_fixup()
(Closes: #592415)
-- Ben Hutchings <ben@decadent.org.uk> Sun, 26 Sep 2010 15:34:10 +0100

View File

@ -0,0 +1,42 @@
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sun, 12 Sep 2010 18:25:19 +0100
Subject: [PATCH] drm/i915: Ensure that the crtcinfo is populated during mode_fixup()
commit 532db7fe1fd75f20f3abf959419d160fb7850aff upstream.
This should fix the mysterious mode setting failures reported during
boot up and after resume, generally for i8xx class machines.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16478
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_display.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 161f6ea..1698c52 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2477,11 +2477,19 @@ static bool intel_crtc_mode_fixup(struct drm_crtc *crtc,
struct drm_display_mode *adjusted_mode)
{
struct drm_device *dev = crtc->dev;
+
if (HAS_PCH_SPLIT(dev)) {
/* FDI link clock is fixed at 2.7G */
if (mode->clock * 3 > IRONLAKE_FDI_FREQ * 4)
return false;
}
+
+ /* XXX some encoders set the crtcinfo, others don't.
+ * Obviously we need some form of conflict resolution here...
+ */
+ if (adjusted_mode->crtc_htotal == 0)
+ drm_mode_set_crtcinfo(adjusted_mode, 0);
+
return true;
}
--
1.7.3

View File

@ -0,0 +1 @@
+ bugfix/x86/drm-i915-Ensure-that-the-crtcinfo-is-populated-during-mode_fixup.patch