From 10e45ac4c873fae7e1f619a6b9c7f21c47957502 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Tue, 18 Apr 2023 14:27:22 +0000 Subject: [PATCH] video: gr_comm: Get rid of CONFIG_TEGRA_GR_VIRTUALIZATION The config option CONFIG_TEGRA_GR_VIRTUALIZATION is passed the driver s debug option to support the driver to build as built-in or module. As nvidia-oot drivers are only build as module, remove the explicitly pass of the option of CONFIG_TEGRA_GR_VIRTUALIZATION and related code. Bug 4074863 Change-Id: I6f7dbe0c97c95f98bd010813d211fd196c88d585 Signed-off-by: Laxman Dewangan Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889983 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/video/tegra/virt/Makefile | 8 ++-- drivers/video/tegra/virt/tegra_gr_comm.c | 4 -- include/linux/tegra_gr_comm.h | 50 ------------------------ 3 files changed, 3 insertions(+), 59 deletions(-) diff --git a/drivers/video/tegra/virt/Makefile b/drivers/video/tegra/virt/Makefile index 426d0412..e80daf36 100644 --- a/drivers/video/tegra/virt/Makefile +++ b/drivers/video/tegra/virt/Makefile @@ -1,6 +1,4 @@ -ifeq ($(CONFIG_TEGRA_OOT_MODULE),m) -ccflags-y += -DCONFIG_TEGRA_GR_VIRTUALIZATION -DCONFIG_TEGRA_OOT_MODULE +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. + obj-m = tegra_gr_comm.o -else -obj-$(CONFIG_TEGRA_GR_VIRTUALIZATION) += tegra_gr_comm.o -endif diff --git a/drivers/video/tegra/virt/tegra_gr_comm.c b/drivers/video/tegra/virt/tegra_gr_comm.c index 0af693b3..ace6a90f 100644 --- a/drivers/video/tegra/virt/tegra_gr_comm.c +++ b/drivers/video/tegra/virt/tegra_gr_comm.c @@ -21,11 +21,7 @@ #include #include -#ifdef CONFIG_TEGRA_OOT_MODULE #include -#else -#include -#endif #define NUM_QUEUES 5 #define NUM_CONTEXTS 1 diff --git a/include/linux/tegra_gr_comm.h b/include/linux/tegra_gr_comm.h index c5d02fc8..9020d920 100644 --- a/include/linux/tegra_gr_comm.h +++ b/include/linux/tegra_gr_comm.h @@ -12,7 +12,6 @@ #define TEGRA_GR_COMM_ID_SELF (0xFF) -#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION int tegra_gr_comm_init(struct platform_device *pdev, u32 elems, const size_t *queue_sizes, u32 queue_start, u32 num_queues); void tegra_gr_comm_deinit(u32 queue_start, u32 num_queues); @@ -27,53 +26,4 @@ u32 tegra_gr_comm_get_server_vmid(void); void *tegra_gr_comm_oob_get_ptr(u32 peer, u32 index, void **ptr, size_t *size); void tegra_gr_comm_oob_put_ptr(void *handle); -#else -static inline int tegra_gr_comm_init(struct platform_device *pdev, - u32 elems, - const size_t *queue_sizes, u32 queue_start, - u32 num_queues) -{ - return -ENOSYS; -} - -static inline void tegra_gr_comm_deinit(u32 queue_start, - u32 num_queues) -{ -} - -static inline int tegra_gr_comm_send(u32 peer, u32 index, - void *data, size_t size) -{ - return -ENOSYS; -} - -static inline int tegra_gr_comm_recv(u32 index, void **handle, - void **data, size_t *size, u32 *sender) -{ - return -ENOSYS; -} - -static inline int tegra_gr_comm_sendrecv(u32 peer, u32 index, - void **handle, void **data, - size_t *size) -{ - return -ENOSYS; -} - -static inline void tegra_gr_comm_release(void *handle) {} - -static inline u32 tegra_gr_comm_get_server_vmid(void) -{ - return 0; -} - -static inline void *tegra_gr_comm_oob_get_ptr(u32 peer, - u32 index, void **ptr, size_t *size) -{ - return NULL; -} - -static inline void tegra_gr_comm_oob_put_ptr(void *handle) {} -#endif - #endif