Skip to content

Commit 908656d

Browse files
mark1188-uiMatthewCroughan
authored andcommitted
drm/hisilicon/hibmc: fix dp and vga cannot show together
If VGA and DP connected together, there will be only one can get crtc. Add encoder possible_clones to support two connectors enable. Fixes: 3c7623f ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature") Signed-off-by: Baihan Li <[email protected]> Signed-off-by: Yongbang Shi <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 4217298 commit 908656d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ static const struct drm_mode_config_funcs hibmc_mode_funcs = {
115115
static int hibmc_kms_init(struct hibmc_drm_private *priv)
116116
{
117117
struct drm_device *dev = &priv->dev;
118+
struct drm_encoder *encoder;
119+
u32 clone_mask = 0;
118120
int ret;
119121

120122
ret = drmm_mode_config_init(dev);
@@ -154,6 +156,12 @@ static int hibmc_kms_init(struct hibmc_drm_private *priv)
154156
return ret;
155157
}
156158

159+
drm_for_each_encoder(encoder, dev)
160+
clone_mask |= drm_encoder_mask(encoder);
161+
162+
drm_for_each_encoder(encoder, dev)
163+
encoder->possible_clones = clone_mask;
164+
157165
return 0;
158166
}
159167

0 commit comments

Comments
 (0)