Skip to content

Commit 4e00a43

Browse files
lillizhuo-amdalexdeucher
authored andcommitted
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 <[email protected]> Acked-by: Mikita Lipski <[email protected]> Signed-off-by: Qingqing Zhuo <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 90517c9 commit 4e00a43

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8067,8 +8067,26 @@ static bool is_content_protection_different(struct drm_connector_state *state,
80678067
state->content_protection == DRM_MODE_CONTENT_PROTECTION_ENABLED)
80688068
state->content_protection = DRM_MODE_CONTENT_PROTECTION_DESIRED;
80698069

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.
80728090
*
80738091
* Handles: DESIRED -> DESIRED (Special case)
80748092
*/

0 commit comments

Comments
 (0)