drm/vc4: Fix to wait for attach call and return as bind success 36/270736/1
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 8 Feb 2022 05:52:13 +0000 (14:52 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 8 Feb 2022 05:52:13 +0000 (14:52 +0900)
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 <hoegeun.kwon@samsung.com>
drivers/gpu/drm/vc4/vc4_dsi.c

index 8c6c5ce..27bd6c6 100644 (file)
@@ -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;
        }