mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: Clean clk_vin unit
-Removed nvgpu_ tag for clk_vin_rpc_pmucmdhandler function and made static as it is used only by clk_vin unit. -Removed Whitespaces -Fix ACV errors NVGPU-1964 Change-Id: I05634a5128d0c73b15a22786efcc164270eb8668 Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2090553 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> 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
0d901ede6e
commit
295ff82fc9
@@ -34,16 +34,16 @@
|
||||
|
||||
#include "clk_vin.h"
|
||||
|
||||
struct nvgpu_clk_vin_rpc_pmucmdhandler_params {
|
||||
struct clk_vin_rpc_pmucmdhandler_params {
|
||||
struct nv_pmu_clk_rpc *prpccall;
|
||||
u32 success;
|
||||
};
|
||||
|
||||
void nvgpu_clk_vin_rpc_pmucmdhandler(struct gk20a *g, struct pmu_msg *msg,
|
||||
static void clk_vin_rpc_pmucmdhandler(struct gk20a *g, struct pmu_msg *msg,
|
||||
void *param, u32 status)
|
||||
{
|
||||
struct nvgpu_clk_vin_rpc_pmucmdhandler_params *phandlerparams =
|
||||
(struct nvgpu_clk_vin_rpc_pmucmdhandler_params *)param;
|
||||
struct clk_vin_rpc_pmucmdhandler_params *phandlerparams =
|
||||
(struct clk_vin_rpc_pmucmdhandler_params *)param;
|
||||
|
||||
nvgpu_log_info(g, " ");
|
||||
|
||||
@@ -62,11 +62,9 @@ static int devinit_get_vin_device_table(struct gk20a *g,
|
||||
struct nvgpu_avfsvinobjs *pvinobjs);
|
||||
|
||||
static int vin_device_construct_v20(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
size_t size, void *pargs);
|
||||
struct boardobj **ppboardobj, size_t size, void *pargs);
|
||||
static int vin_device_construct_super(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
size_t size, void *pargs);
|
||||
struct boardobj **ppboardobj, size_t size, void *pargs);
|
||||
static struct nvgpu_vin_device *construct_vin_device(
|
||||
struct gk20a *g, void *pargs);
|
||||
|
||||
@@ -122,7 +120,8 @@ static int _clk_vin_devgrp_pmudatainit_super(struct gk20a *g,
|
||||
struct nv_pmu_clk_clk_vin_device_boardobjgrp_set_header *pset =
|
||||
(struct nv_pmu_clk_clk_vin_device_boardobjgrp_set_header *)
|
||||
pboardobjgrppmu;
|
||||
struct nvgpu_avfsvinobjs *pvin_obbj = (struct nvgpu_avfsvinobjs *)pboardobjgrp;
|
||||
struct nvgpu_avfsvinobjs *pvin_obbj = (struct nvgpu_avfsvinobjs *)
|
||||
(void *)pboardobjgrp;
|
||||
int status = 0;
|
||||
|
||||
nvgpu_log_info(g, " ");
|
||||
@@ -137,8 +136,7 @@ static int _clk_vin_devgrp_pmudatainit_super(struct gk20a *g,
|
||||
|
||||
static int _clk_vin_devgrp_pmudata_instget(struct gk20a *g,
|
||||
struct nv_pmu_boardobjgrp *pmuboardobjgrp,
|
||||
struct nv_pmu_boardobj **ppboardobjpmudata,
|
||||
u8 idx)
|
||||
struct nv_pmu_boardobj **ppboardobjpmudata, u8 idx)
|
||||
{
|
||||
struct nv_pmu_clk_clk_vin_device_boardobj_grp_set *pgrp_set =
|
||||
(struct nv_pmu_clk_clk_vin_device_boardobj_grp_set *)
|
||||
@@ -160,10 +158,10 @@ static int _clk_vin_devgrp_pmudata_instget(struct gk20a *g,
|
||||
|
||||
static int _clk_vin_devgrp_pmustatus_instget(struct gk20a *g,
|
||||
void *pboardobjgrppmu,
|
||||
struct nv_pmu_boardobj_query **ppboardobjpmustatus,
|
||||
u8 idx)
|
||||
struct nv_pmu_boardobj_query **ppboardobjpmustatus, u8 idx)
|
||||
{
|
||||
struct nv_pmu_clk_clk_vin_device_boardobj_grp_get_status *pgrp_get_status =
|
||||
struct nv_pmu_clk_clk_vin_device_boardobj_grp_get_status
|
||||
*pgrp_get_status =
|
||||
(struct nv_pmu_clk_clk_vin_device_boardobj_grp_get_status *)
|
||||
pboardobjgrppmu;
|
||||
|
||||
@@ -318,7 +316,8 @@ static int devinit_get_vin_device_table(struct gk20a *g,
|
||||
|
||||
vin_device_data.boardobj.type =
|
||||
(u8)vin_desc_table_entry.vin_device_type;
|
||||
vin_device_data.vin_device.id = (u8)vin_desc_table_entry.vin_device_id;
|
||||
vin_device_data.vin_device.id =
|
||||
(u8)vin_desc_table_entry.vin_device_id;
|
||||
vin_device_data.vin_device.volt_domain_vbios =
|
||||
(u8)vin_desc_table_entry.volt_domain_vbios;
|
||||
vin_device_data.vin_device.flls_shared_mask = 0;
|
||||
@@ -344,8 +343,7 @@ done:
|
||||
}
|
||||
|
||||
static int vin_device_construct_v20(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
size_t size, void *pargs)
|
||||
struct boardobj **ppboardobj, size_t size, void *pargs)
|
||||
{
|
||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||
struct vin_device_v20 *pvin_device_v20;
|
||||
@@ -368,15 +366,17 @@ static int vin_device_construct_v20(struct gk20a *g,
|
||||
vin_device_init_pmudata_v20;
|
||||
|
||||
pvin_device_v20->data.cal_type = ptmpvin_device_v20->data.cal_type;
|
||||
pvin_device_v20->data.vin_cal.cal_v20.offset = ptmpvin_device_v20->data.vin_cal.cal_v20.offset;
|
||||
pvin_device_v20->data.vin_cal.cal_v20.gain = ptmpvin_device_v20->data.vin_cal.cal_v20.gain;
|
||||
pvin_device_v20->data.vin_cal.cal_v20.offset_vfe_idx = ptmpvin_device_v20->data.vin_cal.cal_v20.offset_vfe_idx;
|
||||
pvin_device_v20->data.vin_cal.cal_v20.offset =
|
||||
ptmpvin_device_v20->data.vin_cal.cal_v20.offset;
|
||||
pvin_device_v20->data.vin_cal.cal_v20.gain =
|
||||
ptmpvin_device_v20->data.vin_cal.cal_v20.gain;
|
||||
pvin_device_v20->data.vin_cal.cal_v20.offset_vfe_idx =
|
||||
ptmpvin_device_v20->data.vin_cal.cal_v20.offset_vfe_idx;
|
||||
|
||||
return status;
|
||||
}
|
||||
static int vin_device_construct_super(struct gk20a *g,
|
||||
struct boardobj **ppboardobj,
|
||||
size_t size, void *pargs)
|
||||
struct boardobj **ppboardobj, size_t size, void *pargs)
|
||||
{
|
||||
struct nvgpu_vin_device *pvin_device;
|
||||
struct nvgpu_vin_device *ptmpvin_device =
|
||||
@@ -440,8 +440,10 @@ static int vin_device_init_pmudata_v20(struct gk20a *g,
|
||||
ppmudata;
|
||||
|
||||
perf_pmu_data->data.cal_type = pvin_dev_v20->data.cal_type;
|
||||
perf_pmu_data->data.vin_cal.cal_v20.offset = pvin_dev_v20->data.vin_cal.cal_v20.offset;
|
||||
perf_pmu_data->data.vin_cal.cal_v20.gain = pvin_dev_v20->data.vin_cal.cal_v20.gain;
|
||||
perf_pmu_data->data.vin_cal.cal_v20.offset =
|
||||
pvin_dev_v20->data.vin_cal.cal_v20.offset;
|
||||
perf_pmu_data->data.vin_cal.cal_v20.gain =
|
||||
pvin_dev_v20->data.vin_cal.cal_v20.gain;
|
||||
perf_pmu_data->data.vin_cal.cal_v20.offset_vfe_idx =
|
||||
pvin_dev_v20->data.vin_cal.cal_v20.offset_vfe_idx;
|
||||
|
||||
@@ -484,13 +486,13 @@ int nvgpu_clk_pmu_vin_load(struct gk20a *g)
|
||||
struct pmu_payload payload;
|
||||
int status;
|
||||
struct nv_pmu_clk_rpc rpccall;
|
||||
struct nvgpu_clk_vin_rpc_pmucmdhandler_params handler;
|
||||
struct clk_vin_rpc_pmucmdhandler_params handler;
|
||||
struct nv_pmu_clk_load *clkload;
|
||||
|
||||
(void) memset(&payload, 0, sizeof(struct pmu_payload));
|
||||
(void) memset(&rpccall, 0, sizeof(struct nv_pmu_clk_rpc));
|
||||
(void) memset(&handler, 0,
|
||||
sizeof(struct nvgpu_clk_vin_rpc_pmucmdhandler_params));
|
||||
sizeof(struct clk_vin_rpc_pmucmdhandler_params));
|
||||
|
||||
rpccall.function = NV_PMU_CLK_RPC_ID_LOAD;
|
||||
clkload = &rpccall.params.clk_load;
|
||||
@@ -521,7 +523,7 @@ int nvgpu_clk_pmu_vin_load(struct gk20a *g)
|
||||
handler.success = 0;
|
||||
status = nvgpu_pmu_cmd_post(g, &cmd, &payload,
|
||||
PMU_COMMAND_QUEUE_LPQ,
|
||||
nvgpu_clk_vin_rpc_pmucmdhandler, (void *)&handler);
|
||||
clk_vin_rpc_pmucmdhandler, (void *)&handler);
|
||||
|
||||
if (status != 0) {
|
||||
nvgpu_err(g, "unable to post clk RPC cmd %x",
|
||||
|
||||
@@ -33,7 +33,4 @@ struct vin_device_v20 {
|
||||
struct ctrl_clk_vin_device_info_data_v20 data;
|
||||
};
|
||||
|
||||
void nvgpu_clk_vin_rpc_pmucmdhandler(struct gk20a *g, struct pmu_msg *msg,
|
||||
void *param, u32 status);
|
||||
|
||||
#endif /* NVGPU_CLK_VIN_H */
|
||||
|
||||
Reference in New Issue
Block a user