Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11bbadf5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/hdcp: unload the HDCP app on DP shutdown"

parents 2b2e817b e370e105
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2010-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1263,6 +1263,8 @@ static void sde_hdcp_1x_off(void *input)

	hdcp->sink_r0_ready = false;

	hdcp1_unload_app();

	pr_debug("%s: HDCP: Off\n", SDE_HDCP_STATE_NAME);
} /* hdcp_1x_off */

+25 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -2037,6 +2037,30 @@ bool hdcp1_check_if_supported_load_app(void)
	return hdcp1_supported;
}

void hdcp1_unload_app(void)
{
	int rc = 0;

	if (!hdcp1_supported) {
		pr_debug("hdcp1 is not supported\n");
		return;
	}

	if (!hdcp1_handle) {
		pr_debug("invalid hdcp1 handle\n");
		return;
	}

	rc = qseecom_shutdown_app(&hdcp1_handle);
	if (rc) {
		pr_debug("qseecom_shutdown_app failed with ERR = %d\n", rc);
		return;
	}

	hdcp1_handle = NULL;
	pr_debug("hdcp1 app unloaded\n");
}

/* APIs exposed to all clients */
int hdcp1_set_keys(uint32_t *aksv_msb, uint32_t *aksv_lsb)
{
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -215,6 +215,7 @@ struct hdcp_register_data {
int hdcp_library_register(struct hdcp_register_data *data);
void hdcp_library_deregister(void *phdcpcontext);
bool hdcp1_check_if_supported_load_app(void);
void hdcp1_unload_app(void);
int hdcp1_set_keys(uint32_t *aksv_msb, uint32_t *aksv_lsb);
int hdcp1_set_enc(bool enable);
#endif /* __HDCP_QSEECOM_H */