Skip to content

Commit 7701ce2

Browse files
larunbestevenprice-arm
authored andcommitted
drm/panfrost: Consider dma-buf imported objects as resident
A GEM object constructed from a dma-buf imported sgtable should be regarded as being memory resident, because the dma-buf API mandates backing storage to be allocated when attachment succeeds. Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com> Fixes: 9ccdac7 ("drm/panfrost: Add fdinfo support for memory stats") Reported-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Signed-off-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231125205438.375407-2-adrian.larumbe@collabora.com
1 parent cb9c919 commit 7701ce2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/panfrost/panfrost_gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static enum drm_gem_object_status panfrost_gem_status(struct drm_gem_object *obj
200200
struct panfrost_gem_object *bo = to_panfrost_bo(obj);
201201
enum drm_gem_object_status res = 0;
202202

203-
if (bo->base.pages)
203+
if (bo->base.base.import_attach || bo->base.pages)
204204
res |= DRM_GEM_OBJECT_RESIDENT;
205205

206206
if (bo->base.madv == PANFROST_MADV_DONTNEED)

0 commit comments

Comments
 (0)