All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Archit Taneja <architt@codeaurora.org>
Cc: "Rob Clark" <robdclark@gmail.com>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/9] drm/msm: Drop the gpu binding
Date: Tue, 3 May 2016 07:42:08 -0500	[thread overview]
Message-ID: <CAL_JsqJJsdxW7a4cbGNs5oC6j-+Cq7+7rwh9W8D7OO+NJK351g@mail.gmail.com> (raw)
In-Reply-To: <1462273081-5814-3-git-send-email-architt@codeaurora.org>

On Tue, May 3, 2016 at 5:57 AM, Archit Taneja <architt@codeaurora.org> wrote:
> The driver currently identifies the GPU components it needs by parsing
> a phandle list from the 'gpus' DT property.
>
> This isn't the right binding to go with. So, for now, just search all
> device nodes and find the gpu node we need by parsing a list of
> compatible strings.
>
> Once we know how to link the kms and gpu drivers, we'll drop this method
> and use the correct binding.
>
> Signed-off-by: Archit Taneja <architt@codeaurora.org>
> ---
>  drivers/gpu/drm/msm/msm_drv.c | 26 +++++++++++++++++++-------
>  1 file changed, 19 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 30b8f3b..f717a69 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -1068,20 +1068,32 @@ static int compare_of(struct device *dev, void *data)
>         return dev->of_node == data;
>  }
>
> -static int add_components(struct device *dev, struct component_match **matchptr,
> -               const char *name)
> +static const char * const msm_compatible_gpus[] = {
> +       "qcom,adreno-3xx",
> +       "qcom,kgsl-3d0",
> +};
> +
> +/*
> + * We don't know what's the best binding to link the gpu with the drm device.
> + * Fow now, we just hunt for all the possible gpus that we support, and add them
> + * as components.
> + */
> +static int add_gpu_components(struct device *dev,
> +                             struct component_match **matchptr)
>  {
> -       struct device_node *np = dev->of_node;
>         unsigned i;
>
> -       for (i = 0; ; i++) {
> +       for (i = 0; i < ARRAY_SIZE(msm_compatible_gpus); i++) {

You can use of_find_matching_node() here instead of a loop.

Rob

  reply	other threads:[~2016-05-03 12:42 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 10:57 [PATCH 0/9] drm/msm: Fix issues with DT bindings Archit Taneja
2016-05-03 10:57 ` [PATCH 1/9] drm/msm: Get mdss components via parsing ports Archit Taneja
2016-05-03 10:57 ` [PATCH 2/9] drm/msm: Drop the gpu binding Archit Taneja
2016-05-03 12:42   ` Rob Herring [this message]
2016-05-04  6:45     ` Archit Taneja
2016-05-03 10:57 ` [PATCH 3/9] drm/msm/mdp: mdp4: Update LCDC/LVDS port parsing Archit Taneja
2016-05-03 13:50   ` Philipp Zabel
2016-05-03 10:57 ` [PATCH 4/9] dt-bindings: msm/mdp: Remove connector and gpu bindings Archit Taneja
2016-05-04 13:38   ` Rob Herring
2016-05-04 17:49     ` Archit Taneja
     [not found] ` <1462273081-5814-1-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-05-03 10:57   ` [PATCH 5/9] dt-bindings: msm/dsi: Some binding doc cleanups Archit Taneja
2016-05-03 14:05     ` Philipp Zabel
2016-05-04  8:11       ` Archit Taneja
2016-05-03 10:58   ` [PATCH 8/9] dt-bindings: msm/dsi: Modify port and PHY bindings Archit Taneja
2016-05-03 14:02     ` Philipp Zabel
2016-05-04  8:09       ` Archit Taneja
2016-05-03 10:57 ` [PATCH 6/9] drm/msm/dsi: Modify port parsing Archit Taneja
2016-05-03 10:57 ` [PATCH 7/9] drm/msm/dsi: Use generic PHY bindings Archit Taneja
2016-05-03 10:58 ` [PATCH 9/9] dt-bindings: msm/dsi: Add assigned clocks bindings Archit Taneja
2016-05-04 13:44   ` Rob Herring
2016-05-04 18:04     ` Archit Taneja
     [not found]       ` <572A39B7.5020008-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-05-11 14:08         ` Rob Herring
2016-06-10 10:46 ` [PATCH v2 00/10] drm/msm: Fix issues with DT bindings Archit Taneja
     [not found]   ` <1465555600-25742-1-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-06-10 10:46     ` [PATCH v2 01/10] drm/msm/mdp5: Don't get source of MDP core clock Archit Taneja
2016-06-10 10:46     ` [PATCH v2 03/10] dt-bindings: msm/mdp: Fix up clock related bindings Archit Taneja
2016-06-13 19:03       ` Rob Herring
2016-06-16  5:08         ` Archit Taneja
2016-06-10 10:46     ` [PATCH v2 07/10] dt-bindings: msm/dsi: Use standard data lanes binding Archit Taneja
2016-06-13 19:53       ` Rob Herring
2016-06-10 10:46     ` [PATCH v2 10/10] dt-bindings: msm/dsi: Some binding doc cleanups Archit Taneja
2016-06-14 12:33       ` Rob Herring
2016-06-10 10:46   ` [PATCH v2 02/10] drm/msm/mdp4: Clean up some MDP4 clocks Archit Taneja
2016-06-10 10:46   ` [PATCH v2 04/10] drm/msm/dsi: Modify port parsing Archit Taneja
2016-06-10 10:46   ` [PATCH v2 05/10] drm/msm/dsi: Use generic PHY bindings Archit Taneja
2016-06-10 10:46   ` [PATCH v2 06/10] drm/msm/dsi: Use a standard DT binding for data lanes Archit Taneja
2016-06-10 10:46   ` [PATCH v2 08/10] dt-bindings: msm/dsi: Modify port and PHY bindings Archit Taneja
2016-06-14 12:31     ` Rob Herring
2016-06-10 10:46   ` [PATCH v2 09/10] dt-bindings: msm/dsi: Add assigned clocks bindings Archit Taneja

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL_JsqJJsdxW7a4cbGNs5oC6j-+Cq7+7rwh9W8D7OO+NJK351g@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=architt@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robdclark@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.