Commit 2c82607b authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Inki Dae

drm/exynos: set plane possible_crtcs in exynos_plane_init

All Exynos planes are assigned to exactly one CRTC, it allows to simplify
initialization by moving setting of possible_crtcs to exynos_plane_init.
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent f44d3d2f
...@@ -604,7 +604,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data) ...@@ -604,7 +604,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data)
ctx->configs[win].type = decon_win_types[tmp]; ctx->configs[win].type = decon_win_types[tmp];
ret = exynos_plane_init(drm_dev, &ctx->planes[win], win, ret = exynos_plane_init(drm_dev, &ctx->planes[win], win,
1 << ctx->pipe, &ctx->configs[win]); &ctx->configs[win]);
if (ret) if (ret)
return ret; return ret;
} }
......
...@@ -642,7 +642,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data) ...@@ -642,7 +642,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data)
ctx->configs[i].type = decon_win_types[i]; ctx->configs[i].type = decon_win_types[i];
ret = exynos_plane_init(drm_dev, &ctx->planes[i], i, ret = exynos_plane_init(drm_dev, &ctx->planes[i], i,
1 << ctx->pipe, &ctx->configs[i]); &ctx->configs[i]);
if (ret) if (ret)
return ret; return ret;
} }
......
...@@ -995,7 +995,7 @@ static int fimd_bind(struct device *dev, struct device *master, void *data) ...@@ -995,7 +995,7 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
ctx->configs[i].zpos = i; ctx->configs[i].zpos = i;
ctx->configs[i].type = fimd_win_types[i]; ctx->configs[i].type = fimd_win_types[i];
ret = exynos_plane_init(drm_dev, &ctx->planes[i], i, ret = exynos_plane_init(drm_dev, &ctx->planes[i], i,
1 << ctx->pipe, &ctx->configs[i]); &ctx->configs[i]);
if (ret) if (ret)
return ret; return ret;
} }
......
...@@ -273,14 +273,13 @@ static void exynos_plane_attach_zpos_property(struct drm_plane *plane, ...@@ -273,14 +273,13 @@ static void exynos_plane_attach_zpos_property(struct drm_plane *plane,
} }
int exynos_plane_init(struct drm_device *dev, int exynos_plane_init(struct drm_device *dev,
struct exynos_drm_plane *exynos_plane, struct exynos_drm_plane *exynos_plane, unsigned int index,
unsigned int index, unsigned long possible_crtcs,
const struct exynos_drm_plane_config *config) const struct exynos_drm_plane_config *config)
{ {
int err; int err;
err = drm_universal_plane_init(dev, &exynos_plane->base, err = drm_universal_plane_init(dev, &exynos_plane->base,
possible_crtcs, 1 << dev->mode_config.num_crtc,
&exynos_plane_funcs, &exynos_plane_funcs,
config->pixel_formats, config->pixel_formats,
config->num_pixel_formats, config->num_pixel_formats,
......
...@@ -11,5 +11,4 @@ ...@@ -11,5 +11,4 @@
int exynos_plane_init(struct drm_device *dev, int exynos_plane_init(struct drm_device *dev,
struct exynos_drm_plane *exynos_plane, unsigned int index, struct exynos_drm_plane *exynos_plane, unsigned int index,
unsigned long possible_crtcs,
const struct exynos_drm_plane_config *config); const struct exynos_drm_plane_config *config);
...@@ -407,7 +407,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data) ...@@ -407,7 +407,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
plane_config.type = vidi_win_types[i]; plane_config.type = vidi_win_types[i];
ret = exynos_plane_init(drm_dev, &ctx->planes[i], i, ret = exynos_plane_init(drm_dev, &ctx->planes[i], i,
1 << ctx->pipe, &plane_config); &plane_config);
if (ret) if (ret)
return ret; return ret;
} }
......
...@@ -1154,7 +1154,7 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data) ...@@ -1154,7 +1154,7 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data)
continue; continue;
ret = exynos_plane_init(drm_dev, &ctx->planes[i], i, ret = exynos_plane_init(drm_dev, &ctx->planes[i], i,
1 << ctx->pipe, &plane_configs[i]); &plane_configs[i]);
if (ret) if (ret)
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment