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

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>

+7 -1
+5
drivers/gpu/drm/i915/display/intel_bw.c
··· 1739 1739 1740 1740 return bw_state->pipe_sagv_reject == 0; 1741 1741 } 1742 + 1743 + int intel_bw_qgv_point_peakbw(const struct intel_bw_state *bw_state) 1744 + { 1745 + return bw_state->qgv_point_peakbw; 1746 + }
+1
drivers/gpu/drm/i915/display/intel_bw.h
··· 79 79 const struct intel_bw_state *bw_state); 80 80 void icl_sagv_pre_plane_update(struct intel_atomic_state *state); 81 81 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); 82 83 83 84 #endif /* __INTEL_BW_H__ */
+1 -1
drivers/gpu/drm/i915/display/intel_pmdemand.c
··· 346 346 347 347 /* firmware will calculate the qclk_gv_index, requirement is set to 0 */ 348 348 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); 350 350 351 351 new_dbuf_state = intel_atomic_get_dbuf_state(state); 352 352 if (IS_ERR(new_dbuf_state))