Commit d18b6bb8 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Add intel_crtc_vblank_off()

We already have intel_crtc_vblank_on(). Add a counterpart so we
don't have to inline the disable+assert all over.
Reviewed-by: default avatarManasi Navare <manasi.d.navare@intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191118164430.27265-3-ville.syrjala@linux.intel.com
parent 021ba100
...@@ -1843,6 +1843,12 @@ static void intel_crtc_vblank_on(const struct intel_crtc_state *crtc_state) ...@@ -1843,6 +1843,12 @@ static void intel_crtc_vblank_on(const struct intel_crtc_state *crtc_state)
drm_crtc_vblank_on(&crtc->base); drm_crtc_vblank_on(&crtc->base);
} }
static void intel_crtc_vblank_off(struct intel_crtc *crtc)
{
drm_crtc_vblank_off(&crtc->base);
assert_vblank_disabled(&crtc->base);
}
static void intel_enable_pipe(const struct intel_crtc_state *new_crtc_state) static void intel_enable_pipe(const struct intel_crtc_state *new_crtc_state)
{ {
struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc); struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc);
...@@ -6760,8 +6766,7 @@ static void ironlake_crtc_disable(struct intel_crtc_state *old_crtc_state, ...@@ -6760,8 +6766,7 @@ static void ironlake_crtc_disable(struct intel_crtc_state *old_crtc_state,
intel_encoders_disable(state, intel_crtc); intel_encoders_disable(state, intel_crtc);
drm_crtc_vblank_off(crtc); intel_crtc_vblank_off(intel_crtc);
assert_vblank_disabled(crtc);
intel_disable_pipe(old_crtc_state); intel_disable_pipe(old_crtc_state);
...@@ -6810,8 +6815,7 @@ static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state, ...@@ -6810,8 +6815,7 @@ static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state,
intel_encoders_disable(state, intel_crtc); intel_encoders_disable(state, intel_crtc);
drm_crtc_vblank_off(crtc); intel_crtc_vblank_off(intel_crtc);
assert_vblank_disabled(crtc);
/* XXX: Do the pipe assertions at the right place for BXT DSI. */ /* XXX: Do the pipe assertions at the right place for BXT DSI. */
if (!transcoder_is_dsi(cpu_transcoder)) if (!transcoder_is_dsi(cpu_transcoder))
...@@ -7184,8 +7188,7 @@ static void i9xx_crtc_disable(struct intel_crtc_state *old_crtc_state, ...@@ -7184,8 +7188,7 @@ static void i9xx_crtc_disable(struct intel_crtc_state *old_crtc_state,
intel_encoders_disable(state, intel_crtc); intel_encoders_disable(state, intel_crtc);
drm_crtc_vblank_off(crtc); intel_crtc_vblank_off(intel_crtc);
assert_vblank_disabled(crtc);
intel_disable_pipe(old_crtc_state); intel_disable_pipe(old_crtc_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment