mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
Revert "Revert "nvgpu: gpu: Changes in therm_channel table parsing""
This reverts commit 33b031ed0513c379d93cdc1084c6724189dfbb80. Change-Id: I1f260ed518d7b00c1ce65f0af9f47fd64ff66b33 Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2194825 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@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
Alex Waterman
parent
98e6f68ccf
commit
375fd13eb8
@@ -29,6 +29,7 @@
|
||||
#include <nvgpu/string.h>
|
||||
|
||||
#include "thrmchannel.h"
|
||||
#include "thrmdev.h"
|
||||
#include "thrm.h"
|
||||
|
||||
static int _therm_channel_pmudatainit_device(struct gk20a *g,
|
||||
@@ -182,6 +183,11 @@ static int devinit_get_therm_channel_table(struct gk20a *g,
|
||||
}
|
||||
|
||||
therm_channel_data.device.therm_dev_idx = therm_channel_table_entry->param0;
|
||||
/* Check for valid therm device index */
|
||||
if (!nvgpu_therm_dev_idx_is_valid(g->pmu->therm_pmu,
|
||||
therm_channel_data.device.therm_dev_idx)) {
|
||||
continue;
|
||||
}
|
||||
therm_channel_data.device.therm_dev_prov_idx = therm_channel_table_entry->param1;
|
||||
|
||||
therm_channel_size = sizeof(struct therm_channel_device);
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
#include "thrmdev.h"
|
||||
#include "thrm.h"
|
||||
|
||||
bool nvgpu_therm_dev_idx_is_valid(struct therm_pmupstate *therm_pmu, u8 idx)
|
||||
{
|
||||
return boardobjgrp_idxisvalid(
|
||||
&(therm_pmu->therm_deviceobjs.super.super), idx);
|
||||
}
|
||||
|
||||
static int _therm_device_pmudata_instget(struct gk20a *g,
|
||||
struct nv_pmu_boardobjgrp *pmuboardobjgrp,
|
||||
struct nv_pmu_boardobj **ppboardobjpmudata,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* general thermal device structures & definitions
|
||||
*
|
||||
* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2016-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -58,5 +58,6 @@ struct therm_device_hbm2_combined {
|
||||
};
|
||||
|
||||
int therm_device_sw_setup(struct gk20a *g);
|
||||
bool nvgpu_therm_dev_idx_is_valid(struct therm_pmupstate *therm_pmu, u8 idx);
|
||||
|
||||
#endif /* NVGPU_THERM_THRMDEV_H */
|
||||
|
||||
Reference in New Issue
Block a user