drm/i915: Pass old crtc state to intel_crtc_vblank_off()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 13 Dec 2019 19:52:16 +0000 (21:52 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 18 Dec 2019 14:47:34 +0000 (16:47 +0200)
To make life easier in the future let's pass the old crtc state
to intel_crtc_vblank_off() just like we already do for its
counterpart intel_crtc_vblank_on().

Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191213195217.15168-4-ville.syrjala@linux.intel.com
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
drivers/gpu/drm/i915/display/intel_display.c

index 12e39911b22ad7588b6bb093ee8953e137dfc81d..cd79b4a5acf644d93037855adc40da8b630f55e1 100644 (file)
@@ -1823,8 +1823,10 @@ static void intel_crtc_vblank_on(const struct intel_crtc_state *crtc_state)
        drm_crtc_vblank_on(&crtc->base);
 }
 
-static void intel_crtc_vblank_off(struct intel_crtc *crtc)
+static void intel_crtc_vblank_off(const struct intel_crtc_state *crtc_state)
 {
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+
        drm_crtc_vblank_off(&crtc->base);
        assert_vblank_disabled(&crtc->base);
 }
@@ -6697,7 +6699,7 @@ static void ironlake_crtc_disable(struct intel_atomic_state *state,
 
        intel_encoders_disable(state, crtc);
 
-       intel_crtc_vblank_off(crtc);
+       intel_crtc_vblank_off(old_crtc_state);
 
        intel_disable_pipe(old_crtc_state);
 
@@ -6746,7 +6748,7 @@ static void haswell_crtc_disable(struct intel_atomic_state *state,
 
        intel_encoders_disable(state, crtc);
 
-       intel_crtc_vblank_off(crtc);
+       intel_crtc_vblank_off(old_crtc_state);
 
        /* XXX: Do the pipe assertions at the right place for BXT DSI. */
        if (!transcoder_is_dsi(cpu_transcoder))
@@ -7111,7 +7113,7 @@ static void i9xx_crtc_disable(struct intel_atomic_state *state,
 
        intel_encoders_disable(state, crtc);
 
-       intel_crtc_vblank_off(crtc);
+       intel_crtc_vblank_off(old_crtc_state);
 
        intel_disable_pipe(old_crtc_state);