From 78fb67bb0b754a2061d2f3e49ea9e5cfca1d7dd3 Mon Sep 17 00:00:00 2001 From: Vedashree Vidwans Date: Fri, 2 Oct 2020 10:13:20 -0700 Subject: [PATCH] gpu: nvgpu: move fuse definitions to fuse.h Move common fuse definition macros to fuse.h. This will allow all chip specific fuse files to use the common macros. Jira NVGPU-6081 Change-Id: I85b5250809eef26a40f5b4b9bf6908dfa0d2be1f Signed-off-by: Vedashree Vidwans Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2422892 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/hal/fuse/fuse_gm20b.h | 5 ----- drivers/gpu/nvgpu/hal/fuse/fuse_gp10b_fusa.c | 1 - drivers/gpu/nvgpu/include/nvgpu/fuse.h | 4 ++++ drivers/gpu/nvgpu/os/posix/fuse.c | 2 -- userspace/units/acr/nvgpu-acr.c | 3 +-- userspace/units/fifo/nvgpu-fifo-gv11b.c | 3 +-- userspace/units/fuse/nvgpu-fuse-gm20b.c | 1 - userspace/units/fuse/nvgpu-fuse-gp10b.c | 1 - userspace/units/fuse/nvgpu-fuse-tu104.c | 2 -- userspace/units/pmu/nvgpu-pmu.c | 2 +- 10 files changed, 7 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/nvgpu/hal/fuse/fuse_gm20b.h b/drivers/gpu/nvgpu/hal/fuse/fuse_gm20b.h index 07936bb91..bf3d910f4 100644 --- a/drivers/gpu/nvgpu/hal/fuse/fuse_gm20b.h +++ b/drivers/gpu/nvgpu/hal/fuse/fuse_gm20b.h @@ -25,11 +25,6 @@ #ifndef NVGPU_FUSE_GM20B_H #define NVGPU_FUSE_GM20B_H -#define GCPLEX_CONFIG_VPR_AUTO_FETCH_DISABLE_MASK BIT32(0) -#define GCPLEX_CONFIG_VPR_ENABLED_MASK BIT32(1) -#define GCPLEX_CONFIG_WPR_ENABLED_MASK BIT32(2) - - struct gk20a; #if defined(CONFIG_NVGPU_HAL_NON_FUSA) || defined(CONFIG_NVGPU_DGPU) diff --git a/drivers/gpu/nvgpu/hal/fuse/fuse_gp10b_fusa.c b/drivers/gpu/nvgpu/hal/fuse/fuse_gp10b_fusa.c index 2e538de2f..f7be3d52b 100644 --- a/drivers/gpu/nvgpu/hal/fuse/fuse_gp10b_fusa.c +++ b/drivers/gpu/nvgpu/hal/fuse/fuse_gp10b_fusa.c @@ -28,7 +28,6 @@ #include #include -#include "fuse_gm20b.h" #include "fuse_gp10b.h" #include diff --git a/drivers/gpu/nvgpu/include/nvgpu/fuse.h b/drivers/gpu/nvgpu/include/nvgpu/fuse.h index 8d4c13d77..0f57ddabb 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/fuse.h +++ b/drivers/gpu/nvgpu/include/nvgpu/fuse.h @@ -36,6 +36,10 @@ struct gk20a; #include "include/nvgpu/nvgpu_next_fuse.h" #endif +#define GCPLEX_CONFIG_VPR_AUTO_FETCH_DISABLE_MASK BIT32(0) +#define GCPLEX_CONFIG_VPR_ENABLED_MASK BIT32(1) +#define GCPLEX_CONFIG_WPR_ENABLED_MASK BIT32(2) + #ifdef CONFIG_NVGPU_NON_FUSA int nvgpu_tegra_get_gpu_speedo_id(struct gk20a *g, int *id); int nvgpu_tegra_fuse_read_reserved_calib(struct gk20a *g, u32 *val); diff --git a/drivers/gpu/nvgpu/os/posix/fuse.c b/drivers/gpu/nvgpu/os/posix/fuse.c index 9d78e2f13..0ff2810b9 100644 --- a/drivers/gpu/nvgpu/os/posix/fuse.c +++ b/drivers/gpu/nvgpu/os/posix/fuse.c @@ -26,8 +26,6 @@ #include #include -#include "hal/fuse/fuse_gm20b.h" - #ifdef CONFIG_NVGPU_NON_FUSA int nvgpu_tegra_get_gpu_speedo_id(struct gk20a *g, int *id) { diff --git a/userspace/units/acr/nvgpu-acr.c b/userspace/units/acr/nvgpu-acr.c index 6b3ddf5ce..a94afef80 100644 --- a/userspace/units/acr/nvgpu-acr.c +++ b/userspace/units/acr/nvgpu-acr.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -55,8 +56,6 @@ #include #include -#include "hal/fuse/fuse_gm20b.h" - #include "nvgpu-acr.h" #include "../falcon/falcon_utf.h" #include "../gr/nvgpu-gr-gv11b.h" diff --git a/userspace/units/fifo/nvgpu-fifo-gv11b.c b/userspace/units/fifo/nvgpu-fifo-gv11b.c index c81c16685..9a8b2882a 100644 --- a/userspace/units/fifo/nvgpu-fifo-gv11b.c +++ b/userspace/units/fifo/nvgpu-fifo-gv11b.c @@ -23,12 +23,11 @@ #include #include +#include #include #include -#include "hal/fuse/fuse_gm20b.h" - #include "nvgpu-fifo-gv11b.h" /* diff --git a/userspace/units/fuse/nvgpu-fuse-gm20b.c b/userspace/units/fuse/nvgpu-fuse-gm20b.c index 6fa3f8549..9e508f480 100644 --- a/userspace/units/fuse/nvgpu-fuse-gm20b.c +++ b/userspace/units/fuse/nvgpu-fuse-gm20b.c @@ -27,7 +27,6 @@ #include #include #include -#include "hal/fuse/fuse_gm20b.h" #include "nvgpu-fuse-priv.h" #include "nvgpu-fuse-gm20b.h" diff --git a/userspace/units/fuse/nvgpu-fuse-gp10b.c b/userspace/units/fuse/nvgpu-fuse-gp10b.c index 5ecd52d9a..f078efabb 100644 --- a/userspace/units/fuse/nvgpu-fuse-gp10b.c +++ b/userspace/units/fuse/nvgpu-fuse-gp10b.c @@ -25,7 +25,6 @@ #include #include #include -#include "hal/fuse/fuse_gm20b.h" #include "nvgpu-fuse-priv.h" #include "nvgpu-fuse-gp10b.h" diff --git a/userspace/units/fuse/nvgpu-fuse-tu104.c b/userspace/units/fuse/nvgpu-fuse-tu104.c index 222790b5d..5f1533a26 100644 --- a/userspace/units/fuse/nvgpu-fuse-tu104.c +++ b/userspace/units/fuse/nvgpu-fuse-tu104.c @@ -29,8 +29,6 @@ #include #include -#include "hal/fuse/fuse_gm20b.h" - #include "nvgpu-fuse-priv.h" #include "nvgpu-fuse-tu104.h" diff --git a/userspace/units/pmu/nvgpu-pmu.c b/userspace/units/pmu/nvgpu-pmu.c index b757e45ce..9c473cf4d 100644 --- a/userspace/units/pmu/nvgpu-pmu.c +++ b/userspace/units/pmu/nvgpu-pmu.c @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -42,7 +43,6 @@ #include #include -#include "hal/fuse/fuse_gm20b.h" #include "hal/pmu/pmu_gk20a.h" #include "../falcon/falcon_utf.h"