From d5a5fb3563121a4904be9185914c563070ffd021 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Mon, 31 Jul 2017 16:10:14 -0700 Subject: 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: Ie5c33f613db7ba109564b4cb2312e47ee3332afc Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1537745 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/kind_gk20a.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/kind_gk20a.h') 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 @@ * * GK20A memory kind management * - * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -36,6 +36,22 @@ extern u16 gk20a_kind_attr[]; #define GK20A_KIND_ATTR_C BIT(3) #define GK20A_KIND_ATTR_ZBC BIT(4) +/* TBD: not sure on the work creation for gk20a, doubtful */ +static inline bool gk20a_kind_work_creation_sked(u8 k) +{ + return false; +} +static inline bool gk20a_kind_work_creation_host(u8 k) +{ + return false; +} + +static inline bool gk20a_kind_work_creation(u8 k) +{ + return gk20a_kind_work_creation_sked(k) || + gk20a_kind_work_creation_host(k); +} + static inline bool gk20a_kind_is_supported(u8 k) { return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_SUPPORTED); -- cgit v1.2.2