mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Konrad Dybcio <konradybcio@kernel.org>
Cc: Rob Clark <robin.clark@oss.qualcomm.com>,
	Dmitry Baryshkov <lumag@kernel.org>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Rajendra Nayak <quic_rjendra@quicinc.com>,
	Matthias Kaehlcke <mka@chromium.org>,
	Sravanthi Kollukuduru <skolluku@codeaurora.org>,
	Rajesh Yadav <ryadav@codeaurora.org>,
	Chandan Uddaraju <chandanu@codeaurora.org>,
	Jeykumar Sankaran <jsanka@codeaurora.org>,
	Vara Reddy <quic_varar@quicinc.com>,
	Stephen Boyd <swboyd@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	Kuogee Hsieh <quic_khsieh@quicinc.com>,
	Archit Taneja <architt@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Tanmay Shah <tanmay@codeaurora.org>
Subject: Re: [PATCH 1/3] drm/msm/dpu: Drop sneaky dev_pm_opp_set_rate(0)
Date: Tue, 28 Jul 2026 18:40:42 +0200	[thread overview]
Message-ID: <28a1cf31-1edf-4980-90c4-a3bd89b638f5@oss.qualcomm.com> (raw)
In-Reply-To: <twedkppa74qxgbphy4xqhreb4a4s524jfjuzaqydtizeutpjql@tht3pklgptp7>

On 7/28/26 3:57 PM, Dmitry Baryshkov wrote:
> On Tue, Jul 28, 2026 at 03:20:45PM +0200, Konrad Dybcio wrote:
>> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>
>> dev_pm_opp_set_rate(0) removes the vote specified in required-opps but
>> does not actually park the clock, making it run without the necessary
>> power backing. Prevent that from happening when
>> _dpu_core_perf_get_core_clk_rate() returns 0.
>>
>> Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>> ---
>>  drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
>> index 2ff255d7795e..fea173e37464 100644
>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
>> @@ -394,6 +394,10 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
>>  
>>  		trace_dpu_core_perf_update_clk(kms->dev, !crtc->enabled, clk_rate);
>>  
>> +		/* If we're going offline, PM callbacks will disable the clocks instead */
>> +		if (!clk_rate)
>> +			return 0;
> 
> Is 0 here an actual case? If it is coming from the core_perf, then the
> next line will handle it.

Yes it is (upon suspend) and it will not be handled because it's a min()
and not a max() below

Konrad

> 
>> +
>>  		clk_rate = min(clk_rate, kms->perf.max_core_clk_rate);
>>  		ret = dev_pm_opp_set_rate(&kms->pdev->dev, clk_rate);
>>  		if (ret) {
>>
>> -- 
>> 2.55.0
>>
> 

  reply	other threads:[~2026-07-28 16:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 13:20 [PATCH 0/3] Remove brownout risks from DPU Konrad Dybcio
2026-07-28 13:20 ` [PATCH 1/3] drm/msm/dpu: Drop sneaky dev_pm_opp_set_rate(0) Konrad Dybcio
2026-07-28 13:57   ` Dmitry Baryshkov
2026-07-28 16:40     ` Konrad Dybcio [this message]
2026-07-28 13:20 ` [PATCH 2/3] drm/msm/dp: Drop dev_pm_opp_set_rate(0) Konrad Dybcio
2026-07-28 13:56   ` Dmitry Baryshkov
2026-07-28 13:20 ` [PATCH 3/3] drm/msm/dsi: " Konrad Dybcio
2026-07-28 13:55   ` Dmitry Baryshkov

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=28a1cf31-1edf-4980-90c4-a3bd89b638f5@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=architt@codeaurora.org \
    --cc=chandanu@codeaurora.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=groeck@chromium.org \
    --cc=jesszhan0024@gmail.com \
    --cc=jsanka@codeaurora.org \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=mka@chromium.org \
    --cc=quic_khsieh@quicinc.com \
    --cc=quic_rjendra@quicinc.com \
    --cc=quic_varar@quicinc.com \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=ryadav@codeaurora.org \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=skolluku@codeaurora.org \
    --cc=swboyd@chromium.org \
    --cc=tanmay@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

all inboxes | Powered by JetHome®