From bd5ade293d0eb3bcb1352b570cee2de1ad08a591 Mon Sep 17 00:00:00 2001 From: rmylavarapu Date: Wed, 22 Jun 2022 12:03:52 +0000 Subject: [PATCH] gpu: nvgpu: gsp: msg: remove event handle support Changes: - Currently we are not using any event handling between NVGPU and GSP. So removing the event handler function and directly calling response handler. - This change will fix the respective coverity issue. CID 10138010 Change-Id: I12ddb0012ad9f54bf99f707ab2123598065561d8 Signed-off-by: rmylavarapu Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2732628 Tested-by: mobile promotions Reviewed-by: mobile promotions --- .../nvgpu/common/gsp_scheduler/ipc/gsp_msg.c | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_msg.c b/drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_msg.c index 081081d54..d7fd6e341 100644 --- a/drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_msg.c +++ b/drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_msg.c @@ -39,20 +39,6 @@ static int gsp_response_handle(struct nvgpu_gsp_sched *gsp_sched, msg, msg->hdr.seq_id); } -static int gsp_handle_event(struct nvgpu_gsp_sched *gsp_sched, - struct nv_flcn_msg_gsp *msg) -{ - int err = 0; - - switch (msg->hdr.unit_id) { - default: - break; - } - - (void)gsp_sched; - return err; -} - static bool gsp_read_message(struct nvgpu_gsp_sched *gsp_sched, u32 queue_id, struct nv_flcn_msg_gsp *msg, int *status) { @@ -194,12 +180,9 @@ int nvgpu_gsp_process_message(struct gk20a *g) nvgpu_info(g, "ctrl_flags = 0x%08x, seq_id = 0x%08x", msg.hdr.ctrl_flags, msg.hdr.seq_id); - msg.hdr.ctrl_flags &= (u8)~GSP_CMD_FLAGS_MASK; - - if (msg.hdr.ctrl_flags == GSP_CMD_FLAGS_EVENT) { - gsp_handle_event(gsp_sched, &msg); - } else { - gsp_response_handle(gsp_sched, &msg); + status = gsp_response_handle(gsp_sched, &msg); + if (status != 0) { + return status; } if (!nvgpu_gsp_queue_is_empty(gsp_sched->queues,