mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
platform: dce: Add bootsrap2 command
Add support to the bootstrap command over the admin channel, which will be called when a client registers. This command will perform steps that must be performed only after the client is ready. TODO: This bootstrap-2 command will be replaced by the existing bootstrap command which we call during DCE-FW bootstrapping once we split admin bootstrapping and RM bootstrapping in the DCE-KMD. Jira TDS-17135 Change-Id: I55330b9ce73e1acf20e2a80d392d7984c91ed65f Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3274949 Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com>
This commit is contained in:
@@ -665,6 +665,46 @@ int dce_admin_get_ipc_channel_info(struct tegra_dce *d,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* dce_admin_send_bootstrap2 - Sends DCE_ADMIN_CMD_RM_BOOTSTRAP2 cmd.
|
||||
*
|
||||
* @d - Pointer to tegra_dce struct.
|
||||
* @msg - Pointer to dce_ipc_msg struct.
|
||||
*
|
||||
* Return - 0 if successful
|
||||
*/
|
||||
int dce_admin_send_cmd_rm_bootstrap(struct tegra_dce *d,
|
||||
struct dce_ipc_message *msg)
|
||||
{
|
||||
int ret = -1;
|
||||
struct dce_admin_ipc_cmd *req_msg;
|
||||
struct dce_admin_ipc_resp *resp_msg;
|
||||
|
||||
if (!msg || !msg->tx.data || !msg->rx.data)
|
||||
goto out;
|
||||
|
||||
/* return if dce bootstrap not completed */
|
||||
if (!dce_is_bootstrap_done(d)) {
|
||||
dce_os_err(d, "Admin Bootstrap not yet done");
|
||||
goto out;
|
||||
}
|
||||
|
||||
req_msg = (struct dce_admin_ipc_cmd *)(msg->tx.data);
|
||||
resp_msg = (struct dce_admin_ipc_resp *) (msg->rx.data);
|
||||
|
||||
req_msg->cmd = (uint32_t)DCE_ADMIN_CMD_RM_BOOTSTRAP2;
|
||||
|
||||
ret = dce_admin_send_msg(d, msg);
|
||||
if ((ret) || (resp_msg->error != DCE_ERR_CORE_SUCCESS)) {
|
||||
dce_os_err(d, "Error sending bootstrap msg : [%d]", ret);
|
||||
ret = ret ? ret : resp_msg->error;
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* dce_admin_send_cmd_echo - Sends DCE_ADMIN_CMD_ECHO cmd.
|
||||
*
|
||||
|
||||
@@ -401,6 +401,8 @@ int dce_admin_get_ipc_channel_info(struct tegra_dce *d,
|
||||
struct dce_ipc_queue_info *q_info);
|
||||
int dce_admin_send_cmd_echo(struct tegra_dce *d,
|
||||
struct dce_ipc_message *msg);
|
||||
int dce_admin_send_cmd_rm_bootstrap(struct tegra_dce *d,
|
||||
struct dce_ipc_message *msg);
|
||||
int dce_admin_send_cmd_ext_test(struct tegra_dce *d,
|
||||
struct dce_ipc_message *msg);
|
||||
int dce_admin_send_prepare_sc7(struct tegra_dce *d,
|
||||
|
||||
@@ -74,8 +74,9 @@
|
||||
#define DCE_ADMIN_CMD_PERF_RESULTS 0x16U // copy out the perf results
|
||||
#define DCE_ADMIN_CMD_PERF_GET_EVENTS 0x17U // get perf events
|
||||
#define DCE_ADMIN_CMD_PERF_CLEAR_EVENTS 0x18U // clear perf events
|
||||
#define DCE_ADMIN_CMD_RM_BOOTSTRAP2 0x19U // tell RM to "bootstrap" display-server
|
||||
|
||||
#define DCE_ADMIN_CMD_NEXT 0x19U // must be last command ID + 1
|
||||
#define DCE_ADMIN_CMD_NEXT 0x1AU // must be last command ID + 1
|
||||
|
||||
struct dce_admin_version_info {
|
||||
uint32_t version;
|
||||
|
||||
Reference in New Issue
Block a user