mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
platform: dce: reworked dce FSM design
Redesign DCE KMD drive state machine to handle new PM events. Bug 3583331 Change-Id: I89adcfa2f311a9a1e86b70e14821468203365266 Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2673665 Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Arun Swain <arswain@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Laxman Dewangan
parent
a6cc70f8d5
commit
28a1cfd1c1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -171,15 +171,17 @@ void dce_mailbox_set_full_interrupt(struct tegra_dce *d, u8 id)
|
||||
}
|
||||
|
||||
/**
|
||||
* dce_mailbox_send_cmd_sync - Sends command via mailbox and waits for ack.
|
||||
* dce_handle_mailbox_send_cmd_sync - handler function for
|
||||
* mailbox_send_cmd_sync
|
||||
*
|
||||
* @d : Pointer to tegra_dce struct.
|
||||
* @cmd : The command to be sent.
|
||||
* @interface : boot or admin interface
|
||||
*
|
||||
*
|
||||
* Return : 0 if successful.
|
||||
*/
|
||||
int dce_mailbox_send_cmd_sync(struct tegra_dce *d, u32 cmd, u32 interface)
|
||||
int dce_handle_mailbox_send_cmd_sync(struct tegra_dce *d, u32 cmd, u32 interface)
|
||||
{
|
||||
int ret = 0;
|
||||
struct dce_mailbox_interface *d_mb;
|
||||
@@ -203,6 +205,34 @@ int dce_mailbox_send_cmd_sync(struct tegra_dce *d, u32 cmd, u32 interface)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* dce_mailbox_send_cmd_sync - Sends command via mailbox and waits for ack.
|
||||
*
|
||||
* @d : Pointer to tegra_dce struct.
|
||||
* @cmd : The command to be sent.
|
||||
* @interface : boot or admin interface
|
||||
*
|
||||
* Return : 0 if successful.
|
||||
*/
|
||||
int dce_mailbox_send_cmd_sync(struct tegra_dce *d, u32 cmd, u32 interface)
|
||||
{
|
||||
int ret = 0;
|
||||
struct dce_mailbox_send_cmd_params params;
|
||||
|
||||
params.cmd = cmd;
|
||||
params.interface = interface;
|
||||
|
||||
ret = dce_fsm_post_event(d, EVENT_ID_DCE_BOOT_CMD_MSG_REQUESTED,
|
||||
(void *)¶ms);
|
||||
if (ret) {
|
||||
dce_err(d, "Unable to send msg ret :%d", ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* dce_mailbox_init_interface - Initializes the mailbox interface.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user