[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA8EJpr2rw4eSA+PViW7UZ2rVLLDS+ipcuo-1dzOargTcbE2hA@mail.gmail.com>
Date: Mon, 14 Mar 2022 22:25:44 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Vinod Polimera <quic_vpolimer@...cinc.com>
Cc: dri-devel@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org,
freedreno@...ts.freedesktop.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, robdclark@...il.com,
dianders@...omium.org, quic_kalyant@...cinc.com
Subject: Re: [PATCH v6 1/5] drm/msm/disp/dpu1: set mdp clk to the maximum
frequency in opp table during probe
On Mon, 14 Mar 2022 at 17:47, Vinod Polimera <quic_vpolimer@...cinc.com> wrote:
>
> use max clock during probe/bind sequence from the opp table.
> The clock will be scaled down when framework sends an update.
>
> Fixes: 25fdd5933("drm/msm: Add SDM845 DPU support")
> Signed-off-by: Vinod Polimera <quic_vpolimer@...cinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> index e29796c..9c346ce 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> @@ -1202,7 +1202,9 @@ static int dpu_bind(struct device *dev, struct device *master, void *data)
> struct platform_device *pdev = to_platform_device(dev);
> struct drm_device *ddev = priv->dev;
> struct dpu_kms *dpu_kms;
> + struct dev_pm_opp *opp;
> int ret = 0;
> + unsigned long max_freq = ULONG_MAX;
>
> dpu_kms = devm_kzalloc(&pdev->dev, sizeof(*dpu_kms), GFP_KERNEL);
> if (!dpu_kms)
> @@ -1225,6 +1227,12 @@ static int dpu_bind(struct device *dev, struct device *master, void *data)
> }
> dpu_kms->num_clocks = ret;
>
> + opp = dev_pm_opp_find_freq_floor(dev, &max_freq);
> + if (!IS_ERR(opp))
> + dev_pm_opp_put(opp);
> +
> + dev_pm_opp_set_rate(dev, max_freq);
> +
> platform_set_drvdata(pdev, dpu_kms);
>
> ret = msm_kms_init(&dpu_kms->base, &kms_funcs);
> --
> 2.7.4
>
--
With best wishes
Dmitry
Powered by blists - more mailing lists