Skip to content

Commit 879a7f8

Browse files
committed
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 <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/636064/ Link: https://lore.kernel.org/r/[email protected]
1 parent c54b611 commit 879a7f8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static void _dpu_core_perf_calc_crtc(const struct dpu_core_perf *core_perf,
125125
perf->max_per_pipe_ib = 0;
126126
perf->core_clk_rate = 0;
127127
} 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;
129129
perf->max_per_pipe_ib = core_perf->fix_core_ib_vote;
130130
perf->core_clk_rate = core_perf->fix_core_clk_rate;
131131
} else {
@@ -479,7 +479,7 @@ int dpu_core_perf_debugfs_init(struct dpu_kms *dpu_kms, struct dentry *parent)
479479
&perf->fix_core_clk_rate);
480480
debugfs_create_u32("fix_core_ib_vote", 0600, entry,
481481
&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,
483483
&perf->fix_core_ab_vote);
484484

485485
return 0;

drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct dpu_core_perf_tune {
4141
* @enable_bw_release: debug control for bandwidth release
4242
* @fix_core_clk_rate: fixed core clock request in Hz used in mode 2
4343
* @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
4545
*/
4646
struct dpu_core_perf {
4747
const struct dpu_perf_cfg *perf_cfg;
@@ -51,7 +51,7 @@ struct dpu_core_perf {
5151
u32 enable_bw_release;
5252
u64 fix_core_clk_rate;
5353
u32 fix_core_ib_vote;
54-
u64 fix_core_ab_vote;
54+
u32 fix_core_ab_vote;
5555
};
5656

5757
int dpu_core_perf_crtc_check(struct drm_crtc *crtc,

0 commit comments

Comments
 (0)