devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <mka@chromium.org>
To: Sravanthi Kollukuduru <skolluku@codeaurora.org>
Cc: sean@poorly.run, devicetree@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	seanpaul@chromium.org, freedreno@lists.freedesktop.org
Subject: Re: [PATCH v2 2/3] drm/msm/dpu: Integrate interconnect API in MDSS
Date: Wed, 24 Oct 2018 09:39:23 -0700	[thread overview]
Message-ID: <20181024163923.GX22824@google.com> (raw)
In-Reply-To: <20181010092434.853-3-skolluku@codeaurora.org>

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.

>  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.

nit: names like avg_bw and peak_pw would be clearer than ab and ib,
without being excessively verbose.

Cheers

Matthias
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-10-24 16:39 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 [this message]
     [not found]       ` <20181024163923.GX22824-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2018-11-01  7:38         ` skolluku-sgV2jX0FEOL9JmXXK+q4OQ
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=20181024163923.GX22824@google.com \
    --to=mka@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=sean@poorly.run \
    --cc=seanpaul@chromium.org \
    --cc=skolluku@codeaurora.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).