Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Stephen Boyd <swboyd@chromium.org>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org,
	Marijn Suijten <marijn.suijten@somainline.org>,
	Yassine Oudjana <y.oudjana@protonmail.com>
Subject: Re: [RFC PATCH] drm/msm: lookup the ICC paths in both mdp5/dpu and mdss devices
Date: Fri, 26 Aug 2022 12:18:07 +0300	[thread overview]
Message-ID: <1a415bc7-d521-3c13-e61d-26211c00a165@linaro.org> (raw)
In-Reply-To: <CAE-0n51XQEoi-+6njQaz3oR=wMwe+WVnqA1PApmZDuQ3-gjMqg@mail.gmail.com>

On 24/08/2022 00:31, Stephen Boyd wrote:
> Quoting Dmitry Baryshkov (2022-08-05 04:56:30)
>> diff --git a/drivers/gpu/drm/msm/msm_io_utils.c b/drivers/gpu/drm/msm/msm_io_utils.c
>> index 7b504617833a..d02cd29ce829 100644
>> --- a/drivers/gpu/drm/msm/msm_io_utils.c
>> +++ b/drivers/gpu/drm/msm/msm_io_utils.c
>> @@ -124,3 +126,23 @@ void msm_hrtimer_work_init(struct msm_hrtimer_work *work,
>>          work->worker = worker;
>>          kthread_init_work(&work->work, fn);
>>   }
>> +
>> +struct icc_path *msm_icc_get(struct device *dev, const char *name)
>> +{
>> +       struct device *mdss_dev = dev->parent;
>> +       struct icc_path *path;
>> +
>> +       path = of_icc_get(dev, name);
>> +       if (path)
>> +               return path;
>> +
>> +       /*
>> +        * If there are no interconnects attached to the corresponding device
>> +        * node, of_icc_get() will return NULL.
>> +        *
>> +        * If the MDP5/DPU device node doesn't have interconnects, lookup the
>> +        * path in the parent (MDSS) device.
>> +        */
>> +       return of_icc_get(mdss_dev, name);
> 
> Perhaps this would be better served by having another icc_get() API that
> looks in the device and also the parent? Or maybe there should be
> interconnect-ranges (similar to clock-ranges) so that interconnects can
> be mapped to child nodes in DT.

I was not sure how common this situation is, so I did not add the 
helper/API. Typically the driver knows exactly, which node has the 
interconnects. In our case this is complicated because we are 
effectively merging two different driver generations and two different 
bindings. Thus I suppose this situation is quite unique.


-- 
With best wishes
Dmitry


      reply	other threads:[~2022-08-26  9:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 11:56 [RFC PATCH] drm/msm: lookup the ICC paths in both mdp5/dpu and mdss devices Dmitry Baryshkov
2022-08-05 12:24 ` Marijn Suijten
2022-08-26  9:16   ` Dmitry Baryshkov
2022-10-19  9:13     ` Marijn Suijten
2022-10-19  9:27       ` Dmitry Baryshkov
2022-08-05 13:14 ` Yassine Oudjana
2022-08-23 21:31 ` Stephen Boyd
2022-08-26  9:18   ` Dmitry Baryshkov [this message]

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=1a415bc7-d521-3c13-e61d-26211c00a165@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=swboyd@chromium.org \
    --cc=y.oudjana@protonmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox