Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu/display: use msleep rather than udelay for HDCP

ARM has a 2000us limit for udelay. Switch to msleep. This code
executes in a worker thread so shouldn't be an atomic context.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191217204707.2258744-2-alexander.deucher@amd.com

authored by

Alex Deucher and committed by
Dave Airlie
5f773e55 4e328922

+3 -3
+3 -3
drivers/gpu/drm/amd/display/modules/hdcp/hdcp2_execution.c
··· 153 153 { 154 154 enum mod_hdcp_status status; 155 155 uint8_t size; 156 - uint16_t max_wait = 20000; // units of us 156 + uint16_t max_wait = 20; // units of ms 157 157 uint16_t num_polls = 5; 158 158 uint16_t wait_time = max_wait / num_polls; 159 159 ··· 161 161 status = MOD_HDCP_STATUS_INVALID_OPERATION; 162 162 else 163 163 for (; num_polls; num_polls--) { 164 - udelay(wait_time); 164 + msleep(wait_time); 165 165 166 166 status = mod_hdcp_read_rxstatus(hdcp); 167 167 if (status != MOD_HDCP_STATUS_SUCCESS) ··· 474 474 hdcp, "lc_init_write")) 475 475 goto out; 476 476 if (is_dp_hdcp(hdcp)) 477 - udelay(16000); 477 + msleep(16); 478 478 else 479 479 if (!mod_hdcp_execute_and_set(poll_l_prime_available, 480 480 &input->l_prime_available_poll, &status,