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

drm/amd/display: Fix unstable HPCP compliance on Chrome Barcelo

[Why]
Intermittently, there presents two occurrences of 0 stream
commits in a single HPD event. Current HDCP sequence does
not consider such scenerio, and will thus disable HDCP.

[How]
Add condition check to include stream remove and re-enable
case for HDCP enable.

Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com>
Acked-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Qingqing Zhuo and committed by
Alex Deucher
4e00a434 90517c98

+20 -2
+20 -2
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 8067 8067 state->content_protection == DRM_MODE_CONTENT_PROTECTION_ENABLED) 8068 8068 state->content_protection = DRM_MODE_CONTENT_PROTECTION_DESIRED; 8069 8069 8070 - /* Check if something is connected/enabled, otherwise we start hdcp but nothing is connected/enabled 8071 - * hot-plug, headless s3, dpms 8070 + /* Stream removed and re-enabled 8071 + * 8072 + * Can sometimes overlap with the HPD case, 8073 + * thus set update_hdcp to false to avoid 8074 + * setting HDCP multiple times. 8075 + * 8076 + * Handles: DESIRED -> DESIRED (Special case) 8077 + */ 8078 + if (!(old_state->crtc && old_state->crtc->enabled) && 8079 + state->crtc && state->crtc->enabled && 8080 + connector->state->content_protection == DRM_MODE_CONTENT_PROTECTION_DESIRED) { 8081 + dm_con_state->update_hdcp = false; 8082 + return true; 8083 + } 8084 + 8085 + /* Hot-plug, headless s3, dpms 8086 + * 8087 + * Only start HDCP if the display is connected/enabled. 8088 + * update_hdcp flag will be set to false until the next 8089 + * HPD comes in. 8072 8090 * 8073 8091 * Handles: DESIRED -> DESIRED (Special case) 8074 8092 */