Skip to content

Commit

Permalink
drm/exynos: exynos7_drm_decon: fix uninitialized crtc reference in fu…
Browse files Browse the repository at this point in the history
…nctions

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>
  • Loading branch information
Kaustabh Chakraborty authored and Inki Dae committed Nov 4, 2024
1 parent c941a49 commit d31bbac
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions drivers/gpu/drm/exynos/exynos7_drm_decon.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,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;

Expand All @@ -100,9 +98,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. */
Expand All @@ -118,15 +115,15 @@ 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,
struct drm_device *drm_dev)
{
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);
}
Expand Down

0 comments on commit d31bbac

Please sign in to comment.