From 0250221955bca63ad1ff7e3474e4886132cf8445 Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Thu, 27 Oct 2016 10:28:37 -0700 Subject: gpu: nvgpu: support negative temperatures Jira DNVGPU-166 Change-Id: Id0561d49c64096ad5cbcd23bd371b49b2e0db57c Signed-off-by: Thomas Fleury 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 --- drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c index 23fbdce0..6768dbeb 100644 --- a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c @@ -1278,9 +1278,7 @@ static int nvgpu_gpu_get_temperature(struct gk20a *g, gk20a_idle(g->dev); - /* Convert from standard S24.8 fixed point to mC */ - if (!err) - args->temperature = (temp_f24_8 * 1000) / 256; + args->temp_f24_8 = (s32)temp_f24_8; return err; } -- cgit v1.2.2