mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 17:55:05 +03:00
video: tegra: nvmap: Set NUMA ID for device
- Set NUMA ID for carveout devices using set_dev_node() - Export device for VPR on socket-1 Bug 4390638 Change-Id: I37ade16b690995b70d3c924965596cfc8094447e Signed-off-by: Ashish Mhetre <amhetre@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3115088 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com> Reviewed-by: Ketan Patil <ketanp@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
e6d2d62039
commit
9fc2b0b487
@@ -1,6 +1,6 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2021-2024, NVIDIA CORPORATION. All rights reserved.
|
||||||
*/
|
*/
|
||||||
#ifndef __NVMAP_EXPORTS_H
|
#ifndef __NVMAP_EXPORTS_H
|
||||||
#define __NVMAP_EXPORTS_H
|
#define __NVMAP_EXPORTS_H
|
||||||
@@ -11,4 +11,5 @@ void *nvmap_dma_alloc_attrs(struct device *dev, size_t size,
|
|||||||
void nvmap_dma_free_attrs(struct device *dev, size_t size, void *cpu_addr,
|
void nvmap_dma_free_attrs(struct device *dev, size_t size, void *cpu_addr,
|
||||||
dma_addr_t dma_handle, unsigned long attrs);
|
dma_addr_t dma_handle, unsigned long attrs);
|
||||||
extern struct device tegra_vpr_dev;
|
extern struct device tegra_vpr_dev;
|
||||||
|
extern struct device tegra_vpr_dev1;
|
||||||
#endif /* __NVMAP_EXPORTS_H */
|
#endif /* __NVMAP_EXPORTS_H */
|
||||||
|
|||||||
@@ -399,6 +399,7 @@ struct nvmap_heap *nvmap_heap_create(struct device *parent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
dev_set_name(h->dma_dev, "%s", co->name);
|
dev_set_name(h->dma_dev, "%s", co->name);
|
||||||
|
set_dev_node(co->dma_dev, co->numa_node_id);
|
||||||
dma_set_coherent_mask(h->dma_dev, DMA_BIT_MASK(64));
|
dma_set_coherent_mask(h->dma_dev, DMA_BIT_MASK(64));
|
||||||
h->name = co->name;
|
h->name = co->name;
|
||||||
h->arg = arg;
|
h->arg = arg;
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ struct device __weak tegra_generic_dev;
|
|||||||
struct device __weak tegra_vpr_dev;
|
struct device __weak tegra_vpr_dev;
|
||||||
EXPORT_SYMBOL(tegra_vpr_dev);
|
EXPORT_SYMBOL(tegra_vpr_dev);
|
||||||
struct device tegra_vpr1_dev;
|
struct device tegra_vpr1_dev;
|
||||||
|
EXPORT_SYMBOL(tegra_vpr1_dev);
|
||||||
|
|
||||||
struct device __weak tegra_generic_cma_dev;
|
struct device __weak tegra_generic_cma_dev;
|
||||||
struct device __weak tegra_vpr_cma_dev;
|
struct device __weak tegra_vpr_cma_dev;
|
||||||
@@ -740,6 +741,8 @@ static int __init nvmap_co_device_init(struct reserved_mem *rmem,
|
|||||||
} else {
|
} else {
|
||||||
co->init_done = true;
|
co->init_done = true;
|
||||||
}
|
}
|
||||||
|
if (co->init_done)
|
||||||
|
set_dev_node(co->dma_dev, co->numa_node_id);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user