]> git.baikalelectronics.ru Git - kernel.git/commit
gpu: host1x: Do not use mapping cache for job submissions
authorThierry Reding <treding@nvidia.com>
Thu, 24 Mar 2022 10:30:25 +0000 (11:30 +0100)
committerThierry Reding <treding@nvidia.com>
Wed, 6 Apr 2022 13:12:36 +0000 (15:12 +0200)
commit24aac238cb778da164ef45d5035c1426a42f754d
treece6d362db2350799672bcb167c46d0105d7bade9
parent1db88f994411731c03f355426b03c910ad5fa8f0
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>
drivers/gpu/host1x/job.c
include/linux/host1x.h