From: Ville Syrjälä Date: Wed, 4 Sep 2013 15:25:23 +0000 (+0300) Subject: drm/i915: Check the clock from adjusted mode in intel_crtc_active() X-Git-Tag: firefly_0821_release~176^2~4694^2~201^2~40 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4af67d41c8e321fc1341fc9e3f07e7813628084a;p=firefly-linux-kernel-4.4.55.git drm/i915: Check the clock from adjusted mode in intel_crtc_active() 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 --- 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)