From 3cc0dec8e750d6af0f8764e8058ef0f3ddf9e486 Mon Sep 17 00:00:00 2001 From: mkumbar Date: Mon, 10 Aug 2020 07:06:40 +0530 Subject: [PATCH] gpu: nvgpu: update pmu init ack to support new unit id Added new command management unit id which will be received as INIT ack from PMU ucode upon boot, For legacy chips its called as INIT id, now changed to command management id to initialize the command/message setup. JIRA NVGPU-5185 Change-Id: I85203b373cef032f75b053b903d8b6763585be1f Signed-off-by: mkumbar Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2396450 Reviewed-by: Deepak Nibade Reviewed-by: automaticguardword Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/common/pmu/ipc/pmu_msg.c | 3 ++- drivers/gpu/nvgpu/include/nvgpu/pmu/pmuif/nvgpu_cmdif.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/common/pmu/ipc/pmu_msg.c b/drivers/gpu/nvgpu/common/pmu/ipc/pmu_msg.c index e021fc71b..ae6a121bd 100644 --- a/drivers/gpu/nvgpu/common/pmu/ipc/pmu_msg.c +++ b/drivers/gpu/nvgpu/common/pmu/ipc/pmu_msg.c @@ -321,7 +321,8 @@ static int pmu_process_init_msg_fb(struct gk20a *g, struct nvgpu_pmu *pmu, pmu_read_init_msg_fb(g, pmu, tail, PMU_MSG_HDR_SIZE, (void *)&msg->hdr); - if (msg->hdr.unit_id != PMU_UNIT_INIT_DGPU) { + if (msg->hdr.unit_id != PMU_UNIT_INIT_DGPU && + msg->hdr.unit_id != PMU_UNIT_CMDMGMT) { nvgpu_err(g, "FB MSG Q: expecting init msg"); err = -EINVAL; goto exit; diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmu/pmuif/nvgpu_cmdif.h b/drivers/gpu/nvgpu/include/nvgpu/pmu/pmuif/nvgpu_cmdif.h index f2d9e1eb7..764f3cae4 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/pmu/pmuif/nvgpu_cmdif.h +++ b/drivers/gpu/nvgpu/include/nvgpu/pmu/pmuif/nvgpu_cmdif.h @@ -28,6 +28,7 @@ #include "seq.h" #define PMU_UNIT_REWIND U8(0x00) +#define PMU_UNIT_CMDMGMT U8(0x01) #define PMU_UNIT_PG U8(0x03) #define PMU_UNIT_INIT U8(0x07) #define PMU_UNIT_ACR U8(0x0A)