43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
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
|
|
|