drm/tilcdc: crtc: Use drm_atomic_helper_check_crtc_primary_plane()

In the tilcdc_crtc_atomic_check(), the tilcdc driver hand-crafts its own
implementation of drm_atomic_helper_check_crtc_primary_plane(). And it
does so by accessing the state pointer in drm_atomic_state->planes which
is deprecated.

Let's use the right helper here.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Jyri Sarha <jyri.sarha@iki.fi>
Link: https://lore.kernel.org/r/20250930-drm-no-more-existing-state-v5-7-eeb9e1287907@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
Maxime Ripard
2025-09-30 12:59:22 +02:00
parent 28af3ca1de
commit c92e072dfa

View File

@@ -676,14 +676,7 @@ static int tilcdc_crtc_atomic_check(struct drm_crtc *crtc,
if (!crtc_state->active)
return 0;
if (state->planes[0].ptr != crtc->primary ||
state->planes[0].state == NULL ||
state->planes[0].state->crtc != crtc) {
dev_dbg(crtc->dev->dev, "CRTC primary plane must be present");
return -EINVAL;
}
return 0;
return drm_atomic_helper_check_crtc_primary_plane(crtc_state);
}
static int tilcdc_crtc_enable_vblank(struct drm_crtc *crtc)