dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Maíra Canal" <mcanal@igalia.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	airlied@gmail.com, simona@ffwll.ch
Cc: dri-devel@lists.freedesktop.org,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>
Subject: Re: [PATCH] drm/vc4: Test for imported buffers with drm_gem_is_imported()
Date: Sun, 1 Mar 2026 14:17:58 -0300	[thread overview]
Message-ID: <cc4f5963-e57e-4622-8d4d-99fcff462f4b@igalia.com> (raw)
In-Reply-To: <20260227133113.235940-12-tzimmermann@suse.de>

Hi Thomas,

On 27/02/26 10:31, Thomas Zimmermann wrote:
> Instead of testing import_attach for imported GEM buffers, invoke
> drm_gem_is_imported() to do the test. The test itself does not change.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>

Reviewed-by: Maíra Canal <mcanal@igalia.com>

Best regards,
- Maíra

> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>
> Cc: "Maíra Canal" <mcanal@igalia.com>
> Cc: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>
> ---
>   drivers/gpu/drm/vc4/vc4_bo.c  | 2 +-
>   drivers/gpu/drm/vc4/vc4_gem.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
> index 1f93bc5a3d02..f45ba47b4ba8 100644
> --- a/drivers/gpu/drm/vc4/vc4_bo.c
> +++ b/drivers/gpu/drm/vc4/vc4_bo.c
> @@ -556,7 +556,7 @@ static void vc4_free_object(struct drm_gem_object *gem_bo)
>   	mutex_lock(&vc4->bo_lock);
>   	/* If the object references someone else's memory, we can't cache it.
>   	 */
> -	if (gem_bo->import_attach) {
> +	if (drm_gem_is_imported(gem_bo)) {
>   		vc4_bo_destroy(bo);
>   		goto out;
>   	}
> diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
> index ad8cbd727b80..2d3df5e621c1 100644
> --- a/drivers/gpu/drm/vc4/vc4_gem.c
> +++ b/drivers/gpu/drm/vc4/vc4_gem.c
> @@ -1250,7 +1250,7 @@ int vc4_gem_madvise_ioctl(struct drm_device *dev, void *data,
>   	/* Not sure it's safe to purge imported BOs. Let's just assume it's
>   	 * not until proven otherwise.
>   	 */
> -	if (gem_obj->import_attach) {
> +	if (drm_gem_is_imported(gem_obj)) {
>   		DRM_DEBUG("madvise not supported on imported BOs\n");
>   		ret = -EINVAL;
>   		goto out_put_gem;


      reply	other threads:[~2026-03-01 17:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27 13:31 [PATCH] drm/vc4: Test for imported buffers with drm_gem_is_imported() Thomas Zimmermann
2026-03-01 17:17 ` Maíra Canal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cc4f5963-e57e-4622-8d4d-99fcff462f4b@igalia.com \
    --to=mcanal@igalia.com \
    --cc=airlied@gmail.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-list@raspberrypi.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox