mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: Remove dependency between volt and pmu
This patch does the following 1. Use function pointers to access volt event handler from pmu. 2. Remove volt.h header include. 3. Assign the pointer during SW setup of volt. Jira NVGPU-1956 Change-Id: I87e207c0f4e05f4d25158da276d1fad389a6354d Signed-off-by: Abdul Salam <absalam@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2097739 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
12a06fe060
commit
b70d9c0c26
@@ -26,7 +26,6 @@
|
||||
#include <nvgpu/pmu/msg.h>
|
||||
#include <nvgpu/string.h>
|
||||
#include <nvgpu/gk20a.h>
|
||||
#include <nvgpu/pmu/volt.h>
|
||||
#include <nvgpu/pmu/lsfm.h>
|
||||
#include <nvgpu/pmu/super_surface.h>
|
||||
#include <nvgpu/pmu/pmu_perfmon.h>
|
||||
@@ -561,7 +560,9 @@ void nvgpu_pmu_rpc_handler(struct gk20a *g, struct pmu_msg *msg,
|
||||
nvgpu_pmu_perfmon_rpc_handler(g, pmu, &rpc, rpc_payload);
|
||||
break;
|
||||
case PMU_UNIT_VOLT:
|
||||
nvgpu_pmu_volt_rpc_handler(g, &rpc);
|
||||
if (pmu->volt_rpc_handler != NULL) {
|
||||
pmu->volt_rpc_handler(g, &rpc);
|
||||
}
|
||||
break;
|
||||
case PMU_UNIT_CLK:
|
||||
nvgpu_pmu_dbg(g, "reply PMU_UNIT_CLK");
|
||||
|
||||
@@ -592,6 +592,8 @@ int nvgpu_volt_dev_sw_setup(struct gk20a *g)
|
||||
}
|
||||
}
|
||||
|
||||
g->pmu.volt_rpc_handler = nvgpu_pmu_volt_rpc_handler;
|
||||
|
||||
done:
|
||||
nvgpu_log_info(g, " done status %x", status);
|
||||
return status;
|
||||
|
||||
@@ -243,6 +243,8 @@ struct nvgpu_pmu {
|
||||
void (*remove_support)(struct nvgpu_pmu *pmu);
|
||||
void (*therm_rpc_handler)(struct gk20a *g,
|
||||
struct nv_pmu_rpc_header *rpc);
|
||||
void (*volt_rpc_handler)(struct gk20a *g,
|
||||
struct nv_pmu_rpc_header *rpc);
|
||||
bool sw_ready;
|
||||
|
||||
struct nvgpu_mutex isr_mutex;
|
||||
|
||||
Reference in New Issue
Block a user