Commit c2d61e30 authored by Martin Tsai's avatar Martin Tsai Committed by Alex Deucher

drm/amd/display: Modify the hdcp device count check condition

[why]
Some MST display may not report the internal panel to DEVICE_COUNT,
that makes the check condition always failed.

[how]
To update this condition with the reported device count + 1
(because the immediate repeater's internal panel is possibly
not included in DEVICE_COUNT)
Signed-off-by: default avatarMartin Tsai <martin.tsai@amd.com>
Acked-by: default avatarBindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2da94e28
...@@ -128,8 +128,12 @@ static inline uint8_t get_device_count(struct mod_hdcp *hdcp) ...@@ -128,8 +128,12 @@ static inline uint8_t get_device_count(struct mod_hdcp *hdcp)
static inline enum mod_hdcp_status check_device_count(struct mod_hdcp *hdcp) static inline enum mod_hdcp_status check_device_count(struct mod_hdcp *hdcp)
{ {
/* device count must be greater than or equal to tracked hdcp displays */ /* Some MST display may choose to report the internal panel as an HDCP RX.
return (get_device_count(hdcp) < get_active_display_count(hdcp)) ? * To update this condition with 1(because the immediate repeater's internal
* panel is possibly not included in DEVICE_COUNT) + get_device_count(hdcp).
* Device count must be greater than or equal to tracked hdcp displays.
*/
return ((1 + get_device_count(hdcp)) < get_active_display_count(hdcp)) ?
MOD_HDCP_STATUS_HDCP1_DEVICE_COUNT_MISMATCH_FAILURE : MOD_HDCP_STATUS_HDCP1_DEVICE_COUNT_MISMATCH_FAILURE :
MOD_HDCP_STATUS_SUCCESS; MOD_HDCP_STATUS_SUCCESS;
} }
......
...@@ -207,8 +207,11 @@ static inline uint8_t get_device_count(struct mod_hdcp *hdcp) ...@@ -207,8 +207,11 @@ static inline uint8_t get_device_count(struct mod_hdcp *hdcp)
static enum mod_hdcp_status check_device_count(struct mod_hdcp *hdcp) static enum mod_hdcp_status check_device_count(struct mod_hdcp *hdcp)
{ {
/* device count must be greater than or equal to tracked hdcp displays */ /* Some MST display may choose to report the internal panel as an HDCP RX. */
return (get_device_count(hdcp) < get_active_display_count(hdcp)) ? /* To update this condition with 1(because the immediate repeater's internal */
/* panel is possibly not included in DEVICE_COUNT) + get_device_count(hdcp). */
/* Device count must be greater than or equal to tracked hdcp displays. */
return ((1 + get_device_count(hdcp)) < get_active_display_count(hdcp)) ?
MOD_HDCP_STATUS_HDCP2_DEVICE_COUNT_MISMATCH_FAILURE : MOD_HDCP_STATUS_HDCP2_DEVICE_COUNT_MISMATCH_FAILURE :
MOD_HDCP_STATUS_SUCCESS; MOD_HDCP_STATUS_SUCCESS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment