]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/exynos: exynos7_drm_decon: fix uninitialized crtc reference in functions
authorKaustabh Chakraborty <kauschluss@disroot.org>
Sat, 18 Oct 2025 02:26:40 +0000 (22:26 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2025 13:04:31 +0000 (14:04 +0100)
[ Upstream commit d31bbacf783daf1e71fbe5c68df93550c446bf44 ]

Modify the functions to accept a pointer to struct decon_context
instead.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Stable-dep-of: e1361a4f1be9 ("drm/exynos: exynos7_drm_decon: remove ctx->suspended")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/exynos/exynos7_drm_decon.c

index e52f72cc000e25e1f7b64cac846c4d656d12641b..6d18a20e1104dee2edbe08436ab723a6266f7414 100644 (file)
@@ -82,10 +82,8 @@ static const enum drm_plane_type decon_win_types[WINDOWS_NR] = {
        DRM_PLANE_TYPE_CURSOR,
 };
 
-static void decon_wait_for_vblank(struct exynos_drm_crtc *crtc)
+static void decon_wait_for_vblank(struct decon_context *ctx)
 {
-       struct decon_context *ctx = crtc->ctx;
-
        if (ctx->suspended)
                return;
 
@@ -101,9 +99,8 @@ static void decon_wait_for_vblank(struct exynos_drm_crtc *crtc)
                DRM_DEV_DEBUG_KMS(ctx->dev, "vblank wait timed out.\n");
 }
 
-static void decon_clear_channels(struct exynos_drm_crtc *crtc)
+static void decon_clear_channels(struct decon_context *ctx)
 {
-       struct decon_context *ctx = crtc->ctx;
        unsigned int win, ch_enabled = 0;
 
        /* Check if any channel is enabled. */
@@ -119,7 +116,7 @@ static void decon_clear_channels(struct exynos_drm_crtc *crtc)
 
        /* Wait for vsync, as disable channel takes effect at next vsync */
        if (ch_enabled)
-               decon_wait_for_vblank(ctx->crtc);
+               decon_wait_for_vblank(ctx);
 }
 
 static int decon_ctx_initialize(struct decon_context *ctx,
@@ -127,7 +124,7 @@ static int decon_ctx_initialize(struct decon_context *ctx,
 {
        ctx->drm_dev = drm_dev;
 
-       decon_clear_channels(ctx->crtc);
+       decon_clear_channels(ctx);
 
        return exynos_drm_register_dma(drm_dev, ctx->dev, &ctx->dma_priv);
 }