Skip to content

Commit

Permalink
drm/exynos: fix wrong pipe calculation for crtc
Browse files Browse the repository at this point in the history
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 <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
  • Loading branch information
Joonyoung Shim authored and daeinki committed Feb 7, 2015
1 parent 9865df4 commit 0f04cf8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions drivers/gpu/drm/exynos/exynos_drm_fimd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1065,18 +1065,19 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
struct drm_device *drm_dev = data;
int ret;

ctx->crtc = exynos_drm_crtc_create(drm_dev, ctx->pipe,
EXYNOS_DISPLAY_TYPE_LCD,
&fimd_crtc_ops, ctx);
if (IS_ERR(ctx->crtc))
return PTR_ERR(ctx->crtc);

ret = fimd_ctx_initialize(ctx, drm_dev);
if (ret) {
DRM_ERROR("fimd_ctx_initialize failed.\n");
return ret;
}

ctx->crtc = exynos_drm_crtc_create(drm_dev, ctx->pipe,
EXYNOS_DISPLAY_TYPE_LCD,
&fimd_crtc_ops, ctx);
if (IS_ERR(ctx->crtc)) {
fimd_ctx_remove(ctx);
return PTR_ERR(ctx->crtc);
}

if (ctx->display)
exynos_drm_create_enc_conn(drm_dev, ctx->display);
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/exynos/exynos_drm_vidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,8 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
struct drm_device *drm_dev = data;
int ret;

vidi_ctx_initialize(ctx, drm_dev);

ctx->crtc = exynos_drm_crtc_create(drm_dev, ctx->pipe,
EXYNOS_DISPLAY_TYPE_VIDI,
&vidi_crtc_ops, ctx);
Expand All @@ -556,8 +558,6 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
return PTR_ERR(ctx->crtc);
}

vidi_ctx_initialize(ctx, drm_dev);

ret = exynos_drm_create_enc_conn(drm_dev, &ctx->display);
if (ret) {
ctx->crtc->base.funcs->destroy(&ctx->crtc->base);
Expand Down

0 comments on commit 0f04cf8

Please sign in to comment.