From: Hoegeun Kwon Date: Tue, 8 Feb 2022 05:52:13 +0000 (+0900) Subject: drm/vc4: Fix to wait for attach call and return as bind success X-Git-Tag: submit/tizen/20220208.074352~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F270736%2F1;p=platform%2Fkernel%2Flinux-rpi.git drm/vc4: Fix to wait for attach call and return as bind success If the panel is not connected, the attach function is not called and a bridge node is not created. In Tizen, dsi_bind operates as drm vc4 when dsi_bind is normally terminated. After waiting 5 attach calls, dsi_bind returns to success. Change-Id: I89b29752d63f5152415df3327cb47790d1b03979 Signed-off-by: Hoegeun Kwon --- diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c index 8c6c5ce..27bd6c6 100644 --- a/drivers/gpu/drm/vc4/vc4_dsi.c +++ b/drivers/gpu/drm/vc4/vc4_dsi.c @@ -1558,6 +1558,7 @@ static int vc4_dsi_bind(struct device *dev, struct device *master, void *data) struct drm_panel *panel; const struct of_device_id *match; dma_cap_mask_t dma_mask; + static int attach_cnt = 5; int ret; match = of_match_device(vc4_dsi_dt_match, dev); @@ -1680,6 +1681,8 @@ static int vc4_dsi_bind(struct device *dev, struct device *master, void *data) if (ret == -ENODEV) return 0; + if (!--attach_cnt) + ret = 0; goto err_free_dma; }