[PATCH 08/15] drm/panfrost: Test for imported buffers with drm_gem_is_imported()
Steven Price
steven.price at arm.com
Mon Mar 31 09:02:53 UTC 2025
On 17/03/2025 13:06, Thomas Zimmermann wrote:
> Instead of testing import_attach for imported GEM buffers, invoke
> drm_gem_is_imported() to do the test. The helper tests the dma_buf
> itself while import_attach is just an artifact of the import. Prepares
> to make import_attach optional.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> Cc: Boris Brezillon <boris.brezillon at collabora.com>
> Cc: Rob Herring <robh at kernel.org>
> Cc: Steven Price <steven.price at arm.com>
Reviewed-by: Steven Price <steven.price at arm.com>
> ---
> drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.c b/drivers/gpu/drm/panfrost/panfrost_gem.c
> index 8e0ff3efede7..963f04ba2de6 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_gem.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_gem.c
> @@ -200,7 +200,7 @@ static enum drm_gem_object_status panfrost_gem_status(struct drm_gem_object *obj
> struct panfrost_gem_object *bo = to_panfrost_bo(obj);
> enum drm_gem_object_status res = 0;
>
> - if (bo->base.base.import_attach || bo->base.pages)
> + if (drm_gem_is_imported(&bo->base.base) || bo->base.pages)
> res |= DRM_GEM_OBJECT_RESIDENT;
>
> if (bo->base.madv == PANFROST_MADV_DONTNEED)
More information about the dri-devel
mailing list