mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
drm/i915/dp_tunnel: Query max BW config via link_caps for BW computation
Query the maximum link BW configuration via the link caps interface to compute the available TBT bandwidth. Unlike the max common link params used so far for this, the max BW config also accounts for any forced link parameters. This makes the max BW link config query uniform across mode validation and TBT BW calculation, and allows unexporting the intel_dp_link_caps_max_common_lane_count() helper. v2: Use the max BW link configuration, instead of the max link limits. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20260701153204.4124150-16-imre.deak@intel.com
This commit is contained in:
parent
cae2b26d2f
commit
9fe6cae318
|
|
@ -290,7 +290,7 @@ void intel_dp_link_caps_print_common_rates(struct intel_dp_link_caps *link_caps)
|
|||
drm_dbg_kms(display->drm, "common rates: %s\n", seq_buf_str(&s));
|
||||
}
|
||||
|
||||
int intel_dp_link_caps_max_common_lane_count(struct intel_dp_link_caps *link_caps)
|
||||
static int intel_dp_link_caps_max_common_lane_count(struct intel_dp_link_caps *link_caps)
|
||||
{
|
||||
return link_caps->max_lane_count;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,6 @@ int intel_dp_common_rate(struct intel_dp_link_caps *link_caps, int index);
|
|||
int intel_dp_link_caps_common_rate_idx(struct intel_dp_link_caps *link_caps, int rate);
|
||||
int intel_dp_max_common_rate(struct intel_dp_link_caps *link_caps);
|
||||
int intel_dp_link_caps_num_common_rates(struct intel_dp_link_caps *link_caps);
|
||||
int intel_dp_link_caps_max_common_lane_count(struct intel_dp_link_caps *link_caps);
|
||||
|
||||
void intel_dp_link_caps_print_common_rates(struct intel_dp_link_caps *link_caps);
|
||||
|
||||
|
|
|
|||
|
|
@ -58,10 +58,12 @@ static int kbytes_to_mbits(int kbytes)
|
|||
static int get_current_link_bw(struct intel_dp *intel_dp)
|
||||
{
|
||||
struct intel_dp_link_caps *link_caps = intel_dp->link.caps;
|
||||
int rate = intel_dp_max_common_rate(link_caps);
|
||||
int lane_count = intel_dp_link_caps_max_common_lane_count(link_caps);
|
||||
struct intel_dp_link_config max_bw_config;
|
||||
|
||||
return intel_dp_max_link_data_rate(intel_dp, rate, lane_count);
|
||||
intel_dp_link_caps_get_max_bw_config(link_caps, &max_bw_config);
|
||||
|
||||
return intel_dp_max_link_data_rate(intel_dp, max_bw_config.rate,
|
||||
max_bw_config.lane_count);
|
||||
}
|
||||
|
||||
static int __update_tunnel_state(struct intel_dp *intel_dp, bool force_sink_update)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user