Skip to content

Commit a4e0ea5

Browse files
mark1188-uigregkh
authored andcommitted
drm/hisilicon/hibmc: fix dp and vga cannot show together
[ Upstream commit 3271faf ] 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 <libaihan@huawei.com> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250813094238.3722345-8-shiyongbang@huawei.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent ccda4b7 commit a4e0ea5

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)