Skip to contentSkip to conversation

drm/meson: handle when meson_canvas_get returns -EPROBE_DEFER

PATCH In review Neil Armstrong 2 participants 2 messages Feb 4, 2019 – Mar 11, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/meson: handle when meson_canvas_get returns -EPROBE_DEFER

When meson_canvas is not yet probed, meson_canvas_get returns -EPROBE_DEFER.

Handle this case but deferring the probe of the drm driver aswell.

Fixes 66cae477c380 ("drm/meson: Use optional canvas provider")
---
 drivers/gpu/drm/meson/meson_drv.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/meson/meson_drv.c +3 -0
index ef4afaadaf8d..17e55d63daff 100644
@@ -236,6 +236,9 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
 			meson_canvas_free(priv->canvas, priv->canvas_id_vd1_1);
 			goto free_drm;
 		}
+	} else if (PTR_ERR(priv->canvas) == -EPROBE_DEFER) {
+		ret = PTR_ERR(priv->canvas);
+		goto free_drm;
 	} else {
 		priv->canvas = NULL;
 
Signature · 1 line
2.20.1
#1 lore raw

Hi Neil,

Quoted 29 lines · Neil Armstrong

When meson_canvas is not yet probed, meson_canvas_get returns -EPROBE_DEFER.

Handle this case but deferring the probe of the drm driver aswell.

Fixes 66cae477c380 ("drm/meson: Use optional canvas provider")
---
 drivers/gpu/drm/meson/meson_drv.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/meson/meson_drv.c +3 -1
index ef4afaadaf8d..17e55d63daff 100644
@@ -236,6 +236,9 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
                        meson_canvas_free(priv->canvas, priv->canvas_id_vd1_1);
                        goto free_drm;
                }
+       } else if (PTR_ERR(priv->canvas) == -EPROBE_DEFER) {
+               ret = PTR_ERR(priv->canvas);
+               goto free_drm;
        } else {
                priv->canvas = NULL;
 
--

2.20.1

Quoted 4 lines

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

With the upcoming patch series that aims at removing the DMC register range from the DRM driver's control, this fix will be incorporated, although rewritten because of code modifications in this partilcular area.

Maxime