Skip to content

Commit 2e58223

Browse files
committed
drm/i915/bw: abstract intel_bw_qgv_point_peakbw()
Add intel_bw_qgv_point_peakbw() helper to avoid looking at struct intel_bw_state internals outside of intel_bw.c. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://lore.kernel.org/r/49a723e0f23e06a6045f8f9e0d06648a6bc899c7.1750847509.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent 9990581 commit 2e58223

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/gpu/drm/i915/display/intel_bw.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,3 +1739,8 @@ bool intel_bw_can_enable_sagv(struct intel_display *display,
17391739

17401740
return bw_state->pipe_sagv_reject == 0;
17411741
}
1742+
1743+
int intel_bw_qgv_point_peakbw(const struct intel_bw_state *bw_state)
1744+
{
1745+
return bw_state->qgv_point_peakbw;
1746+
}

drivers/gpu/drm/i915/display/intel_bw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,6 @@ bool intel_bw_can_enable_sagv(struct intel_display *display,
7979
const struct intel_bw_state *bw_state);
8080
void icl_sagv_pre_plane_update(struct intel_atomic_state *state);
8181
void icl_sagv_post_plane_update(struct intel_atomic_state *state);
82+
int intel_bw_qgv_point_peakbw(const struct intel_bw_state *bw_state);
8283

8384
#endif /* __INTEL_BW_H__ */

drivers/gpu/drm/i915/display/intel_pmdemand.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ int intel_pmdemand_atomic_check(struct intel_atomic_state *state)
346346

347347
/* firmware will calculate the qclk_gv_index, requirement is set to 0 */
348348
new_pmdemand_state->params.qclk_gv_index = 0;
349-
new_pmdemand_state->params.qclk_gv_bw = new_bw_state->qgv_point_peakbw;
349+
new_pmdemand_state->params.qclk_gv_bw = intel_bw_qgv_point_peakbw(new_bw_state);
350350

351351
new_dbuf_state = intel_atomic_get_dbuf_state(state);
352352
if (IS_ERR(new_dbuf_state))

0 commit comments

Comments
 (0)