Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm/dpu: make fix_core_ab_vote consistent with fix_core_ib_vote

The fix_core_ab_vote is an average bandwidth value, used for bandwidth
overrides in several cases. However there is an internal inconsistency:
fix_core_ib_vote is defined in KBps, while fix_core_ab_vote is defined
in Bps.

Fix that by changing the type of the variable to u32 and using * 1000ULL
multiplier when setting up the dpu_core_perf_params::bw_ctl value.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/636064/
Link: https://lore.kernel.org/r/20250209-dpu-perf-rework-v5-4-87e936cf3004@linaro.org

+4 -4
+2 -2
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
··· 125 125 perf->max_per_pipe_ib = 0; 126 126 perf->core_clk_rate = 0; 127 127 } else if (core_perf->perf_tune.mode == DPU_PERF_MODE_FIXED) { 128 - perf->bw_ctl = core_perf->fix_core_ab_vote; 128 + perf->bw_ctl = core_perf->fix_core_ab_vote * 1000ULL; 129 129 perf->max_per_pipe_ib = core_perf->fix_core_ib_vote; 130 130 perf->core_clk_rate = core_perf->fix_core_clk_rate; 131 131 } else { ··· 479 479 &perf->fix_core_clk_rate); 480 480 debugfs_create_u32("fix_core_ib_vote", 0600, entry, 481 481 &perf->fix_core_ib_vote); 482 - debugfs_create_u64("fix_core_ab_vote", 0600, entry, 482 + debugfs_create_u32("fix_core_ab_vote", 0600, entry, 483 483 &perf->fix_core_ab_vote); 484 484 485 485 return 0;
+2 -2
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h
··· 41 41 * @enable_bw_release: debug control for bandwidth release 42 42 * @fix_core_clk_rate: fixed core clock request in Hz used in mode 2 43 43 * @fix_core_ib_vote: fixed core ib vote in KBps used in mode 2 44 - * @fix_core_ab_vote: fixed core ab vote in bps used in mode 2 44 + * @fix_core_ab_vote: fixed core ab vote in KBps used in mode 2 45 45 */ 46 46 struct dpu_core_perf { 47 47 const struct dpu_perf_cfg *perf_cfg; ··· 51 51 u32 enable_bw_release; 52 52 u64 fix_core_clk_rate; 53 53 u32 fix_core_ib_vote; 54 - u64 fix_core_ab_vote; 54 + u32 fix_core_ab_vote; 55 55 }; 56 56 57 57 int dpu_core_perf_crtc_check(struct drm_crtc *crtc,