summaryrefslogtreecommitdiff
path: root/drivers/gpu/host1x
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2022-03-24 13:30:25 +0300
committerThierry Reding <treding@nvidia.com>2022-04-06 16:12:36 +0300
commit3e9c4584336149146fe15cb5703fc10a2ca2d2a0 (patch)
treece6d362db2350799672bcb167c46d0105d7bade9 /drivers/gpu/host1x
parentfe696ccb277d332dc4e625b5b20b988b04d16c04 (diff)
downloadlinux-3e9c4584336149146fe15cb5703fc10a2ca2d2a0.tar.xz
gpu: host1x: Do not use mapping cache for job submissions
Buffer mappings used in job submissions are usually small and not rapidly reused as opposed to framebuffers (which are usually large and rapidly reused, for example when page-flipping between double-buffered framebuffers). Avoid going through the mapping cache for these buffers since the cache would also lead to leaks if nobody is ever releasing the cache's last reference. For DRM/KMS these last references are dropped when the framebuffers are removed and therefore no longer needed. While at it, also add a note about the need to explicitly remove the final reference to the mapping in the cache. Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r--drivers/gpu/host1x/job.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index 5e8c183167b7..b2761aa03b95 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -175,7 +175,7 @@ static unsigned int pin_job(struct host1x *host, struct host1x_job *job)
goto unpin;
}
- map = host1x_bo_pin(dev, bo, direction, &client->cache);
+ map = host1x_bo_pin(dev, bo, direction, NULL);
if (IS_ERR(map)) {
err = PTR_ERR(map);
goto unpin;
@@ -222,7 +222,7 @@ static unsigned int pin_job(struct host1x *host, struct host1x_job *job)
goto unpin;
}
- map = host1x_bo_pin(host->dev, g->bo, DMA_TO_DEVICE, &host->cache);
+ map = host1x_bo_pin(host->dev, g->bo, DMA_TO_DEVICE, NULL);
if (IS_ERR(map)) {
err = PTR_ERR(map);
goto unpin;