From cefabe7eb1f1f1dba9692e21ab4f1b88b9163489 Mon Sep 17 00:00:00 2001 From: Sami Kiminki Date: Thu, 2 Nov 2017 22:03:15 +0200 Subject: gpu: nvgpu: Remove PTE kind logic Since NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL was made mandatory, kernel does not need to know the details about the PTE kinds anymore. Thus, we can remove the kind_gk20a.h header and the code related to kind table setup, as well as simplify buffer mapping code a bit. Bug 1902982 Change-Id: Iaf798023c219a64fb0a84da09431c5ce4bc046eb Signed-off-by: Sami Kiminki Reviewed-on: https://git-master.nvidia.com/r/1560933 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/kind_gk20a.h | 90 ------------------------------------ 1 file changed, 90 deletions(-) delete mode 100644 drivers/gpu/nvgpu/gk20a/kind_gk20a.h (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 deleted file mode 100644 index da7c13cd..00000000 --- a/drivers/gpu/nvgpu/gk20a/kind_gk20a.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * drivers/video/tegra/host/gk20a/kind_gk20a.h - * - * GK20A memory kind management - * - * Copyright (c) 2011-2017, 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"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#ifndef __KIND_GK20A_H__ -#define __KIND_GK20A_H__ - -#include - -void gk20a_init_uncompressed_kind_map(void); -void gk20a_init_kind_attr(void); - -extern u16 gk20a_kind_attr[]; -#define NV_KIND_ATTR_SIZE 256 -#define NV_KIND_DEFAULT -1 - -#define GK20A_KIND_ATTR_SUPPORTED BIT(0) -#define GK20A_KIND_ATTR_COMPRESSIBLE BIT(1) -#define GK20A_KIND_ATTR_Z BIT(2) -#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); -} -static inline bool gk20a_kind_is_compressible(u8 k) -{ - return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_COMPRESSIBLE); -} - -static inline bool gk20a_kind_is_z(u8 k) -{ - return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_Z); -} - -static inline bool gk20a_kind_is_c(u8 k) -{ - return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_C); -} -static inline bool gk20a_kind_is_zbc(u8 k) -{ - return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_ZBC); -} - -/* maps kind to its uncompressed version */ -extern u8 gk20a_uc_kind_map[]; -static inline u8 gk20a_get_uncompressed_kind(u8 k) -{ - return gk20a_uc_kind_map[k]; -} - -#endif /* __KIND_GK20A_H__ */ -- cgit v1.2.2