From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Check that the planes on each crtc undergoing a modeset are in the state we expect them to be. For now we can only check whether each plane is correctly enabled or disabled. In the future we may want to expand the plane state readout to support a more through verification. Cc: Daniel Vetter <daniel.vetter@xxxxxxxx> Suggested-by: Daniel Vetter <daniel.vetter@xxxxxxxx> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/intel_display.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 268d320690f4..b0f666e086cc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11545,6 +11545,26 @@ verify_crtc_state(struct drm_crtc *crtc, } static void +verify_plane_state(struct intel_atomic_state *state, + struct intel_crtc *crtc) +{ + struct intel_plane *plane; + const struct intel_plane_state *old_plane_state; + const struct intel_plane_state *new_plane_state; + int i; + + for_each_oldnew_intel_plane_in_state(state, plane, + old_plane_state, + new_plane_state, i) { + if (old_plane_state->base.crtc != &crtc->base && + new_plane_state->base.crtc != &crtc->base) + continue; + + assert_plane(plane, new_plane_state->base.visible); + } +} + +static void verify_single_dpll_state(struct drm_i915_private *dev_priv, struct intel_shared_dpll *pll, struct drm_crtc *crtc, @@ -11638,6 +11658,8 @@ intel_modeset_verify_crtc(struct drm_crtc *crtc, verify_wm_state(crtc, new_state); verify_connector_state(crtc->dev, state, crtc); verify_crtc_state(crtc, old_state, new_state); + verify_plane_state(to_intel_atomic_state(state), + to_intel_crtc(crtc)); verify_shared_dpll_state(crtc->dev, crtc, old_state, new_state); } -- 2.13.6 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx