]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/tilcdc: crtc: Use drm_atomic_helper_check_crtc_primary_plane()
authorMaxime Ripard <mripard@kernel.org>
Tue, 30 Sep 2025 10:59:22 +0000 (12:59 +0200)
committerMaxime Ripard <mripard@kernel.org>
Mon, 6 Oct 2025 11:59:07 +0000 (13:59 +0200)
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>
drivers/gpu/drm/tilcdc/tilcdc_crtc.c

index b5f60b2b2d0e72ae8ec0f3f4e5e85bc5004e6e5b..5718d9d83a49f38081aabbc9860847bdc83cf773 100644 (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)