Skip to content

Commit 0f04cf8

Browse files
Joonyoung Shimdaeinki
Joonyoung Shim
authored andcommitted
drm/exynos: fix wrong pipe calculation for crtc
We get wrong pipe value for crtc since commit 93bca24 ("drm/exynos: remove struct exynos_drm_manager"). We should should increase pipe value before call exynos_drm_crtc_create. Signed-off-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
1 parent 9865df4 commit 0f04cf8

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

drivers/gpu/drm/exynos/exynos_drm_fimd.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,18 +1065,19 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
10651065
struct drm_device *drm_dev = data;
10661066
int ret;
10671067

1068-
ctx->crtc = exynos_drm_crtc_create(drm_dev, ctx->pipe,
1069-
EXYNOS_DISPLAY_TYPE_LCD,
1070-
&fimd_crtc_ops, ctx);
1071-
if (IS_ERR(ctx->crtc))
1072-
return PTR_ERR(ctx->crtc);
1073-
10741068
ret = fimd_ctx_initialize(ctx, drm_dev);
10751069
if (ret) {
10761070
DRM_ERROR("fimd_ctx_initialize failed.\n");
10771071
return ret;
10781072
}
10791073

1074+
ctx->crtc = exynos_drm_crtc_create(drm_dev, ctx->pipe,
1075+
EXYNOS_DISPLAY_TYPE_LCD,
1076+
&fimd_crtc_ops, ctx);
1077+
if (IS_ERR(ctx->crtc)) {
1078+
fimd_ctx_remove(ctx);
1079+
return PTR_ERR(ctx->crtc);
1080+
}
10801081

10811082
if (ctx->display)
10821083
exynos_drm_create_enc_conn(drm_dev, ctx->display);

drivers/gpu/drm/exynos/exynos_drm_vidi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,8 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
548548
struct drm_device *drm_dev = data;
549549
int ret;
550550

551+
vidi_ctx_initialize(ctx, drm_dev);
552+
551553
ctx->crtc = exynos_drm_crtc_create(drm_dev, ctx->pipe,
552554
EXYNOS_DISPLAY_TYPE_VIDI,
553555
&vidi_crtc_ops, ctx);
@@ -556,8 +558,6 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
556558
return PTR_ERR(ctx->crtc);
557559
}
558560

559-
vidi_ctx_initialize(ctx, drm_dev);
560-
561561
ret = exynos_drm_create_enc_conn(drm_dev, &ctx->display);
562562
if (ret) {
563563
ctx->crtc->base.funcs->destroy(&ctx->crtc->base);

0 commit comments

Comments
 (0)