linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/msm: Only add available components
@ 2018-12-04 18:04 Douglas Anderson
  2018-12-04 20:19 ` Rob Clark
  0 siblings, 1 reply; 2+ messages in thread
From: Douglas Anderson @ 2018-12-04 18:04 UTC (permalink / raw)
  To: Rob Clark, Sean Paul
  Cc: linux-arm-msm, jcrouse, Jeykumar Sankaran, Douglas Anderson,
	linux-kernel, dri-devel, David Airlie, freedreno

When trying to get the display up on my sdm845 board I noticed that
the display wouldn't probe if I had the dsi1 node marked as "disabled"
even though my board doesn't use dsi1.  It looks like the msm code
adds all nodes to its list of components even if they are disabled.  I
believe this doesn't work because all registered components need to
come up before we finish probing.  Let's do like other DRM code and
only add available components.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

 drivers/gpu/drm/msm/msm_drv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index b1577e960889..0b828822117b 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -1190,8 +1190,10 @@ static int add_components_mdp(struct device *mdp_dev,
 		if (!intf)
 			continue;
 
-		drm_of_component_match_add(master_dev, matchptr, compare_of,
-					   intf);
+		if (of_device_is_available(intf))
+			drm_of_component_match_add(master_dev, matchptr,
+						   compare_of, intf);
+
 		of_node_put(intf);
 	}
 
-- 
2.20.0.rc1.387.gf8505762e3-goog


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

* Re: [PATCH] drm/msm: Only add available components
  2018-12-04 18:04 [PATCH] drm/msm: Only add available components Douglas Anderson
@ 2018-12-04 20:19 ` Rob Clark
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Clark @ 2018-12-04 20:19 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Sean Paul, linux-arm-msm, Jordan Crouse, Jeykumar Sankaran,
	Linux Kernel Mailing List, dri-devel, David Airlie, freedreno

On Tue, Dec 4, 2018 at 1:04 PM Douglas Anderson <dianders@chromium.org> wrote:
>
> When trying to get the display up on my sdm845 board I noticed that
> the display wouldn't probe if I had the dsi1 node marked as "disabled"
> even though my board doesn't use dsi1.  It looks like the msm code
> adds all nodes to its list of components even if they are disabled.  I
> believe this doesn't work because all registered components need to
> come up before we finish probing.  Let's do like other DRM code and
> only add available components.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>


yeah, that seems like a reasonable thing to do

Reviewed-by: Rob Clark <robdclark@gmail.com>

> ---
>
>  drivers/gpu/drm/msm/msm_drv.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index b1577e960889..0b828822117b 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -1190,8 +1190,10 @@ static int add_components_mdp(struct device *mdp_dev,
>                 if (!intf)
>                         continue;
>
> -               drm_of_component_match_add(master_dev, matchptr, compare_of,
> -                                          intf);
> +               if (of_device_is_available(intf))
> +                       drm_of_component_match_add(master_dev, matchptr,
> +                                                  compare_of, intf);
> +
>                 of_node_put(intf);
>         }
>
> --
> 2.20.0.rc1.387.gf8505762e3-goog
>

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

end of thread, other threads:[~2018-12-04 20:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04 18:04 [PATCH] drm/msm: Only add available components Douglas Anderson
2018-12-04 20:19 ` Rob Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).