From 4af67d41c8e321fc1341fc9e3f07e7813628084a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Wed, 4 Sep 2013 18:25:23 +0300 Subject: [PATCH] drm/i915: Check the clock from adjusted mode in intel_crtc_active() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The clock in crtc->mode doesn't necessarily mean anything. Let's look at the clock in adjusted_mode instead. Signed-off-by: Ville Syrjälä Reviewed-by: Damien Lespiau Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_pm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 527bc41c9b8f..4016ca8d151a 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -45,10 +45,13 @@ static bool intel_crtc_active(struct drm_crtc *crtc) { + struct intel_crtc *intel_crtc = to_intel_crtc(crtc); + /* Be paranoid as we can arrive here with only partial * state retrieved from the hardware during setup. */ - return to_intel_crtc(crtc)->active && crtc->fb && crtc->mode.clock; + return intel_crtc->active && crtc->fb && + intel_crtc->config.adjusted_mode.clock; } static void i8xx_disable_fbc(struct drm_device *dev) -- 2.34.1