summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/dev.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2020-02-07 16:50:52 +0100
committerThierry Reding <treding@nvidia.com>2021-12-16 14:07:06 +0100
commit1f39b1dfa53c84b56d7ad37fed44afda7004959d (patch)
tree8ef62c2b9b69fbf96e0cdad49362f2c4c17e0682 /drivers/gpu/host1x/dev.c
parentc6aeaf56f468a565f6d2f27325fc07d35cdcd3cb (diff)
downloadlinux-1f39b1dfa53c84b56d7ad37fed44afda7004959d.tar.gz
linux-1f39b1dfa53c84b56d7ad37fed44afda7004959d.tar.bz2
linux-1f39b1dfa53c84b56d7ad37fed44afda7004959d.zip
drm/tegra: Implement buffer object cache
This cache is used to avoid mapping and unmapping buffer objects unnecessarily. Mappings are cached per client and stay hot until the buffer object is destroyed. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x/dev.c')
-rw-r--r--drivers/gpu/host1x/dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index fbb6447b8659..85eb3d19bbdb 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -386,6 +386,7 @@ static int host1x_probe(struct platform_device *pdev)
if (syncpt_irq < 0)
return syncpt_irq;
+ host1x_bo_cache_init(&host->cache);
mutex_init(&host->devices_lock);
INIT_LIST_HEAD(&host->devices);
INIT_LIST_HEAD(&host->list);
@@ -512,6 +513,7 @@ static int host1x_remove(struct platform_device *pdev)
reset_control_assert(host->rst);
clk_disable_unprepare(host->clk);
host1x_iommu_exit(host);
+ host1x_bo_cache_destroy(&host->cache);
return 0;
}