diff --git a/drivers/gpu/host1x-emu/fence.c b/drivers/gpu/host1x-emu/fence.c index 3094b147..51370867 100644 --- a/drivers/gpu/host1x-emu/fence.c +++ b/drivers/gpu/host1x-emu/fence.c @@ -178,6 +178,20 @@ HOST1X_EMU_EXPORT_DECL(int, host1x_fence_extract(struct dma_fence *dfence, u32 * } HOST1X_EMU_EXPORT_SYMBOL(host1x_fence_extract); +HOST1X_EMU_EXPORT_DECL(int, host1x_fence_get_node(struct dma_fence *dfence)) +{ + struct host1x_syncpt_fence *sf; + int node; + + if (dfence->ops != &host1x_syncpt_fence_ops) + return -EINVAL; + + sf = to_host1x_fence(dfence); + node = dev_to_node(sf->sp->host->dev); + return node == NUMA_NO_NODE ? 0 : node; +} +HOST1X_EMU_EXPORT_SYMBOL(host1x_fence_get_node); + HOST1X_EMU_EXPORT_DECL(void, host1x_fence_cancel(struct dma_fence *dfence)) { struct host1x_syncpt_fence *sf = to_host1x_fence(dfence); diff --git a/drivers/gpu/host1x-emu/include/linux/host1x-emu.h b/drivers/gpu/host1x-emu/include/linux/host1x-emu.h index c55dbcb2..a169d41c 100644 --- a/drivers/gpu/host1x-emu/include/linux/host1x-emu.h +++ b/drivers/gpu/host1x-emu/include/linux/host1x-emu.h @@ -78,6 +78,8 @@ HOST1X_EMU_EXPORT_DECL(struct dma_fence*, host1x_fence_create(struct host1x_sync HOST1X_EMU_EXPORT_DECL(int, host1x_fence_extract(struct dma_fence *fence, u32 *id, u32 *threshold)); +HOST1X_EMU_EXPORT_DECL(int, host1x_fence_get_node(struct dma_fence *fence)); + HOST1X_EMU_EXPORT_DECL(void, host1x_fence_cancel(struct dma_fence *fence)); #endif diff --git a/drivers/gpu/host1x-emu/include/linux/symbol-emu.h b/drivers/gpu/host1x-emu/include/linux/symbol-emu.h index eb3d820b..8508a714 100644 --- a/drivers/gpu/host1x-emu/include/linux/symbol-emu.h +++ b/drivers/gpu/host1x-emu/include/linux/symbol-emu.h @@ -6,7 +6,7 @@ #ifdef CONFIG_TEGRA_HOST1X_EMU_DBG_SYMBL #define HOST1X_EMU_EXPORT_CALL(...) Dbg_ ## __VA_ARGS__ #define HOST1X_EMU_EXPORT_DECL(ret, ...) ret Dbg_ ## __VA_ARGS__ -#define HOST1X_EMU_EXPORT_SYMBOL(f) EXPORT_SYMBOL( Dbg_## f) +#define HOST1X_EMU_EXPORT_SYMBOL(f) EXPORT_SYMBOL(Dbg_## f) #else #define HOST1X_EMU_EXPORT_CALL(...) __VA_ARGS__ #define HOST1X_EMU_EXPORT_DECL(ret, ...) ret __VA_ARGS__ diff --git a/drivers/gpu/host1x-fence/dev.c b/drivers/gpu/host1x-fence/dev.c index 780fb824..39759882 100644 --- a/drivers/gpu/host1x-fence/dev.c +++ b/drivers/gpu/host1x-fence/dev.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -// SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. #include @@ -36,6 +36,7 @@ static int dev_file_open(struct inode *inode, struct file *file) struct host1x **host1xp; static const struct of_device_id host1x_match[] = { + { .compatible = "nvidia,tegraEmu-host1x", }, { .compatible = "nvidia,tegra186-host1x", }, { .compatible = "nvidia,tegra194-host1x", }, { .compatible = "nvidia,tegra234-host1x", }, @@ -544,6 +545,7 @@ unregister_chrdev_region: } static const struct of_device_id host1x_fence_of_match[] = { + { .compatible = "nvidia,tegraEmu-host1x" }, { .compatible = "nvidia,tegra234-host1x" }, { .compatible = "nvidia,tegra264-host1x" }, { },