]> Git Repo - linux.git/commit
drm/amd/display: fix rxstatus_msg_sz type narrowing
authorDominik Kaszewski <[email protected]>
Thu, 24 Oct 2024 06:01:23 +0000 (08:01 +0200)
committerAlex Deucher <[email protected]>
Mon, 4 Nov 2024 16:35:15 +0000 (11:35 -0500)
commit215b6dd7e026fdc32290c61e6f4298587f807e2c
tree824de107c5a525ea5384fb9ba8038fac416ba9d0
parentd7b86a002cf7e1b55ec311c11264f70d079860b9
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 <[email protected]>
Signed-off-by: Dominik Kaszewski <[email protected]>
Signed-off-by: Zaeem Mohamed <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/display/modules/hdcp/hdcp2_execution.c
This page took 0.05648 seconds and 4 git commands to generate.