diff --git a/drivers/gpu/nvgpu/common/gsp_scheduler/gsp_runlist.c b/drivers/gpu/nvgpu/common/gsp_scheduler/gsp_runlist.c index 08ca93edb..70990c099 100644 --- a/drivers/gpu/nvgpu/common/gsp_scheduler/gsp_runlist.c +++ b/drivers/gpu/nvgpu/common/gsp_scheduler/gsp_runlist.c @@ -91,6 +91,10 @@ static void gsp_handle_cmd_ack(struct gk20a *g, struct nv_flcn_msg_gsp *msg, nvgpu_gsp_dbg(g, "Reply to NV_GSP_UNIT_CONTROL_INFO_SEND"); *command_ack = true; break; + case NV_GSP_UNIT_BIND_CTX_REG: + nvgpu_gsp_dbg(g, "Reply to NV_GSP_UNIT_BIND_CTX_REG"); + *command_ack = true; + break; default: nvgpu_err(g, "Un-handled response from GSP"); *command_ack = false; diff --git a/drivers/gpu/nvgpu/common/gsp_scheduler/gsp_scheduler.c b/drivers/gpu/nvgpu/common/gsp_scheduler/gsp_scheduler.c index 24d1f5057..d9fdb77b0 100644 --- a/drivers/gpu/nvgpu/common/gsp_scheduler/gsp_scheduler.c +++ b/drivers/gpu/nvgpu/common/gsp_scheduler/gsp_scheduler.c @@ -32,6 +32,7 @@ #include "ipc/gsp_seq.h" #include "ipc/gsp_queue.h" #include "gsp_runlist.h" +#include "ipc/gsp_cmd.h" static void gsp_sched_get_file_names(struct gk20a *g, struct gsp_fw *gsp_ucode) { @@ -208,6 +209,12 @@ int nvgpu_gsp_sched_bootstrap_ns(struct gk20a *g) goto de_init; } + status = nvgpu_gsp_sched_bind_ctx_reg(g); + if (status != 0) { + nvgpu_err(g, "gsp bind ctx register failed"); + goto de_init; + } + status = nvgpu_gsp_sched_send_devices_info(g); if (status != 0) { nvgpu_err(g, "gsp send device info failed"); @@ -226,3 +233,15 @@ void nvgpu_gsp_sched_isr(struct gk20a *g) g->ops.gsp.gsp_isr(g, gsp); } + +int nvgpu_gsp_sched_bind_ctx_reg(struct gk20a *g) +{ + struct nv_flcn_cmd_gsp cmd = { }; + int err = 0; + nvgpu_gsp_dbg(g, " "); + + err = gsp_send_cmd_and_wait_for_ack(g, &cmd, + NV_GSP_UNIT_BIND_CTX_REG, 0); + + return err; +} \ No newline at end of file diff --git a/drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_cmd.h b/drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_cmd.h index 4d0f7d7b4..d84b7559d 100644 --- a/drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_cmd.h +++ b/drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_cmd.h @@ -49,7 +49,8 @@ struct gk20a; #define NV_GSP_UNIT_QUERY_NO_OF_DOMAINS 0x0BU #define NV_GSP_UNIT_QUERY_ACTIVE_DOMAIN 0X0CU #define NV_GSP_UNIT_CONTROL_INFO_SEND 0X0DU -#define NV_GSP_UNIT_END 0x0EU +#define NV_GSP_UNIT_BIND_CTX_REG 0X0EU +#define NV_GSP_UNIT_END 0x0FU #define GSP_MSG_HDR_SIZE U32(sizeof(struct gsp_hdr)) #define GSP_CMD_HDR_SIZE U32(sizeof(struct gsp_hdr)) diff --git a/drivers/gpu/nvgpu/include/nvgpu/gsp_sched.h b/drivers/gpu/nvgpu/include/nvgpu/gsp_sched.h index bb33839b6..eb77329ef 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gsp_sched.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gsp_sched.h @@ -123,4 +123,5 @@ int nvgpu_gsp_nvs_delete_domain(struct gk20a *g, u64 nvgpu_domain_id); int nvgpu_gsp_nvs_update_runlist(struct gk20a *g, const char *name,struct nvgpu_runlist *rl); int nvgpu_gps_sched_update_runlist(struct gk20a *g, struct nvgpu_runlist_domain *domain, struct nvgpu_runlist *rl); +int nvgpu_gsp_sched_bind_ctx_reg(struct gk20a *g); #endif /* GSP_SCHED_H */