summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/nvgpu_gpuid.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2014-10-27 05:06:59 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:11:54 -0400
commit2d5ff668cbc6a932df2c9cf79627d1d340e5c2c0 (patch)
tree1d9bc4b774a9c2cea339891eaef3af5b87ee354d /drivers/gpu/nvgpu/nvgpu_gpuid.h
parent23a182aaa61d120c965f1bce09609cc14d4e14eb (diff)
gpu: nvgpu: GR and LTC HAL to use const structs
Convert GR and LTC HALs to use const structs, and initialize them with macros. Bug 1567274 Change-Id: Ia3f24a5eccb27578d9cba69755f636818d11275c Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/590371
Diffstat (limited to 'drivers/gpu/nvgpu/nvgpu_gpuid.h')
-rw-r--r--drivers/gpu/nvgpu/nvgpu_gpuid.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/nvgpu_gpuid.h b/drivers/gpu/nvgpu/nvgpu_gpuid.h
new file mode 100644
index 00000000..391d286e
--- /dev/null
+++ b/drivers/gpu/nvgpu/nvgpu_gpuid.h
@@ -0,0 +1,30 @@
1/*
2 * NVIDIA GPU ID functions, definitions.
3 *
4 * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 */
15#ifndef _NVGPU_GPUID_H_
16#define _NVGPU_GPUID_H_
17
18#define NVGPU_GPU_ARCHITECTURE_SHIFT 4
19
20/* constructs unique and compact GPUID from nvgpu_gpu_characteristics
21 * arch/impl fields */
22#define NVGPU_GPUID(arch, impl) ((u32) ((arch) | (impl)))
23
24#define NVGPU_GPUID_GK20A \
25 NVGPU_GPUID(NVGPU_GPU_ARCH_GK100, NVGPU_GPU_IMPL_GK20A)
26
27#define NVGPU_GPUID_GM20B \
28 NVGPU_GPUID(NVGPU_GPU_ARCH_GM200, NVGPU_GPU_IMPL_GM20B)
29
30#endif /* _NVGPU_GPU_ID_H_ */