summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/kind_gk20a.h
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-07-31 19:10:14 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-11 17:16:46 -0400
commit83e49b39181a86d32f6350c65659b5892f8f7670 (patch)
tree2ed7e74b2ff0b3f8dc040e981f495d18f10cab4c /drivers/gpu/nvgpu/gk20a/kind_gk20a.h
parenteb9864d92dfc494d0186c4afaca81280c0953f8c (diff)
gpu: nvgpu: remove kind map inheritance
Currently, the kind map initialization inherits from earlier chips' kind map definitions and simply adds on newly supported features. This is dangerous as changes in older architectures may affect newer architectures in unpredictable ways. This patch removes inheritance between subsequent architectures' kind map initializations. Jira NVGPU-74 Change-Id: I21951c0920f69ced73088cb6670ca1894159c7b9 Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1533349 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/kind_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/kind_gk20a.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/kind_gk20a.h b/drivers/gpu/nvgpu/gk20a/kind_gk20a.h
index 28d5802c..dcc33f7d 100644
--- a/drivers/gpu/nvgpu/gk20a/kind_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/kind_gk20a.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * GK20A memory kind management 4 * GK20A memory kind management
5 * 5 *
6 * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. 6 * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify it 8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License, 9 * under the terms and conditions of the GNU General Public License,
@@ -36,6 +36,22 @@ extern u16 gk20a_kind_attr[];
36#define GK20A_KIND_ATTR_C BIT(3) 36#define GK20A_KIND_ATTR_C BIT(3)
37#define GK20A_KIND_ATTR_ZBC BIT(4) 37#define GK20A_KIND_ATTR_ZBC BIT(4)
38 38
39/* TBD: not sure on the work creation for gk20a, doubtful */
40static inline bool gk20a_kind_work_creation_sked(u8 k)
41{
42 return false;
43}
44static inline bool gk20a_kind_work_creation_host(u8 k)
45{
46 return false;
47}
48
49static inline bool gk20a_kind_work_creation(u8 k)
50{
51 return gk20a_kind_work_creation_sked(k) ||
52 gk20a_kind_work_creation_host(k);
53}
54
39static inline bool gk20a_kind_is_supported(u8 k) 55static inline bool gk20a_kind_is_supported(u8 k)
40{ 56{
41 return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_SUPPORTED); 57 return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_SUPPORTED);