Skip to content

Commit 71dc6c0

Browse files
Krishna Manikandanrobclark
authored andcommitted
drm/msm/dpu: update bandwidth threshold check
Maximum allowed bandwidth has no dependency on the type of panel used. Hence, cleanup the code to use max_bw_high as the threshold value for bandwidth checks. Update the maximum allowed bandwidth as 6.8Gbps for SC7180 target. Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org> Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent 04d9044 commit 71dc6c0

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

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

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,6 @@ static struct dpu_kms *_dpu_crtc_get_kms(struct drm_crtc *crtc)
103103
return to_dpu_kms(priv->kms);
104104
}
105105

106-
static bool _dpu_core_video_mode_intf_connected(struct drm_crtc *crtc)
107-
{
108-
struct drm_crtc *tmp_crtc;
109-
110-
drm_for_each_crtc(tmp_crtc, crtc->dev) {
111-
if ((dpu_crtc_get_intf_mode(tmp_crtc) == INTF_MODE_VIDEO) &&
112-
tmp_crtc->enabled) {
113-
DPU_DEBUG("video interface connected crtc:%d\n",
114-
tmp_crtc->base.id);
115-
return true;
116-
}
117-
}
118-
119-
return false;
120-
}
121-
122106
static void _dpu_core_perf_calc_crtc(struct dpu_kms *kms,
123107
struct drm_crtc *crtc,
124108
struct drm_crtc_state *state,
@@ -160,7 +144,6 @@ int dpu_core_perf_crtc_check(struct drm_crtc *crtc,
160144
u32 bw, threshold;
161145
u64 bw_sum_of_intfs = 0;
162146
enum dpu_crtc_client_type curr_client_type;
163-
bool is_video_mode;
164147
struct dpu_crtc_state *dpu_cstate;
165148
struct drm_crtc *tmp_crtc;
166149
struct dpu_kms *kms;
@@ -206,11 +189,7 @@ int dpu_core_perf_crtc_check(struct drm_crtc *crtc,
206189
bw = DIV_ROUND_UP_ULL(bw_sum_of_intfs, 1000);
207190
DPU_DEBUG("calculated bandwidth=%uk\n", bw);
208191

209-
is_video_mode = dpu_crtc_get_intf_mode(crtc) == INTF_MODE_VIDEO;
210-
threshold = (is_video_mode ||
211-
_dpu_core_video_mode_intf_connected(crtc)) ?
212-
kms->catalog->perf.max_bw_low :
213-
kms->catalog->perf.max_bw_high;
192+
threshold = kms->catalog->perf.max_bw_high;
214193

215194
DPU_DEBUG("final threshold bw limit = %d\n", threshold);
216195

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,8 @@ static const struct dpu_perf_cfg sdm845_perf_data = {
537537
};
538538

539539
static const struct dpu_perf_cfg sc7180_perf_data = {
540-
.max_bw_low = 3900000,
541-
.max_bw_high = 5500000,
540+
.max_bw_low = 6800000,
541+
.max_bw_high = 6800000,
542542
.min_core_ib = 2400000,
543543
.min_llcc_ib = 800000,
544544
.min_dram_ib = 1600000,

0 commit comments

Comments
 (0)