All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	Stephen Boyd <swboyd@chromium.org>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Bjorn Andersson <andersson@kernel.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org,
	Konrad Dybcio <konrad.dybcio@linaro.org>
Subject: Re: [PATCH 2/8] drm/msm/dpu: drop performance tuning modes
Date: Tue, 4 Jul 2023 01:20:51 +0300	[thread overview]
Message-ID: <CAA8EJpo86WaDBPGMJiytqyuNYqUTqBfEmeKSLFYUvK6r82FKqA@mail.gmail.com> (raw)
In-Reply-To: <c278bf93-124c-5512-51af-042a0dcbd67b@quicinc.com>

On Tue, 4 Jul 2023 at 00:40, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>
>
>
> On 6/19/2023 5:08 PM, Dmitry Baryshkov wrote:
> > DPU performance module contains code to change performance state
> > calculations. In addition to normal (sum plane and CRTC requirements),
> > it can work in 'minimal' or 'fixed' modes. Both modes are impractical,
> > since they can easily end up with the display underruns. Userspace also
> > should not depend on these modes availability, since they are tuned
> > through debugfs, which might not be available.
> >
> > Drop relevant code to simplify performance state calculations.
> >
> > Suggested-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
>
> Sorry but NAK on this change for two reasons:
>
> This mode is not for usermode to depend on but for debugging. I have
> personally used both the perf max and perf min modes for debug.
>
> 1) The purpose is that, if you do see an underrun, you can force the
> perf mode as it will select max clk and bw rate
>
> So something like below:
>
> localhost /sys/kernel/debug/dri/1/debug/core_perf # echo 2 > perf_mode
> localhost /sys/kernel/debug/dri/1/debug/core_perf # echo 300000000 >
> fix_core_clk_rate
>
> This will allow us to force the clk to a particular value to see at what
> point it starts underruning
>
> Also you can even do
>
> localhost /sys/kernel/debug/dri/1/debug/core_perf # echo 1 > perf_mode
>
> This will automatically max out the clk and BW
>
> With this, you can figure out if underrun is a performance related
> underrun or a misconfiguration. We used it even recently to debug the
> performance issue with pclk reduction

Hmm, 1 is minimum, not maxumum.

>
> 2) Sometimes, you even want to force an underrun to debug devcoredump OR
> the recovery code. Forcing the min clk mode by doing
>
> localhost /sys/kernel/debug/dri/1/debug/core_perf # echo 19200000 >
> fix_core_clk_rate
> localhost /sys/kernel/debug/dri/1/debug/core_perf # echo 2 > perf_mode
>
> Is the easiest way to trigger the recovery handler.
>
> Hence I am not at all convinced of dropping this.

I see, thanks for sharing the usecases. However I still think that it
is overcomplicated for the debugging feature. What about dropping all
perf modes and providing just 'override_core_clk_rate' and
'override_avg_bw', 'override_peak_bw'?

-- 
With best wishes
Dmitry

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: freedreno@lists.freedesktop.org,
	Bjorn Andersson <andersson@kernel.org>,
	dri-devel@lists.freedesktop.org,
	Stephen Boyd <swboyd@chromium.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	linux-arm-msm@vger.kernel.org,
	Marijn Suijten <marijn.suijten@somainline.org>,
	Sean Paul <sean@poorly.run>
Subject: Re: [PATCH 2/8] drm/msm/dpu: drop performance tuning modes
Date: Tue, 4 Jul 2023 01:20:51 +0300	[thread overview]
Message-ID: <CAA8EJpo86WaDBPGMJiytqyuNYqUTqBfEmeKSLFYUvK6r82FKqA@mail.gmail.com> (raw)
In-Reply-To: <c278bf93-124c-5512-51af-042a0dcbd67b@quicinc.com>

On Tue, 4 Jul 2023 at 00:40, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>
>
>
> On 6/19/2023 5:08 PM, Dmitry Baryshkov wrote:
> > DPU performance module contains code to change performance state
> > calculations. In addition to normal (sum plane and CRTC requirements),
> > it can work in 'minimal' or 'fixed' modes. Both modes are impractical,
> > since they can easily end up with the display underruns. Userspace also
> > should not depend on these modes availability, since they are tuned
> > through debugfs, which might not be available.
> >
> > Drop relevant code to simplify performance state calculations.
> >
> > Suggested-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
>
> Sorry but NAK on this change for two reasons:
>
> This mode is not for usermode to depend on but for debugging. I have
> personally used both the perf max and perf min modes for debug.
>
> 1) The purpose is that, if you do see an underrun, you can force the
> perf mode as it will select max clk and bw rate
>
> So something like below:
>
> localhost /sys/kernel/debug/dri/1/debug/core_perf # echo 2 > perf_mode
> localhost /sys/kernel/debug/dri/1/debug/core_perf # echo 300000000 >
> fix_core_clk_rate
>
> This will allow us to force the clk to a particular value to see at what
> point it starts underruning
>
> Also you can even do
>
> localhost /sys/kernel/debug/dri/1/debug/core_perf # echo 1 > perf_mode
>
> This will automatically max out the clk and BW
>
> With this, you can figure out if underrun is a performance related
> underrun or a misconfiguration. We used it even recently to debug the
> performance issue with pclk reduction

Hmm, 1 is minimum, not maxumum.

>
> 2) Sometimes, you even want to force an underrun to debug devcoredump OR
> the recovery code. Forcing the min clk mode by doing
>
> localhost /sys/kernel/debug/dri/1/debug/core_perf # echo 19200000 >
> fix_core_clk_rate
> localhost /sys/kernel/debug/dri/1/debug/core_perf # echo 2 > perf_mode
>
> Is the easiest way to trigger the recovery handler.
>
> Hence I am not at all convinced of dropping this.

I see, thanks for sharing the usecases. However I still think that it
is overcomplicated for the debugging feature. What about dropping all
perf modes and providing just 'override_core_clk_rate' and
'override_avg_bw', 'override_peak_bw'?

-- 
With best wishes
Dmitry

  reply	other threads:[~2023-07-03 22:21 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20  0:08 [PATCH 0/8] drm/msm/dpu: cleanup dpu_core_perf module Dmitry Baryshkov
2023-06-20  0:08 ` Dmitry Baryshkov
2023-06-20  0:08 ` [PATCH 1/8] drm/msm/dpu: drop enum dpu_core_perf_data_bus_id Dmitry Baryshkov
2023-06-20  0:08   ` Dmitry Baryshkov
2023-06-20 10:35   ` Konrad Dybcio
2023-06-20 10:35     ` Konrad Dybcio
2023-07-03 21:30   ` Abhinav Kumar
2023-07-03 21:30     ` Abhinav Kumar
2023-06-20  0:08 ` [PATCH 2/8] drm/msm/dpu: drop performance tuning modes Dmitry Baryshkov
2023-06-20  0:08   ` Dmitry Baryshkov
2023-06-20 10:45   ` Konrad Dybcio
2023-06-20 10:45     ` Konrad Dybcio
2023-07-03 21:40   ` Abhinav Kumar
2023-07-03 21:40     ` Abhinav Kumar
2023-07-03 22:20     ` Dmitry Baryshkov [this message]
2023-07-03 22:20       ` Dmitry Baryshkov
2023-07-03 22:26       ` Abhinav Kumar
2023-07-03 22:26         ` Abhinav Kumar
2023-07-03 22:36         ` Dmitry Baryshkov
2023-07-03 22:36           ` Dmitry Baryshkov
2023-06-20  0:08 ` [PATCH 3/8] drm/msm/dpu: drop dpu_core_perf_params::max_per_pipe_ib Dmitry Baryshkov
2023-06-20  0:08   ` Dmitry Baryshkov
2023-06-20 10:46   ` Konrad Dybcio
2023-06-20 10:46     ` Konrad Dybcio
2023-06-20 10:53     ` Dmitry Baryshkov
2023-06-20 10:53       ` Dmitry Baryshkov
2023-07-03 21:53   ` Abhinav Kumar
2023-07-03 21:53     ` Abhinav Kumar
2023-06-20  0:08 ` [PATCH 4/8] drm/msm/dpu: rework indentation in dpu_core_perf Dmitry Baryshkov
2023-06-20  0:08   ` Dmitry Baryshkov
2023-06-20 10:47   ` Konrad Dybcio
2023-06-20 10:47     ` Konrad Dybcio
2023-07-03 22:01   ` Abhinav Kumar
2023-07-03 22:01     ` Abhinav Kumar
2023-06-20  0:08 ` [PATCH 5/8] drm/msm/dpu: drop the dpu_core_perf_crtc_update()'s stop_req param Dmitry Baryshkov
2023-06-20  0:08   ` Dmitry Baryshkov
2023-07-03 22:37   ` Abhinav Kumar
2023-07-03 22:37     ` Abhinav Kumar
2023-07-03 22:53     ` Dmitry Baryshkov
2023-07-03 22:53       ` Dmitry Baryshkov
2023-07-03 22:55       ` Abhinav Kumar
2023-07-03 22:55         ` Abhinav Kumar
2023-07-03 23:01         ` Dmitry Baryshkov
2023-07-03 23:01           ` Dmitry Baryshkov
2023-07-03 23:16           ` Abhinav Kumar
2023-07-03 23:16             ` Abhinav Kumar
2023-07-04  0:28             ` Dmitry Baryshkov
2023-07-04  0:28               ` Dmitry Baryshkov
2023-07-04  0:31               ` Abhinav Kumar
2023-07-04  0:31                 ` Abhinav Kumar
2023-06-20  0:08 ` [PATCH 6/8] drm/msm/dpu: use dpu_perf_cfg in DPU core_perf code Dmitry Baryshkov
2023-06-20  0:08   ` Dmitry Baryshkov
2023-06-20 10:55   ` Konrad Dybcio
2023-06-20 10:55     ` Konrad Dybcio
2023-06-20 11:18     ` Dmitry Baryshkov
2023-06-20 11:18       ` Dmitry Baryshkov
2023-06-20 11:31       ` Konrad Dybcio
2023-06-20 11:31         ` Konrad Dybcio
2023-07-04  0:46         ` Abhinav Kumar
2023-07-04  0:46           ` Abhinav Kumar
2023-06-20  0:08 ` [PATCH 7/8] drm/msm/dpu: drop dpu_core_perf_destroy() Dmitry Baryshkov
2023-06-20  0:08   ` Dmitry Baryshkov
2023-06-20 10:56   ` Konrad Dybcio
2023-06-20 10:56     ` Konrad Dybcio
2023-07-03 22:57   ` Abhinav Kumar
2023-07-03 22:57     ` Abhinav Kumar
2023-07-03 22:59     ` Dmitry Baryshkov
2023-07-03 22:59       ` Dmitry Baryshkov
2023-07-04  0:19       ` Abhinav Kumar
2023-07-04  0:19         ` Abhinav Kumar
2023-07-04 14:31         ` Dmitry Baryshkov
2023-07-04 14:31           ` Dmitry Baryshkov
2023-06-20  0:08 ` [PATCH 8/8] drm/msm/dpu: remove unused fields from struct dpu_core_perf Dmitry Baryshkov
2023-06-20  0:08   ` Dmitry Baryshkov
2023-06-20 10:56   ` Konrad Dybcio
2023-06-20 10:56     ` Konrad Dybcio
2023-07-04  0:25   ` Abhinav Kumar
2023-07-04  0:25     ` Abhinav Kumar

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=CAA8EJpo86WaDBPGMJiytqyuNYqUTqBfEmeKSLFYUvK6r82FKqA@mail.gmail.com \
    --to=dmitry.baryshkov@linaro.org \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=konrad.dybcio@linaro.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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.