From a6d28bc2c8fca57fbf0df9212a149fd5d507a7ca Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 7 Mar 2024 17:49:42 +0000 Subject: [PATCH] gpu: host1x-nvhost: Remove unused functions The functions nvhost_job_put() and nvhost_syncpt_set_minval() are no longer used so remove these functions. The flag CONFIG_TEGRA_HOST1X is always true for out-of-tree drivers and so remove the legacy code for when this flag is not defined. Bug 4475969 Change-Id: I88c89d30bfc9be4b8628f115ea96835cb5f6f295 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091653 GVS: Gerrit_Virtual_Submit Reviewed-by: Laxman Dewangan Reviewed-by: Brad Griffis --- drivers/gpu/host1x-nvhost/nvhost.c | 17 ----------------- include/linux/nvhost.h | 4 ---- include/linux/nvhost_t194.h | 11 +---------- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/drivers/gpu/host1x-nvhost/nvhost.c b/drivers/gpu/host1x-nvhost/nvhost.c index 49407ed9..ed685f51 100644 --- a/drivers/gpu/host1x-nvhost/nvhost.c +++ b/drivers/gpu/host1x-nvhost/nvhost.c @@ -307,23 +307,6 @@ int nvhost_syncpt_is_expired_ext(struct platform_device *pdev, u32 id, } EXPORT_SYMBOL(nvhost_syncpt_is_expired_ext); -void nvhost_syncpt_set_minval(struct platform_device *pdev, u32 id, u32 val) -{ - struct nvhost_device_data *pdata = platform_get_drvdata(pdev); - struct host1x_syncpt *sp; - u32 cur; - - sp = host1x_syncpt_get_by_id_noref(pdata->host1x, id); - if (WARN_ON(!sp)) - return; - - cur = host1x_syncpt_read(sp); - - while (cur++ != val) - host1x_syncpt_incr(sp); -} -EXPORT_SYMBOL(nvhost_syncpt_set_minval); - void nvhost_syncpt_set_min_update(struct platform_device *pdev, u32 id, u32 val) { struct nvhost_device_data *pdata = platform_get_drvdata(pdev); diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h index 5bee102b..180e807e 100644 --- a/include/linux/nvhost.h +++ b/include/linux/nvhost.h @@ -12,7 +12,6 @@ struct nvhost_ctrl_sync_fence_info; struct nvhost_fence; -struct nvhost_job; #define NVHOST_MODULE_MAX_CLOCKS 8 #define NVHOST_MODULE_MAX_IORESOURCE_MEM 5 @@ -213,7 +212,6 @@ u32 nvhost_get_syncpt_gpu_managed(struct platform_device *pdev, const char *syncpt_name); void nvhost_syncpt_put_ref_ext(struct platform_device *pdev, u32 id); bool nvhost_syncpt_is_valid_pt_ext(struct platform_device *dev, u32 id); -void nvhost_syncpt_set_minval(struct platform_device *dev, u32 id, u32 val); void nvhost_syncpt_set_min_update(struct platform_device *pdev, u32 id, u32 val); int nvhost_syncpt_read_ext_check(struct platform_device *dev, u32 id, u32 *val); u32 nvhost_syncpt_read_maxval(struct platform_device *dev, u32 id); @@ -269,8 +267,6 @@ static inline int nvhost_fence_foreach_pt( return -EOPNOTSUPP; } -static inline void nvhost_job_put(struct nvhost_job *job) {} - static inline struct nvhost_fence *nvhost_fence_get(int fd) { return NULL; diff --git a/include/linux/nvhost_t194.h b/include/linux/nvhost_t194.h index ceae4ee1..34837b9d 100644 --- a/include/linux/nvhost_t194.h +++ b/include/linux/nvhost_t194.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2017-2023, NVIDIA Corporation. All rights reserved. + * Copyright (c) 2017-2024, NVIDIA Corporation. All rights reserved. */ #ifndef __LINUX_NVHOST_T194_H__ @@ -13,17 +13,8 @@ int nvhost_syncpt_unit_interface_get_aperture( u32 nvhost_syncpt_unit_interface_get_byte_offset(u32 syncpt_id); -#ifdef CONFIG_TEGRA_HOST1X u32 nvhost_syncpt_unit_interface_get_byte_offset_ext( struct platform_device *host_pdev, u32 syncpt_id); -#else -static inline u32 nvhost_syncpt_unit_interface_get_byte_offset_ext( - struct platform_device *host_pdev, - u32 syncpt_id) -{ - return nvhost_syncpt_unit_interface_get_byte_offset(syncpt_id); -} -#endif #endif /* __LINUX_NVHOST_T194_H__ */