mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: support negative temperatures
Jira DNVGPU-166 Change-Id: Id0561d49c64096ad5cbcd23bd371b49b2e0db57c Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: http://git-master/r/1245557 (cherry picked from commit 2e0269c76fdda5c8e1a30ca7ef73a08ebe644f88) Reviewed-on: http://git-master/r/1267156 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
02b8cda953
commit
0250221955
@@ -1278,9 +1278,7 @@ static int nvgpu_gpu_get_temperature(struct gk20a *g,
|
|||||||
|
|
||||||
gk20a_idle(g->dev);
|
gk20a_idle(g->dev);
|
||||||
|
|
||||||
/* Convert from standard S24.8 fixed point to mC */
|
args->temp_f24_8 = (s32)temp_f24_8;
|
||||||
if (!err)
|
|
||||||
args->temperature = (temp_f24_8 * 1000) / 256;
|
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -743,7 +743,10 @@ struct nvgpu_gpu_get_power_args {
|
|||||||
|
|
||||||
struct nvgpu_gpu_get_temperature_args {
|
struct nvgpu_gpu_get_temperature_args {
|
||||||
__u32 reserved[3];
|
__u32 reserved[3];
|
||||||
__u32 temperature; /* mC */
|
/* Temperature in signed fixed point format SFXP24.8
|
||||||
|
* Celsius = temp_f24_8 / 256.
|
||||||
|
*/
|
||||||
|
__s32 temp_f24_8;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \
|
#define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \
|
||||||
|
|||||||
Reference in New Issue
Block a user