Linux-Amlogic Archive on lore.kernel.org
 help / Atom feed
* [PATCH] drm/meson: handle when meson_canvas_get returns -EPROBE_DEFER
@ 2019-02-04  9:55 Neil Armstrong
  2019-03-11  9:58 ` Maxime Jourdan
  0 siblings, 1 reply; 2+ messages in thread
From: Neil Armstrong @ 2019-02-04  9:55 UTC (permalink / raw)
  To: daniel
  Cc: linux-amlogic, linux-kernel, linux-arm-kernel, dri-devel, 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")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/gpu/drm/meson/meson_drv.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
index ef4afaadaf8d..17e55d63daff 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/meson: handle when meson_canvas_get returns -EPROBE_DEFER
  2019-02-04  9:55 [PATCH] drm/meson: handle when meson_canvas_get returns -EPROBE_DEFER Neil Armstrong
@ 2019-03-11  9:58 ` Maxime Jourdan
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Jourdan @ 2019-03-11  9:58 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: linux-arm-kernel, linux-amlogic, dri-devel, linux-kernel, daniel

Hi Neil,
On Mon, Feb 4, 2019 at 10:55 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> 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")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
>  drivers/gpu/drm/meson/meson_drv.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index ef4afaadaf8d..17e55d63daff 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -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
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> 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

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04  9:55 [PATCH] drm/meson: handle when meson_canvas_get returns -EPROBE_DEFER Neil Armstrong
2019-03-11  9:58 ` Maxime Jourdan

Linux-Amlogic Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-amlogic/0 linux-amlogic/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-amlogic linux-amlogic/ https://lore.kernel.org/linux-amlogic \
		linux-amlogic@lists.infradead.org linux-amlogic@archiver.kernel.org
	public-inbox-index linux-amlogic


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-amlogic


AGPL code for this site: git clone https://public-inbox.org/ public-inbox