]> exis.tech > repos - linux.git/commit
drm/i915/edp: Check supported link rates DPCD read
authorNikita Zhandarovich <n.zhandarovich@fintech.ru>
Fri, 29 May 2026 14:57:58 +0000 (17:57 +0300)
committerTvrtko Ursulin <tursulin@ursulin.net>
Tue, 9 Jun 2026 06:55:19 +0000 (07:55 +0100)
commit2673cefa99ca918e7ac5b0388ff578a83656c896
tree3f9f079469b3de36cee57c625bffe190add33717
parent4549871118cf616eecdd2d939f78e3b9e1dddc48
drm/i915/edp: Check supported link rates DPCD read

intel_edp_set_sink_rates() reads DP_SUPPORTED_LINK_RATES into a local
stack array and then parses the array unconditionally. If the read
fails, the array contents are not valid and may result in bogus sink
link rates being used.

Use drm_dp_dpcd_read_data() and clear the sink rate array on failure,
so the existing parser falls back to the default sink rate handling.

Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.

Fixes: 68f357cb7347 ("drm/i915/dp: generate and cache sink rate array for all DP, not just eDP 1.4")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patch.msgid.link/20260529145759.1640646-1-n.zhandarovich@fintech.ru
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
(cherry picked from commit bd61c7756b34157e093028225a69383b4b1203cc)
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
drivers/gpu/drm/i915/display/intel_dp.c