mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
drm/amd/display: Add HDCP policy control
[Why] DM should be able to control HDCP retry limit via configurable parameter. [How] Expose a retry_limit parameter for controlling the maximum number of retries and lift the hardcode out to DM. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Aric Cyr <aric.cyr@amd.com> Signed-off-by: Oleh Kuzhylnyi <okuzhyln@amd.com> Signed-off-by: Wayne Lin <wayne.lin@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
d6fa802661
commit
9fd2da71c3
|
|
@ -223,6 +223,7 @@ void hdcp_update_display(struct hdcp_workqueue *hdcp_work,
|
|||
display_adjust.disable = MOD_HDCP_DISPLAY_NOT_DISABLE;
|
||||
|
||||
link_adjust.auth_delay = 2;
|
||||
link_adjust.retry_limit = MAX_NUM_OF_ATTEMPTS;
|
||||
|
||||
if (content_type == DRM_MODE_HDCP_CONTENT_TYPE0) {
|
||||
link_adjust.hdcp2.force_type = MOD_HDCP_FORCE_TYPE_0;
|
||||
|
|
@ -572,6 +573,7 @@ static void update_config(void *handle, struct cp_psp_stream_config *config)
|
|||
link->dp.usb4_enabled = config->usb4_enabled;
|
||||
display->adjust.disable = MOD_HDCP_DISPLAY_DISABLE_AUTHENTICATION;
|
||||
link->adjust.auth_delay = 2;
|
||||
link->adjust.retry_limit = MAX_NUM_OF_ATTEMPTS;
|
||||
link->adjust.hdcp1.disable = 0;
|
||||
hdcp_w->encryption_status[display->index] = MOD_HDCP_ENCRYPTION_STATUS_HDCP_OFF;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ static void push_error_status(struct mod_hdcp *hdcp,
|
|||
enum mod_hdcp_status status)
|
||||
{
|
||||
struct mod_hdcp_trace *trace = &hdcp->connection.trace;
|
||||
const uint8_t retry_limit = hdcp->connection.link.adjust.retry_limit;
|
||||
|
||||
if (trace->error_count < MAX_NUM_OF_ERROR_TRACE) {
|
||||
trace->errors[trace->error_count].status = status;
|
||||
|
|
@ -39,11 +40,11 @@ static void push_error_status(struct mod_hdcp *hdcp,
|
|||
|
||||
if (is_hdcp1(hdcp)) {
|
||||
hdcp->connection.hdcp1_retry_count++;
|
||||
if (hdcp->connection.hdcp1_retry_count == MAX_NUM_OF_ATTEMPTS)
|
||||
if (hdcp->connection.hdcp1_retry_count == retry_limit)
|
||||
hdcp->connection.link.adjust.hdcp1.disable = 1;
|
||||
} else if (is_hdcp2(hdcp)) {
|
||||
hdcp->connection.hdcp2_retry_count++;
|
||||
if (hdcp->connection.hdcp2_retry_count == MAX_NUM_OF_ATTEMPTS)
|
||||
if (hdcp->connection.hdcp2_retry_count == retry_limit)
|
||||
hdcp->connection.link.adjust.hdcp2.disable = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@ struct mod_hdcp_link_adjustment_hdcp2 {
|
|||
|
||||
struct mod_hdcp_link_adjustment {
|
||||
uint8_t auth_delay;
|
||||
uint8_t retry_limit;
|
||||
struct mod_hdcp_link_adjustment_hdcp1 hdcp1;
|
||||
struct mod_hdcp_link_adjustment_hdcp2 hdcp2;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user