linux/drivers/gpu/drm/amd/display/modules
Dominik Kaszewski 215b6dd7e0 drm/amd/display: fix rxstatus_msg_sz type narrowing
[Why]
Code reading rxstatus message size was incorrectly assigning it to
uint8_t, despite the value being 10 bits long (lower byte plus lowest
2 bits from upper byte). This caused the highest 2 bits to be ignored,
potentially missing invalid values.

[How]
Change all local variables holding rxstatus message size from uint8_t
to uint16_t, as in mod_hdcp_message_hdcp2::rx_id_list_size.
Replaced untyped HDCP_2_2_HMID_RXSTATUS_MSG_SZ_HI macro with function
hdcp_2_2_hmid_rxstatus_msg_sz(const uint8_t[2]) to encapsulate entire
calculation and return a typed result.
Removed spaces mixed with tabs to fix indentation on modified lines.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Dominik Kaszewski <dominik.kaszewski@amd.com>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2024-11-04 11:35:15 -05:00
..
color drm/amd/display: Remove unused regamma functions 2024-11-04 11:25:50 -05:00
freesync drm/amd/display: avoid divided by zero 2024-11-04 11:33:40 -05:00
hdcp drm/amd/display: fix rxstatus_msg_sz type narrowing 2024-11-04 11:35:15 -05:00
inc drm/amd/display: revert Exit idle optimizations before HDCP execution 2024-03-20 13:36:29 -04:00
info_packet Revert "drm/amd/display: Fix sending VSC (+ colorimetry) packets for DP/eDP displays without PSR" 2024-03-22 15:52:12 -04:00
power drm/amd/display: Disable PSR-SU on Parade 08-01 TCON too 2024-10-22 17:50:55 -04:00
vmid