video: tsec: Set tsec state before power_on/off

Set s_tsec_state before calling tsec_plat_poweron
as it enables irq and can context switch to the irq
handler which needs s_tsec_state set appropriately

Bug 4437491

Change-Id: I1f48713329b9315376fe926d1e8b33686d05d035
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145973
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Nikesh Oswal
2024-05-15 12:41:21 +00:00
committed by mobile promotions
parent fa9c7418dc
commit 09b7b63ec4

View File

@@ -111,8 +111,8 @@ static int tsec_comms_send_getctxt_cmd(callback_func_t cb_func, void *cb_ctx)
/* Context retrieved, shutdown tsec now */
static void tsec_comms_process_getctxt_msg(void)
{
tsec_plat_poweroff();
s_tsec_state = TSEC_STATE_SHUTDOWN;
tsec_plat_poweroff();
}
/* Power on tsec with context information */
@@ -122,8 +122,8 @@ static void tsec_comms_poweron_with_context(void)
bootInfo->bootWithContextFlag = 1;
bootInfo->bootContextOffset = s_tsec_context_gscco_offset;
tsec_plat_poweron();
s_tsec_state = TSEC_STATE_BOOTED_WITH_CONTEXT;
tsec_plat_poweron();
}
/* Clear flags after power on with context done */