* [PATCH] drm/msm/dpu: fix clock scaling on non-sc7180 board
@ 2020-10-27 10:23 ` Dmitry Baryshkov
0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2020-10-27 10:23 UTC (permalink / raw)
To: Rob Clark, Sean Paul
Cc: David Airlie, linux-arm-msm, dri-devel, Kalyan Thota, freedreno
c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for
display") has added support for handling bandwidth voting in kms path in
addition to old mdss path. However this broke all other platforms since
_dpu_core_perf_crtc_update_bus() will now error out instead of properly
calculating bandwidth and core clocks. Fix
_dpu_core_perf_crtc_update_bus() to just skip bandwidth setting instead
of returning an error in case kms->num_paths == 0 (MDSS is used for
bandwidth management).
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fixes: c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for display")
---
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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 393858ef8a83..37c8270681c2 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
@@ -219,9 +219,6 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms,
int i, ret = 0;
u64 avg_bw;
- if (!kms->num_paths)
- return -EINVAL;
-
drm_for_each_crtc(tmp_crtc, crtc->dev) {
if (tmp_crtc->enabled &&
curr_client_type ==
@@ -239,6 +236,9 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms,
}
}
+ if (!kms->num_paths)
+ return 0;
+
avg_bw = perf.bw_ctl;
do_div(avg_bw, (kms->num_paths * 1000)); /*Bps_to_icc*/
--
2.28.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [Freedreno] [PATCH] drm/msm/dpu: fix clock scaling on non-sc7180 board
2020-10-27 10:23 ` Dmitry Baryshkov
@ 2020-10-27 18:49 ` abhinavk
-1 siblings, 0 replies; 7+ messages in thread
From: abhinavk @ 2020-10-27 18:49 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Rob Clark, Sean Paul, David Airlie, linux-arm-msm, dri-devel,
Daniel Vetter, Kalyan Thota, freedreno
On 2020-10-27 03:23, Dmitry Baryshkov wrote:
> c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for
> display") has added support for handling bandwidth voting in kms path
> in
> addition to old mdss path. However this broke all other platforms since
> _dpu_core_perf_crtc_update_bus() will now error out instead of properly
> calculating bandwidth and core clocks. Fix
> _dpu_core_perf_crtc_update_bus() to just skip bandwidth setting instead
> of returning an error in case kms->num_paths == 0 (MDSS is used for
> bandwidth management).
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Fixes: c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling
> for display")
> ---
Looks fine to me, thanks for the fix.
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
> drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> 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 393858ef8a83..37c8270681c2 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
> @@ -219,9 +219,6 @@ static int _dpu_core_perf_crtc_update_bus(struct
> dpu_kms *kms,
> int i, ret = 0;
> u64 avg_bw;
>
> - if (!kms->num_paths)
> - return -EINVAL;
> -
> drm_for_each_crtc(tmp_crtc, crtc->dev) {
> if (tmp_crtc->enabled &&
> curr_client_type ==
> @@ -239,6 +236,9 @@ static int _dpu_core_perf_crtc_update_bus(struct
> dpu_kms *kms,
> }
> }
>
> + if (!kms->num_paths)
> + return 0;
> +
> avg_bw = perf.bw_ctl;
> do_div(avg_bw, (kms->num_paths * 1000)); /*Bps_to_icc*/
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Freedreno] [PATCH] drm/msm/dpu: fix clock scaling on non-sc7180 board
@ 2020-10-27 18:49 ` abhinavk
0 siblings, 0 replies; 7+ messages in thread
From: abhinavk @ 2020-10-27 18:49 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: freedreno, David Airlie, linux-arm-msm, dri-devel, Kalyan Thota,
Sean Paul
On 2020-10-27 03:23, Dmitry Baryshkov wrote:
> c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for
> display") has added support for handling bandwidth voting in kms path
> in
> addition to old mdss path. However this broke all other platforms since
> _dpu_core_perf_crtc_update_bus() will now error out instead of properly
> calculating bandwidth and core clocks. Fix
> _dpu_core_perf_crtc_update_bus() to just skip bandwidth setting instead
> of returning an error in case kms->num_paths == 0 (MDSS is used for
> bandwidth management).
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Fixes: c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling
> for display")
> ---
Looks fine to me, thanks for the fix.
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
> drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> 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 393858ef8a83..37c8270681c2 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
> @@ -219,9 +219,6 @@ static int _dpu_core_perf_crtc_update_bus(struct
> dpu_kms *kms,
> int i, ret = 0;
> u64 avg_bw;
>
> - if (!kms->num_paths)
> - return -EINVAL;
> -
> drm_for_each_crtc(tmp_crtc, crtc->dev) {
> if (tmp_crtc->enabled &&
> curr_client_type ==
> @@ -239,6 +236,9 @@ static int _dpu_core_perf_crtc_update_bus(struct
> dpu_kms *kms,
> }
> }
>
> + if (!kms->num_paths)
> + return 0;
> +
> avg_bw = perf.bw_ctl;
> do_div(avg_bw, (kms->num_paths * 1000)); /*Bps_to_icc*/
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/msm/dpu: fix clock scaling on non-sc7180 board
2020-10-27 10:23 ` Dmitry Baryshkov
@ 2020-11-02 18:21 ` Bjorn Andersson
-1 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2020-11-02 18:21 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Rob Clark, Sean Paul, David Airlie, Daniel Vetter, linux-arm-msm,
dri-devel, freedreno, Kalyan Thota
On Tue 27 Oct 05:23 CDT 2020, Dmitry Baryshkov wrote:
> c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for
> display") has added support for handling bandwidth voting in kms path in
> addition to old mdss path. However this broke all other platforms since
> _dpu_core_perf_crtc_update_bus() will now error out instead of properly
> calculating bandwidth and core clocks. Fix
> _dpu_core_perf_crtc_update_bus() to just skip bandwidth setting instead
> of returning an error in case kms->num_paths == 0 (MDSS is used for
> bandwidth management).
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Thanks Dmitry,
Bjorn
> Fixes: c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for display")
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> 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 393858ef8a83..37c8270681c2 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
> @@ -219,9 +219,6 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms,
> int i, ret = 0;
> u64 avg_bw;
>
> - if (!kms->num_paths)
> - return -EINVAL;
> -
> drm_for_each_crtc(tmp_crtc, crtc->dev) {
> if (tmp_crtc->enabled &&
> curr_client_type ==
> @@ -239,6 +236,9 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms,
> }
> }
>
> + if (!kms->num_paths)
> + return 0;
> +
> avg_bw = perf.bw_ctl;
> do_div(avg_bw, (kms->num_paths * 1000)); /*Bps_to_icc*/
>
> --
> 2.28.0
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] drm/msm/dpu: fix clock scaling on non-sc7180 board
@ 2020-11-02 18:21 ` Bjorn Andersson
0 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2020-11-02 18:21 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: freedreno, David Airlie, linux-arm-msm, dri-devel, Kalyan Thota,
Sean Paul
On Tue 27 Oct 05:23 CDT 2020, Dmitry Baryshkov wrote:
> c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for
> display") has added support for handling bandwidth voting in kms path in
> addition to old mdss path. However this broke all other platforms since
> _dpu_core_perf_crtc_update_bus() will now error out instead of properly
> calculating bandwidth and core clocks. Fix
> _dpu_core_perf_crtc_update_bus() to just skip bandwidth setting instead
> of returning an error in case kms->num_paths == 0 (MDSS is used for
> bandwidth management).
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Thanks Dmitry,
Bjorn
> Fixes: c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for display")
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> 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 393858ef8a83..37c8270681c2 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
> @@ -219,9 +219,6 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms,
> int i, ret = 0;
> u64 avg_bw;
>
> - if (!kms->num_paths)
> - return -EINVAL;
> -
> drm_for_each_crtc(tmp_crtc, crtc->dev) {
> if (tmp_crtc->enabled &&
> curr_client_type ==
> @@ -239,6 +236,9 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms,
> }
> }
>
> + if (!kms->num_paths)
> + return 0;
> +
> avg_bw = perf.bw_ctl;
> do_div(avg_bw, (kms->num_paths * 1000)); /*Bps_to_icc*/
>
> --
> 2.28.0
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/msm/dpu: fix clock scaling on non-sc7180 board
2020-10-27 10:23 ` Dmitry Baryshkov
` (2 preceding siblings ...)
(?)
@ 2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
-1 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2020-12-29 20:15 UTC (permalink / raw)
To: Dmitry Baryshkov; +Cc: linux-arm-msm
Hello:
This patch was applied to qcom/linux.git (refs/heads/for-next):
On Tue, 27 Oct 2020 13:23:04 +0300 you wrote:
> c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for
> display") has added support for handling bandwidth voting in kms path in
> addition to old mdss path. However this broke all other platforms since
> _dpu_core_perf_crtc_update_bus() will now error out instead of properly
> calculating bandwidth and core clocks. Fix
> _dpu_core_perf_crtc_update_bus() to just skip bandwidth setting instead
> of returning an error in case kms->num_paths == 0 (MDSS is used for
> bandwidth management).
>
> [...]
Here is the summary with links:
- drm/msm/dpu: fix clock scaling on non-sc7180 board
https://git.kernel.org/qcom/c/cccdeda362fa
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread