From 0f857d6cff9fb2811fea945d7f1764625eb84f7d Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 6 Apr 2023 13:35:52 +0100 Subject: [PATCH] gpu: host1x-nvhost: Remove unused argument The integer argument returned by the NVHOST interrupt notifier has never been supported by the host1x-nvhost driver. The DLA driver's nvdla_queue_update() function that is called by this notifier has been update so that it no longer uses this argument. Given that there are no other users of this notifier for the host1x-nvhost driver, let's remove this unused variable. Bug 4059530 Change-Id: I04dda2ea7338f0c7ee55e6e968b46f063eecae90 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2892312 Reviewed-by: svcacv Reviewed-by: Amit Sharma (SW-TEGRA) Reviewed-by: Mitch Harwell GVS: Gerrit_Virtual_Submit --- drivers/gpu/host1x-nvhost/nvhost.c | 6 +++--- drivers/video/tegra/host/nvdla/nvdla_queue.c | 9 +++++++++ include/linux/nvhost.h | 10 +++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/host1x-nvhost/nvhost.c b/drivers/gpu/host1x-nvhost/nvhost.c index 2a4988fb..15353beb 100644 --- a/drivers/gpu/host1x-nvhost/nvhost.c +++ b/drivers/gpu/host1x-nvhost/nvhost.c @@ -680,7 +680,7 @@ EXPORT_SYMBOL(nvhost_flcn_finalize_poweron); struct nvhost_host1x_cb { struct dma_fence_cb cb; struct work_struct work; - void (*notifier)(void *data, int unused); + void (*notifier)(void *data); void *notifier_data; }; @@ -698,13 +698,13 @@ static void nvhost_intr_do_work(struct work_struct *work) struct nvhost_host1x_cb *host1x_cb; host1x_cb = container_of(work, struct nvhost_host1x_cb, work); - host1x_cb->notifier(host1x_cb->notifier_data, 0); + host1x_cb->notifier(host1x_cb->notifier_data); kfree_rcu(host1x_cb); } int nvhost_intr_register_notifier(struct platform_device *pdev, u32 id, u32 thresh, - void (*callback)(void *data, int unused), + void (*callback)(void *data), void *private_data) { struct nvhost_device_data *pdata = platform_get_drvdata(pdev); diff --git a/drivers/video/tegra/host/nvdla/nvdla_queue.c b/drivers/video/tegra/host/nvdla/nvdla_queue.c index 04799a1b..61dd1d3a 100644 --- a/drivers/video/tegra/host/nvdla/nvdla_queue.c +++ b/drivers/video/tegra/host/nvdla/nvdla_queue.c @@ -311,7 +311,16 @@ static inline size_t nvdla_profile_status_offset(struct nvdla_task *task) return offset; } + +#if IS_ENABLED(CONFIG_TEGRA_GRHOST) +/* + * This function definition can be removed once support + * for the NVIDIA Linux v5.10 kernel is removed. + */ static void nvdla_queue_update(void *priv, int unused) +#else +static void nvdla_queue_update(void *priv) +#endif { int task_complete; struct nvdla_task *task, *safe; diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h index 05814e33..1a59bd6d 100644 --- a/include/linux/nvhost.h +++ b/include/linux/nvhost.h @@ -491,15 +491,14 @@ dma_addr_t nvhost_syncpt_address(struct platform_device *engine_pdev, u32 id); int nvhost_syncpt_unit_interface_init(struct platform_device *pdev); void nvhost_syncpt_unit_interface_deinit(struct platform_device *pdev); +#ifdef CONFIG_TEGRA_HOST1X /* public host1x interrupt management APIs */ int nvhost_intr_register_notifier(struct platform_device *pdev, u32 id, u32 thresh, - void (*callback)(void *, int), + void (*callback)(void *), void *private_data); /* public host1x sync-point management APIs */ -#ifdef CONFIG_TEGRA_HOST1X - struct host1x *nvhost_get_host1x(struct platform_device *pdev); static inline struct flcn *get_flcn(struct platform_device *pdev) @@ -636,6 +635,11 @@ static inline void nvhost_eventlib_log_fences(struct platform_device *pdev, { } #else +/* public host1x interrupt management APIs */ +int nvhost_intr_register_notifier(struct platform_device *pdev, + u32 id, u32 thresh, + void (*callback)(void *, int), + void *private_data); #ifdef CONFIG_DEBUG_FS void nvhost_register_dump_device(