Skip to content

Commit cff109f

Browse files
committed
drm/i915: Add rudimentary plane state verification
Check that the planes 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 thorough verification. v2: Verify all planes part of the state as long as at least one crtc is doing a modeset (Daniel) v3: Fix typoes (James) Cc: James Ausmus <james.ausmus@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: James Ausmus <james.ausmus@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171117191917.11506-11-ville.syrjala@linux.intel.com Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
1 parent 2924b8c commit cff109f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11600,6 +11600,18 @@ verify_crtc_state(struct drm_crtc *crtc,
1160011600
}
1160111601
}
1160211602

11603+
static void
11604+
intel_verify_planes(struct intel_atomic_state *state)
11605+
{
11606+
struct intel_plane *plane;
11607+
const struct intel_plane_state *plane_state;
11608+
int i;
11609+
11610+
for_each_new_intel_plane_in_state(state, plane,
11611+
plane_state, i)
11612+
assert_plane(plane, plane_state->base.visible);
11613+
}
11614+
1160311615
static void
1160411616
verify_single_dpll_state(struct drm_i915_private *dev_priv,
1160511617
struct intel_shared_dpll *pll,
@@ -12393,6 +12405,9 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
1239312405
intel_modeset_verify_crtc(crtc, state, old_crtc_state, new_crtc_state);
1239412406
}
1239512407

12408+
if (intel_state->modeset)
12409+
intel_verify_planes(intel_state);
12410+
1239612411
if (intel_state->modeset && intel_can_enable_sagv(state))
1239712412
intel_enable_sagv(dev_priv);
1239812413

0 commit comments

Comments
 (0)