From 8d6b654afb8d2d71b8a2d6c9c6e8c8d46a0e64b9 Mon Sep 17 00:00:00 2001 From: Seeta Rama Raju Date: Mon, 7 Dec 2020 17:42:43 +0530 Subject: [PATCH] gpu: nvgpu: compile out bios dependency from safety build - bios not supported for safety, so removing all bios dependencies like inclusion of bios header file and gops_bios structure from safety build. JIRA NVGPU-6302 Change-Id: I47c0be043dc2542ed34e5ef6d65b75ce8b57d276 Signed-off-by: Seeta Rama Raju Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2456059 (cherry picked from commit c7554856aac4745038f8ca802a3e0b3a9cbb7f3c) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2481700 Reviewed-by: Prateek Sethi Reviewed-by: Ankur Kishore Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/include/nvgpu/gk20a.h | 2 ++ drivers/gpu/nvgpu/include/nvgpu/gops/bios.h | 4 +++- drivers/gpu/nvgpu/include/nvgpu/gpu_ops.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index 683ee05f1..c1d8bf204 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h @@ -135,7 +135,9 @@ enum nvgpu_profiler_pm_reservation_scope; #include #include #include +#ifdef CONFIG_NVGPU_DGPU #include +#endif #include #include #include diff --git a/drivers/gpu/nvgpu/include/nvgpu/gops/bios.h b/drivers/gpu/nvgpu/include/nvgpu/gops/bios.h index d4dd6133b..6fec13906 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gops/bios.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gops/bios.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020-2021, 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"), @@ -22,6 +22,7 @@ #ifndef NVGPU_GOPS_BIOS_H #define NVGPU_GOPS_BIOS_H +#ifdef CONFIG_NVGPU_DGPU struct gops_bios { int (*bios_sw_init)(struct gk20a *g); void (*bios_sw_deinit)(struct gk20a *g, @@ -29,5 +30,6 @@ struct gops_bios { u32 (*get_aon_secure_scratch_reg)(struct gk20a *g, u32 i); bool (*wait_for_bios_init_done)(struct gk20a *g); }; +#endif #endif /* NVGPU_GOPS_BIOS_H */ diff --git a/drivers/gpu/nvgpu/include/nvgpu/gpu_ops.h b/drivers/gpu/nvgpu/include/nvgpu/gpu_ops.h index 7a3f81925..79d4f94f8 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gpu_ops.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gpu_ops.h @@ -176,11 +176,11 @@ struct gpu_ops { struct gops_bus bus; /** Ptimer hal ops. */ struct gops_ptimer ptimer; - struct gops_bios bios; #ifdef CONFIG_NVGPU_CYCLESTATS struct gops_css css; #endif #ifdef CONFIG_NVGPU_DGPU + struct gops_bios bios; struct gops_xve xve; #endif /** Falcon hal ops. */