diff options
author | Thierry Reding <treding@nvidia.com> | 2020-02-07 18:50:52 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2021-12-16 16:07:06 +0300 |
commit | 1f39b1dfa53c84b56d7ad37fed44afda7004959d (patch) | |
tree | 8ef62c2b9b69fbf96e0cdad49362f2c4c17e0682 /drivers/gpu/host1x/dev.c | |
parent | c6aeaf56f468a565f6d2f27325fc07d35cdcd3cb (diff) | |
download | linux-1f39b1dfa53c84b56d7ad37fed44afda7004959d.tar.xz |
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.c | 2 |
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; } |