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. */