mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-04 18:11:39 -04:00
drm/i915/psr: Panel Replay SU cap dpcd read return value
Currently return value of drm_dpcd_readb is not checked when reading sink Panel Replay Selective Update capabilities. Fix this and switch to drm_dpcd_read_byte. Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> Link: https://lore.kernel.org/r/20250827060809.2461725-1-jouni.hogander@intel.com
This commit is contained in:
@@ -495,12 +495,14 @@ static u8 intel_dp_get_su_capability(struct intel_dp *intel_dp)
|
||||
{
|
||||
u8 su_capability = 0;
|
||||
|
||||
if (intel_dp->psr.sink_panel_replay_su_support)
|
||||
drm_dp_dpcd_readb(&intel_dp->aux,
|
||||
DP_PANEL_REPLAY_CAP_CAPABILITY,
|
||||
&su_capability);
|
||||
else
|
||||
if (intel_dp->psr.sink_panel_replay_su_support) {
|
||||
if (drm_dp_dpcd_read_byte(&intel_dp->aux,
|
||||
DP_PANEL_REPLAY_CAP_CAPABILITY,
|
||||
&su_capability) < 0)
|
||||
return 0;
|
||||
} else {
|
||||
su_capability = intel_dp->psr_dpcd[1];
|
||||
}
|
||||
|
||||
return su_capability;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user