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

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/edp: eDP Data Overrride

We need override certain link rates in favour of the next available
higher link rate. The Link rates that need to be overridden are
indicated by a mask in VBT. To make sure these modes are skipped we
don't add them in them in the sink rates array.

--v2
-Update the link rates after we have a final set of link rates [Ankit]
-Break this patch up [Ankit]
-Optimize the assingment during loop [Ankit]

--v3
-Add protection against broken VBTs [Jani]

--v4
-Fix build errors
-Create a seprate function to check if edp data override is selected
and using the correct vbt

--v5
-Use correct number to check the num of edp rates [Ankit]

--v6
-No seprate function check if vbt is broken in the reject rate function
[Jani]

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://lore.kernel.org/r/20250821042653.269227-4-suraj.kandpal@intel.com

+19
+19
drivers/gpu/drm/i915/display/intel_dp.c
··· 4313 4313 } 4314 4314 4315 4315 static void 4316 + intel_edp_set_data_override_rates(struct intel_dp *intel_dp) 4317 + { 4318 + struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; 4319 + int *sink_rates = intel_dp->sink_rates; 4320 + int i, count = 0; 4321 + 4322 + for (i = 0; i < intel_dp->num_sink_rates; i++) { 4323 + if (intel_bios_encoder_reject_edp_rate(encoder->devdata, 4324 + intel_dp->sink_rates[i])) 4325 + continue; 4326 + 4327 + sink_rates[count++] = intel_dp->sink_rates[i]; 4328 + } 4329 + intel_dp->num_sink_rates = count; 4330 + } 4331 + 4332 + static void 4316 4333 intel_edp_set_sink_rates(struct intel_dp *intel_dp) 4317 4334 { 4318 4335 struct intel_display *display = to_intel_display(intel_dp); ··· 4379 4362 intel_dp->use_rate_select = true; 4380 4363 else 4381 4364 intel_dp_set_sink_rates(intel_dp); 4365 + 4366 + intel_edp_set_data_override_rates(intel_dp); 4382 4367 } 4383 4368 4384 4369 static bool