Commit 2d6bf60d authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Inki Dae

drm/exynos: Use drm_encoder_mask()

Replace the hand rolled encoder bitmask thing with drm_encoder_mask()

Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 69ddce09
...@@ -270,7 +270,7 @@ static int exynos_drm_bind(struct device *dev) ...@@ -270,7 +270,7 @@ static int exynos_drm_bind(struct device *dev)
struct drm_encoder *encoder; struct drm_encoder *encoder;
struct drm_device *drm; struct drm_device *drm;
unsigned int clone_mask; unsigned int clone_mask;
int cnt, ret; int ret;
drm = drm_dev_alloc(&exynos_drm_driver, dev); drm = drm_dev_alloc(&exynos_drm_driver, dev);
if (IS_ERR(drm)) if (IS_ERR(drm))
...@@ -293,10 +293,9 @@ static int exynos_drm_bind(struct device *dev) ...@@ -293,10 +293,9 @@ static int exynos_drm_bind(struct device *dev)
exynos_drm_mode_config_init(drm); exynos_drm_mode_config_init(drm);
/* setup possible_clones. */ /* setup possible_clones. */
cnt = 0;
clone_mask = 0; clone_mask = 0;
list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) list_for_each_entry(encoder, &drm->mode_config.encoder_list, head)
clone_mask |= (1 << (cnt++)); clone_mask |= drm_encoder_mask(encoder);
list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) list_for_each_entry(encoder, &drm->mode_config.encoder_list, head)
encoder->possible_clones = clone_mask; encoder->possible_clones = clone_mask;
......
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