Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>

authored by

Andrzej Hajda and committed by
Inki Dae
2c82607b f44d3d2f

+7 -9
+1 -1
drivers/gpu/drm/exynos/exynos5433_drm_decon.c
··· 604 604 ctx->configs[win].type = decon_win_types[tmp]; 605 605 606 606 ret = exynos_plane_init(drm_dev, &ctx->planes[win], win, 607 - 1 << ctx->pipe, &ctx->configs[win]); 607 + &ctx->configs[win]); 608 608 if (ret) 609 609 return ret; 610 610 }
+1 -1
drivers/gpu/drm/exynos/exynos7_drm_decon.c
··· 642 642 ctx->configs[i].type = decon_win_types[i]; 643 643 644 644 ret = exynos_plane_init(drm_dev, &ctx->planes[i], i, 645 - 1 << ctx->pipe, &ctx->configs[i]); 645 + &ctx->configs[i]); 646 646 if (ret) 647 647 return ret; 648 648 }
+1 -1
drivers/gpu/drm/exynos/exynos_drm_fimd.c
··· 995 995 ctx->configs[i].zpos = i; 996 996 ctx->configs[i].type = fimd_win_types[i]; 997 997 ret = exynos_plane_init(drm_dev, &ctx->planes[i], i, 998 - 1 << ctx->pipe, &ctx->configs[i]); 998 + &ctx->configs[i]); 999 999 if (ret) 1000 1000 return ret; 1001 1001 }
+2 -3
drivers/gpu/drm/exynos/exynos_drm_plane.c
··· 273 273 } 274 274 275 275 int exynos_plane_init(struct drm_device *dev, 276 - struct exynos_drm_plane *exynos_plane, 277 - unsigned int index, unsigned long possible_crtcs, 276 + struct exynos_drm_plane *exynos_plane, unsigned int index, 278 277 const struct exynos_drm_plane_config *config) 279 278 { 280 279 int err; 281 280 282 281 err = drm_universal_plane_init(dev, &exynos_plane->base, 283 - possible_crtcs, 282 + 1 << dev->mode_config.num_crtc, 284 283 &exynos_plane_funcs, 285 284 config->pixel_formats, 286 285 config->num_pixel_formats,
-1
drivers/gpu/drm/exynos/exynos_drm_plane.h
··· 11 11 12 12 int exynos_plane_init(struct drm_device *dev, 13 13 struct exynos_drm_plane *exynos_plane, unsigned int index, 14 - unsigned long possible_crtcs, 15 14 const struct exynos_drm_plane_config *config);
+1 -1
drivers/gpu/drm/exynos/exynos_drm_vidi.c
··· 407 407 plane_config.type = vidi_win_types[i]; 408 408 409 409 ret = exynos_plane_init(drm_dev, &ctx->planes[i], i, 410 - 1 << ctx->pipe, &plane_config); 410 + &plane_config); 411 411 if (ret) 412 412 return ret; 413 413 }
+1 -1
drivers/gpu/drm/exynos/exynos_mixer.c
··· 1154 1154 continue; 1155 1155 1156 1156 ret = exynos_plane_init(drm_dev, &ctx->planes[i], i, 1157 - 1 << ctx->pipe, &plane_configs[i]); 1157 + &plane_configs[i]); 1158 1158 if (ret) 1159 1159 return ret; 1160 1160 }