Skip to content

Commit

Permalink
drm/exynos: Use drm_encoder_mask()
Browse files Browse the repository at this point in the history
Replace the hand rolled encoder bitmask thing with drm_encoder_mask()

Cc: Inki Dae <[email protected]>
Cc: Joonyoung Shim <[email protected]>
Cc: Seung-Woo Kim <[email protected]>
Cc: Kyungmin Park <[email protected]>
Acked-by: Thomas Zimmermann <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
  • Loading branch information
vsyrjala authored and daeinki committed Mar 18, 2020
1 parent 69ddce0 commit 2d6bf60
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/gpu/drm/exynos/exynos_drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ static int exynos_drm_bind(struct device *dev)
struct drm_encoder *encoder;
struct drm_device *drm;
unsigned int clone_mask;
int cnt, ret;
int ret;

drm = drm_dev_alloc(&exynos_drm_driver, dev);
if (IS_ERR(drm))
Expand All @@ -293,10 +293,9 @@ static int exynos_drm_bind(struct device *dev)
exynos_drm_mode_config_init(drm);

/* setup possible_clones. */
cnt = 0;
clone_mask = 0;
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)
encoder->possible_clones = clone_mask;
Expand Down

0 comments on commit 2d6bf60

Please sign in to comment.