]> www.infradead.org Git - nvme.git/commit
drm/panfrost: Implement generic DRM object RSS reporting function
authorAdrián Larumbe <adrian.larumbe@collabora.com>
Fri, 29 Sep 2023 18:14:31 +0000 (19:14 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 4 Oct 2023 11:04:15 +0000 (13:04 +0200)
commit407c0ad5b19a477ff974a1c8007c00f01e7d04b5
tree163e8401109b9458e67101f3cc4a427893c42f5f
parent553c84892bac704e1a7999b7db7e67640a31a4fa
drm/panfrost: Implement generic DRM object RSS reporting function

BO's RSS is updated every time new pages are allocated on demand and mapped
for the object at GPU page fault's IRQ handler, but only for heap buffers.
The reason this is unnecessary for non-heap buffers is that they are mapped
onto the GPU's VA space and backed by physical memory in their entirety at
BO creation time.

This calculation is unnecessary for imported PRIME objects, since heap
buffers cannot be exported by our driver, and the actual BO RSS size is the
one reported in its attached dmabuf structure.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230929181616.2769345-6-adrian.larumbe@collabora.com
drivers/gpu/drm/panfrost/panfrost_gem.c
drivers/gpu/drm/panfrost/panfrost_gem.h
drivers/gpu/drm/panfrost/panfrost_mmu.c