drm/i915: Check the clock from adjusted mode in intel_crtc_active()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 4 Sep 2013 15:25:23 +0000 (18:25 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 16 Sep 2013 21:33:08 +0000 (23:33 +0200)
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ä <ville.syrjala@linux.intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_pm.c

index 527bc41c9b8f9c400b1ea3f917ff0743f90d2aab..4016ca8d151ac9aba51353aefc6e495323e97688 100644 (file)
 
 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)