Skip to content

Commit a805ce6

Browse files
committed
Merge branch 'mediatek-drm-fixes-4.20' of https://github.com/ckhu-mediatek/linux.git-tags into drm-fixes
Single bridge attachment fix. Signed-off-by: Dave Airlie <airlied@redhat.com> From: CK Hu <ck.hu@mediatek.com> Link: https://patchwork.freedesktop.org/patch/msgid/1544407975.18825.3.camel@mtksdaap41
2 parents 28adac6 + a0071bc commit a805ce6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

drivers/gpu/drm/mediatek/mtk_dsi.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -818,10 +818,13 @@ static int mtk_dsi_create_conn_enc(struct drm_device *drm, struct mtk_dsi *dsi)
818818
dsi->encoder.possible_crtcs = 1;
819819

820820
/* If there's a bridge, attach to it and let it create the connector */
821-
ret = drm_bridge_attach(&dsi->encoder, dsi->bridge, NULL);
822-
if (ret) {
823-
DRM_ERROR("Failed to attach bridge to drm\n");
824-
821+
if (dsi->bridge) {
822+
ret = drm_bridge_attach(&dsi->encoder, dsi->bridge, NULL);
823+
if (ret) {
824+
DRM_ERROR("Failed to attach bridge to drm\n");
825+
goto err_encoder_cleanup;
826+
}
827+
} else {
825828
/* Otherwise create our own connector and attach to a panel */
826829
ret = mtk_dsi_create_connector(drm, dsi);
827830
if (ret)

0 commit comments

Comments
 (0)