diff options
author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2015-08-03 14:39:36 +0900 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2015-08-16 10:23:34 +0900 |
commit | 1e1d13932283419ddfdb60c73319cc0e753ded5b (patch) | |
tree | bfdecad1762750aa4e0f7ee81f658277bd5a00dd /drivers/gpu/drm/exynos/exynos7_drm_decon.c | |
parent | 9cc7610a2375a94ec967f771ce74b51db0d43d1c (diff) | |
download | op-kernel-dev-1e1d13932283419ddfdb60c73319cc0e753ded5b.zip op-kernel-dev-1e1d13932283419ddfdb60c73319cc0e753ded5b.tar.gz |
drm/exynos: pass struct exynos_drm_plane in update/enable
We already have the plane pointer in before calling .update_plane() or
disable_plane() so pass it directly to those calls avoiding a new
conversion from zpos to struct exynos_drm_plane.
v2: don't remove check for suspended in FIMD (comment by Joonyoung)
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos7_drm_decon.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos7_drm_decon.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c b/drivers/gpu/drm/exynos/exynos7_drm_decon.c index 31210be..0bb3938 100644 --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c @@ -383,24 +383,20 @@ static void decon_shadow_protect_win(struct decon_context *ctx, writel(val, ctx->regs + SHADOWCON); } -static void decon_update_plane(struct exynos_drm_crtc *crtc, unsigned int win) +static void decon_update_plane(struct exynos_drm_crtc *crtc, + struct exynos_drm_plane *plane) { struct decon_context *ctx = crtc->ctx; struct drm_display_mode *mode = &crtc->base.state->adjusted_mode; - struct exynos_drm_plane *plane; int padding; unsigned long val, alpha; unsigned int last_x; unsigned int last_y; + unsigned int win = plane->zpos; if (ctx->suspended) return; - if (win < 0 || win >= WINDOWS_NR) - return; - - plane = &ctx->planes[win]; - /* * SHADOWCON/PRTCON register is used for enabling timing. * @@ -493,17 +489,13 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc, unsigned int win) writel(val, ctx->regs + DECON_UPDATE); } -static void decon_disable_plane(struct exynos_drm_crtc *crtc, unsigned int win) +static void decon_disable_plane(struct exynos_drm_crtc *crtc, + struct exynos_drm_plane *plane) { struct decon_context *ctx = crtc->ctx; - struct exynos_drm_plane *plane; + unsigned int win = plane->zpos; u32 val; - if (win < 0 || win >= WINDOWS_NR) - return; - - plane = &ctx->planes[win]; - if (ctx->suspended) return; @@ -599,7 +591,7 @@ static void decon_disable(struct exynos_drm_crtc *crtc) * a destroyed buffer later. */ for (i = 0; i < WINDOWS_NR; i++) - decon_disable_plane(crtc, i); + decon_disable_plane(crtc, &ctx->planes[i]); clk_disable_unprepare(ctx->vclk); clk_disable_unprepare(ctx->eclk); |