1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
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 drm/amd/display: revert Exit idle optimizations before HDCP execution 2024-03-20 13:36:29 -04:00
hdcp.h drm-misc-next for 5.19: 2022-04-29 11:33:00 +10:00
hdcp1_execution.c drm/amd/display: Revert "Check HDCP returned status" 2024-07-23 17:07:10 -04:00
hdcp1_transition.c drm/amd/display: add authentication_complete in hdcp output 2021-08-09 15:43:33 -04:00
hdcp2_execution.c drm/amd/display: fix rxstatus_msg_sz type narrowing 2024-11-04 11:35:15 -05:00
hdcp2_transition.c drm/amd/display: Fix monitor flash issue 2022-06-14 21:38:40 -04:00
hdcp_ddc.c minmax: make generic MIN() and MAX() macros available everywhere 2024-07-28 15:49:18 -07:00
hdcp_log.c drm/amd/display: add authentication_complete in hdcp output 2021-08-09 15:43:33 -04:00
hdcp_log.h drm/amd/display: Fix hdcp_log.h codestyle 2024-01-05 16:10:44 -05:00
hdcp_psp.c drm/amd/display: Remove duplicate null check 2024-06-27 17:10:38 -04:00
hdcp_psp.h drm/amd/display: Fix hdcp_psp.h codestyle 2024-01-05 16:10:44 -05:00
Makefile drm/amd/display: Add execution and transition states for HDCP2.2 2019-11-19 10:12:53 -05:00