Skip to content

Commit 7701ce2

Browse files
larunbeSteven Price
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 <[email protected]> Fixes: 9ccdac7 ("drm/panfrost: Add fdinfo support for memory stats") Reported-by: Boris Brezillon <[email protected]> Reviewed-by: Steven Price <[email protected]> Signed-off-by: Steven Price <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent cb9c919 commit 7701ce2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)