securemsm-kernel : Unload hdcp1 when all instances are closed
Unload hdcp1 TA when all client instances are closed. Change-Id: I079021b1efadfdec3c0248f7c8ed79c686d6d1c5 Signed-off-by: Sheik Anwar Shabic Y <quic_sheikanw@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

szülő
c9102b2761
commit
1f515ba432
@@ -185,7 +185,7 @@ error:
|
||||
|
||||
static void hdcp1_app_unload(struct hdcp1_smcinvoke_handle *handle)
|
||||
{
|
||||
if (!handle || !!handle->hdcp1_app_obj.context) {
|
||||
if (!handle || !handle->hdcp1_app_obj.context) {
|
||||
pr_err("invalid handle\n");
|
||||
return;
|
||||
}
|
||||
@@ -348,10 +348,22 @@ void hdcp1_stop_smcinvoke(void *data)
|
||||
{
|
||||
struct hdcp1_smcinvoke_handle *hdcp1_handle = data;
|
||||
|
||||
if (!hdcp1_handle) {
|
||||
pr_err("invalid HDCP 1.x handle\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(hdcp1_handle->hdcp_state & HDCP_STATE_APP_LOADED)) {
|
||||
pr_err("hdcp1 app not loaded\n");
|
||||
return;
|
||||
}
|
||||
|
||||
Object_ASSIGN_NULL(hdcp1_handle->hdcp1_app_obj);
|
||||
Object_ASSIGN_NULL(hdcp1_handle->hdcp1_appcontroller_obj);
|
||||
Object_ASSIGN_NULL(hdcp1_handle->hdcp1ops_app_obj);
|
||||
Object_ASSIGN_NULL(hdcp1_handle->hdcp1ops_appcontroller_obj);
|
||||
|
||||
hdcp1_handle->hdcp_state &= ~HDCP_STATE_APP_LOADED;
|
||||
}
|
||||
|
||||
void *hdcp2_init_smcinvoke(u32 device_type)
|
||||
@@ -757,6 +769,7 @@ int hdcp2_app_process_msg_smcinvoke(void *ctx, uint32_t req_len)
|
||||
size_t resMsgLen = 0;
|
||||
uint32_t timeout = 0;
|
||||
uint32_t flag = 0;
|
||||
uint32_t state = 0;
|
||||
|
||||
uint8_t resMsg[MAX_TX_MESSAGE_SIZE] = {0};
|
||||
|
||||
@@ -779,7 +792,7 @@ int hdcp2_app_process_msg_smcinvoke(void *ctx, uint32_t req_len)
|
||||
ret = hdcp2p2_rcvd_msg(
|
||||
handle->hdcp2_app_obj, handle->app_data.request.data,
|
||||
handle->app_data.request.length, handle->tz_ctxhandle, resMsg,
|
||||
MAX_TX_MESSAGE_SIZE, &resMsgLen, &timeout, &flag);
|
||||
MAX_TX_MESSAGE_SIZE, &resMsgLen, &timeout, &flag, &state);
|
||||
if (ret) {
|
||||
pr_err("hdcp2p2_rcvd_msg failed :%d\n", ret);
|
||||
goto error;
|
||||
|
Reference in New Issue
Block a user