Skip to content

Commit d31bbac

Browse files
Kaustabh Chakrabortydaeinki
authored andcommitted
drm/exynos: exynos7_drm_decon: fix uninitialized crtc reference in functions
Modify the functions to accept a pointer to struct decon_context instead. Signed-off-by: Kaustabh Chakraborty <[email protected]> Signed-off-by: Inki Dae <[email protected]>
1 parent c941a49 commit d31bbac

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

drivers/gpu/drm/exynos/exynos7_drm_decon.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,8 @@ static const enum drm_plane_type decon_win_types[WINDOWS_NR] = {
8181
DRM_PLANE_TYPE_CURSOR,
8282
};
8383

84-
static void decon_wait_for_vblank(struct exynos_drm_crtc *crtc)
84+
static void decon_wait_for_vblank(struct decon_context *ctx)
8585
{
86-
struct decon_context *ctx = crtc->ctx;
87-
8886
if (ctx->suspended)
8987
return;
9088

@@ -100,9 +98,8 @@ static void decon_wait_for_vblank(struct exynos_drm_crtc *crtc)
10098
DRM_DEV_DEBUG_KMS(ctx->dev, "vblank wait timed out.\n");
10199
}
102100

103-
static void decon_clear_channels(struct exynos_drm_crtc *crtc)
101+
static void decon_clear_channels(struct decon_context *ctx)
104102
{
105-
struct decon_context *ctx = crtc->ctx;
106103
unsigned int win, ch_enabled = 0;
107104

108105
/* Check if any channel is enabled. */
@@ -118,15 +115,15 @@ static void decon_clear_channels(struct exynos_drm_crtc *crtc)
118115

119116
/* Wait for vsync, as disable channel takes effect at next vsync */
120117
if (ch_enabled)
121-
decon_wait_for_vblank(ctx->crtc);
118+
decon_wait_for_vblank(ctx);
122119
}
123120

124121
static int decon_ctx_initialize(struct decon_context *ctx,
125122
struct drm_device *drm_dev)
126123
{
127124
ctx->drm_dev = drm_dev;
128125

129-
decon_clear_channels(ctx->crtc);
126+
decon_clear_channels(ctx);
130127

131128
return exynos_drm_register_dma(drm_dev, ctx->dev, &ctx->dma_priv);
132129
}

0 commit comments

Comments
 (0)