From bcdac829f44afc1b08941c507e691866f3a9cb38 Mon Sep 17 00:00:00 2001 From: Nitin Kumbhar Date: Mon, 13 Aug 2018 10:09:04 +0530 Subject: gpu: nvgpu: move therm debugfs to linux Move debugfs related code of therm from common driver to linux specific part of the driver. gp106_therm_debugfs_init() is updated to use nvgpu_os_linux_ops. This also affects gv100 as gp106_therm_debugfs_init is used for gv100 as well. JIRA NVGPU-603 Change-Id: Ia293d14599bc0c91fd1e917b5a430bd8f3d96e56 Signed-off-by: Nitin Kumbhar Reviewed-on: https://git-master.nvidia.com/r/1797906 GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/therm/therm_gp106.c | 33 +--------------------------- drivers/gpu/nvgpu/common/therm/therm_gp106.h | 5 +---- 2 files changed, 2 insertions(+), 36 deletions(-) (limited to 'drivers/gpu/nvgpu/common/therm') diff --git a/drivers/gpu/nvgpu/common/therm/therm_gp106.c b/drivers/gpu/nvgpu/common/therm/therm_gp106.c index 1f82aa7a..cc3127d7 100644 --- a/drivers/gpu/nvgpu/common/therm/therm_gp106.c +++ b/drivers/gpu/nvgpu/common/therm/therm_gp106.c @@ -21,16 +21,12 @@ */ #include + #include "gk20a/gk20a.h" #include "therm_gp106.h" #include "therm/thrmpmu.h" -#ifdef CONFIG_DEBUG_FS -#include -#include "os/linux/os_linux.h" -#endif - #include #include @@ -66,33 +62,6 @@ int gp106_get_internal_sensor_curr_temp(struct gk20a *g, u32 *temp_f24_8) return err; } -#ifdef CONFIG_DEBUG_FS -static int therm_get_internal_sensor_curr_temp(void *data, u64 *val) -{ - struct gk20a *g = (struct gk20a *)data; - u32 readval; - int err; - - err = gp106_get_internal_sensor_curr_temp(g, &readval); - if (!err) - *val = readval; - - return err; -} -DEFINE_SIMPLE_ATTRIBUTE(therm_ctrl_fops, therm_get_internal_sensor_curr_temp, NULL, "%llu\n"); - -void gp106_therm_debugfs_init(struct gk20a *g) -{ - struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); - struct dentry *dbgentry; - - dbgentry = debugfs_create_file( - "temp", S_IRUGO, l->debugfs, g, &therm_ctrl_fops); - if (!dbgentry) - nvgpu_err(g, "debugfs entry create failed for therm_curr_temp"); -} -#endif - int gp106_elcg_init_idle_filters(struct gk20a *g) { u32 gate_ctrl, idle_filter; diff --git a/drivers/gpu/nvgpu/common/therm/therm_gp106.h b/drivers/gpu/nvgpu/common/therm/therm_gp106.h index a92c2e0f..e29c993f 100644 --- a/drivers/gpu/nvgpu/common/therm/therm_gp106.h +++ b/drivers/gpu/nvgpu/common/therm/therm_gp106.h @@ -1,7 +1,7 @@ /* * general thermal control structures & definitions * - * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2018, 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"), @@ -31,9 +31,6 @@ struct gk20a; void gp106_get_internal_sensor_limits(s32 *max_24_8, s32 *min_24_8); int gp106_get_internal_sensor_curr_temp(struct gk20a *g, u32 *temp_f24_8); -#ifdef CONFIG_DEBUG_FS -void gp106_therm_debugfs_init(struct gk20a *g); -#endif int gp106_elcg_init_idle_filters(struct gk20a *g); u32 gp106_configure_therm_alert(struct gk20a *g, s32 curr_warn_temp); -- cgit v1.2.2