linux/drivers/gpu/drm/amd/display/modules/hdcp
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
..
hdcp.c
hdcp.h
hdcp1_execution.c drm/amd/display: Revert "Check HDCP returned status" 2024-07-23 17:07:10 -04:00
hdcp1_transition.c
hdcp2_execution.c drm/amd/display: fix rxstatus_msg_sz type narrowing 2024-11-04 11:35:15 -05:00
hdcp2_transition.c
hdcp_ddc.c minmax: make generic MIN() and MAX() macros available everywhere 2024-07-28 15:49:18 -07:00
hdcp_log.c
hdcp_log.h
hdcp_psp.c drm/amd/display: Remove duplicate null check 2024-06-27 17:10:38 -04:00
hdcp_psp.h
Makefile