drm/msm/dp: update HDCP stream de-registration logic

Extend HDCP stream de-registration code to provide virtual channel
ID in addition to the stream id. Also fix flaw in de-registration
logic that resulted in HDCP off being skipped in valid cases.

Change-Id: Iee10193130ca0071b8136e4abade2ba35af20332
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This commit is contained in:
Christopher Braga 2019-02-19 12:12:33 -05:00 committed by Tatenda Chipeperekwa
parent 2ce9abfa68
commit 8f49420abb

View file

@ -283,7 +283,8 @@ static void dp_display_hdcp_deregister_stream(struct dp_display_private *dp,
enum dp_stream_id stream_id)
{
if (dp->hdcp.ops->deregister_streams) {
struct stream_info stream = {stream_id, 0};
struct stream_info stream = {stream_id,
dp->active_panels[stream_id]->vcpi};
pr_debug("Deregistering stream within HDCP library\n");
dp->hdcp.ops->deregister_streams(dp->hdcp.data, 1, &stream);
@ -1655,9 +1656,8 @@ static int dp_display_pre_disable(struct dp_display *dp_display, void *panel)
dp_display_hdcp_deregister_stream(dp,
dp_panel->stream_id);
for (i = DP_STREAM_0; i < DP_STREAM_MAX; i++) {
if (i != dp_panel->stream_id)
continue;
if (dp->active_panels[i]) {
if (i != dp_panel->stream_id &&
dp->active_panels[i]) {
pr_debug("Streams are still active. Skip disabling HDCP\n");
goto stream;
}