diff options
author | Jouni Högander <jouni.hogander@intel.com> | 2025-08-27 09:08:09 +0300 |
---|---|---|
committer | Jouni Högander <jouni.hogander@intel.com> | 2025-09-08 10:25:32 +0300 |
commit | 90d8aad11f613e13e1eddc35c0225cce9e54ba94 (patch) | |
tree | 4c68d48687868a144676cfe4a653b8049847987f | |
parent | 8bc70f2ea932976604876756d6d868eca3ac4cbb (diff) |
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
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_psr.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 1aa4a127afaf..01bf304c705f 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -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; } |