[PATCH -v2 3/8] drm/exynos: remove struct *_win_data abstraction on planes
Joonyoung Shim
jy0922.shim at samsung.com
Tue Mar 31 01:19:31 PDT 2015
Hi,
On 03/26/2015 11:10 PM, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
>
> struct {fimd,mixer,vidi}_win_data was just keeping the same data
> as struct exynos_drm_plane thus get ride of it and use exynos_drm_plane
> directly.
>
> It changes how planes are created and remove .win_mode_set() callback
> that was only filling all *_win_data structs.
>
> Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> ---
> drivers/gpu/drm/exynos/exynos7_drm_decon.c | 164 ++++++++--------------
> drivers/gpu/drm/exynos/exynos_drm_crtc.c | 9 +-
> drivers/gpu/drm/exynos/exynos_drm_crtc.h | 1 +
> drivers/gpu/drm/exynos/exynos_drm_drv.c | 14 --
> drivers/gpu/drm/exynos/exynos_drm_drv.h | 5 +-
> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 182 +++++++++----------------
> drivers/gpu/drm/exynos/exynos_drm_plane.c | 23 +---
> drivers/gpu/drm/exynos/exynos_drm_plane.h | 6 +-
> drivers/gpu/drm/exynos/exynos_drm_vidi.c | 123 ++++-------------
> drivers/gpu/drm/exynos/exynos_mixer.c | 212 ++++++++++-------------------
> 10 files changed, 242 insertions(+), 497 deletions(-)
>
[snip]
> @@ -818,7 +762,9 @@ static int decon_bind(struct device *dev, struct device *master, void *data)
> {
> struct decon_context *ctx = dev_get_drvdata(dev);
> struct drm_device *drm_dev = data;
> - int ret;
> + struct exynos_drm_plane *exynos_plane;
> + enum drm_plane_type type;
> + int zpos, ret;
>
> ret = decon_ctx_initialize(ctx, drm_dev);
> if (ret) {
> @@ -826,8 +772,16 @@ static int decon_bind(struct device *dev, struct device *master, void *data)
> return ret;
> }
>
> - ctx->crtc = exynos_drm_crtc_create(drm_dev, ctx->pipe,
> - EXYNOS_DISPLAY_TYPE_LCD,
> + for (zpos = 0; zpos < WINDOWS_NR; zpos++) {
> + type = (zpos == ctx->default_win) ? DRM_PLANE_TYPE_PRIMARY :
> + DRM_PLANE_TYPE_OVERLAY;
> + exynos_plane_init(drm_dev, &ctx->planes[zpos], 1 << ctx->pipe,
> + type);
Doesn't error checking need about return value of exynos_plane_init?
Thanks.
More information about the dri-devel
mailing list