devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
To: Matthias Kaehlcke <mka-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org
Subject: Re: [PATCH v2 2/3] drm/msm/dpu: Integrate interconnect API in MDSS
Date: Thu, 01 Nov 2018 13:08:53 +0530	[thread overview]
Message-ID: <15faacdbde81194192e5aac8dd44f7d9@codeaurora.org> (raw)
In-Reply-To: <20181024163923.GX22824-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>

On 2018-10-24 22:09, Matthias Kaehlcke wrote:
> Hi Sravanthi,
> 
> On Wed, Oct 10, 2018 at 02:54:33PM +0530, Sravanthi Kollukuduru wrote:
>> The interconnect framework is designed to provide a
>> standard kernel interface to control the settings of
>> the interconnects on a SoC.
>> 
>> The interconnect API uses a consumer/provider-based model,
>> where the providers are the interconnect buses and the
>> consumers could be various drivers.
>> 
>> MDSS is one of the interconnect consumers which uses the
>> interconnect APIs to get the path between endpoints and
>> set its bandwidth/latency/QoS requirements for the given
>> interconnected path.
>> 
>> Changes in v2:
>> 	- Remove error log and unnecessary check (Jordan Crouse)
>> 
>> Signed-off-by: Sravanthi Kollukuduru <skolluku@codeaurora.org>
>> ---
>>  drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 50 
>> +++++++++++++++++++++++++++++---
>>  1 file changed, 46 insertions(+), 4 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c 
>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
>> index 2235ef8129f4..27c2594e5133 100644
>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c
>> @@ -4,6 +4,7 @@
>>   */
>> 
>>  #include "dpu_kms.h"
>> +#include <linux/interconnect.h>
>> 
>>  #define to_dpu_mdss(x) container_of(x, struct dpu_mdss, base)
>> 
>> @@ -16,8 +17,33 @@ struct dpu_mdss {
>>  	u32 hwversion;
>>  	struct dss_module_power mp;
>>  	struct dpu_irq_controller irq_controller;
>> +	struct icc_path *path[2];
>> +	u32 num_paths;
>>  };
>> 
>> +static int dpu_mdss_parse_data_bus_icc_path(
>> +		struct drm_device *dev, struct dpu_mdss *dpu_mdss)
>> +{
>> +	struct icc_path *path0 = of_icc_get(dev->dev, "port0");
>> +	struct icc_path *path1 = of_icc_get(dev->dev, "port1");
>> +	int total_num_paths  = 0;
> 
> initialization is not needed
> 
> nit: the 'total_' prefix doesn't add any value here, just 'num_paths'
> would be easier to parse. Actually you could get rid of the variable
> completely by just initializing and incrementing dpu_mdss->num_paths.
> 
Okay.
>>  static irqreturn_t dpu_mdss_irq(int irq, void *arg)
>>  {
>>  	struct dpu_mdss *dpu_mdss = arg;
>> @@ -127,7 +153,12 @@ static int dpu_mdss_enable(struct msm_mdss *mdss)
>>  {
>>  	struct dpu_mdss *dpu_mdss = to_dpu_mdss(mdss);
>>  	struct dss_module_power *mp = &dpu_mdss->mp;
>> -	int ret;
>> +	int ret, i;
>> +	u64 ab = (dpu_mdss->num_paths) ? 6800000000/dpu_mdss->num_paths : 0;
> 
> parentheses are not needed
> 
>> +	u64 ib = 6800000000;
> 
> There should probably be a define for 6800000000.
> 
Okay.
> nit: names like avg_bw and peak_pw would be clearer than ab and ib,
> without being excessively verbose.
> 
Sure, will make the changes.

> Cheers
> 
> Matthias
> _______________________________________________
> Freedreno mailing list
> Freedreno@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/freedreno
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

  parent reply	other threads:[~2018-11-01  7:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10  9:24 [PATCH v2 0/3] Use interconnect API in MDSS on SDM845 Sravanthi Kollukuduru
     [not found] ` <20181010092434.853-1-skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-10-10  9:24   ` [PATCH v2 1/3] drm/msm/dpu: clean up references of DPU custom bus scaling Sravanthi Kollukuduru
     [not found]     ` <20181010092434.853-2-skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-14 15:49       ` Sean Paul
2018-11-15 12:22         ` skolluku-sgV2jX0FEOL9JmXXK+q4OQ
2018-10-10  9:24   ` [PATCH v2 2/3] drm/msm/dpu: Integrate interconnect API in MDSS Sravanthi Kollukuduru
2018-10-24 16:39     ` Matthias Kaehlcke
     [not found]       ` <20181024163923.GX22824-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2018-11-01  7:38         ` skolluku-sgV2jX0FEOL9JmXXK+q4OQ [this message]
2018-10-10  9:24   ` [PATCH v2 3/3] dt-bindings: msm/disp: Introduce interconnect bindings for MDSS on SDM845 Sravanthi Kollukuduru
     [not found]     ` <20181010092434.853-4-skolluku-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-10-12 22:12       ` Rob Herring

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=15faacdbde81194192e5aac8dd44f7d9@codeaurora.org \
    --to=skolluku-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mka-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org \
    --cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).