diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2015-01-30 02:43:01 -0500 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2015-02-07 02:38:40 -0500 |
commit | 0f04cf8df0b20a97369cb634663fef0578cbf273 (patch) | |
tree | b6a767b85e3cfa369d3b73a84e6bfdec999eb7b7 | |
parent | 9865df4d76bc674e7922c8bb279beb8435b8e888 (diff) |
drm/exynos: fix wrong pipe calculation for crtc
We get wrong pipe value for crtc since commit 93bca243ec96 ("drm/exynos:
remove struct exynos_drm_manager"). We should should increase pipe value
before call exynos_drm_crtc_create.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fimd.c | 13 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_vidi.c | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 682806ef4d33..39f7fa7b8d34 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
@@ -1065,18 +1065,19 @@ static int fimd_bind(struct device *dev, struct device *master, void *data) | |||
1065 | struct drm_device *drm_dev = data; | 1065 | struct drm_device *drm_dev = data; |
1066 | int ret; | 1066 | int ret; |
1067 | 1067 | ||
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 | |||
1074 | ret = fimd_ctx_initialize(ctx, drm_dev); | 1068 | ret = fimd_ctx_initialize(ctx, drm_dev); |
1075 | if (ret) { | 1069 | if (ret) { |
1076 | DRM_ERROR("fimd_ctx_initialize failed.\n"); | 1070 | DRM_ERROR("fimd_ctx_initialize failed.\n"); |
1077 | return ret; | 1071 | return ret; |
1078 | } | 1072 | } |
1079 | 1073 | ||
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 | } | ||
1080 | 1081 | ||
1081 | if (ctx->display) | 1082 | if (ctx->display) |
1082 | exynos_drm_create_enc_conn(drm_dev, ctx->display); | 1083 | exynos_drm_create_enc_conn(drm_dev, ctx->display); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 9c8300edd348..fb68d3c997c1 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c | |||
@@ -548,6 +548,8 @@ static int vidi_bind(struct device *dev, struct device *master, void *data) | |||
548 | struct drm_device *drm_dev = data; | 548 | struct drm_device *drm_dev = data; |
549 | int ret; | 549 | int ret; |
550 | 550 | ||
551 | vidi_ctx_initialize(ctx, drm_dev); | ||
552 | |||
551 | ctx->crtc = exynos_drm_crtc_create(drm_dev, ctx->pipe, | 553 | ctx->crtc = exynos_drm_crtc_create(drm_dev, ctx->pipe, |
552 | EXYNOS_DISPLAY_TYPE_VIDI, | 554 | EXYNOS_DISPLAY_TYPE_VIDI, |
553 | &vidi_crtc_ops, ctx); | 555 | &vidi_crtc_ops, ctx); |
@@ -556,8 +558,6 @@ static int vidi_bind(struct device *dev, struct device *master, void *data) | |||
556 | return PTR_ERR(ctx->crtc); | 558 | return PTR_ERR(ctx->crtc); |
557 | } | 559 | } |
558 | 560 | ||
559 | vidi_ctx_initialize(ctx, drm_dev); | ||
560 | |||
561 | ret = exynos_drm_create_enc_conn(drm_dev, &ctx->display); | 561 | ret = exynos_drm_create_enc_conn(drm_dev, &ctx->display); |
562 | if (ret) { | 562 | if (ret) { |
563 | ctx->crtc->base.funcs->destroy(&ctx->crtc->base); | 563 | ctx->crtc->base.funcs->destroy(&ctx->crtc->base); |