From: Thomas Zimmermann <tzimmermann@suse.de>
To: Karol Wachowski <karol.wachowski@linux.intel.com>,
dri-devel@lists.freedesktop.org
Cc: oded.gabbay@gmail.com, jeff.hugo@oss.qualcomm.com,
maciej.falkowski@linux.intel.com, lizhi.hou@amd.com,
andrzej.kacprowski@linux.intel.com
Subject: Re: [PATCH] accel/ivpu: Test for imported buffers with drm_gem_is_imported()
Date: Mon, 9 Mar 2026 10:39:22 +0100 [thread overview]
Message-ID: <4111369f-f090-4061-91d6-69b6462af86f@suse.de> (raw)
In-Reply-To: <20260309092755.3165130-1-karol.wachowski@linux.intel.com>
Hi
Am 09.03.26 um 10:27 schrieb Karol Wachowski:
> Instead of testing import_attach for imported GEM buffers, invoke
> drm_gem_is_imported() to do the test. The test itself does not change.
Thanks a lot!
>
> Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
> Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/accel/ivpu/ivpu_gem.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ivpu_gem.c
> index 98b9ce26962b..8009965286e0 100644
> --- a/drivers/accel/ivpu/ivpu_gem.c
> +++ b/drivers/accel/ivpu/ivpu_gem.c
> @@ -48,7 +48,7 @@ static struct sg_table *ivpu_bo_map_attachment(struct ivpu_device *vdev, struct
> {
> struct sg_table *sgt;
>
> - drm_WARN_ON(&vdev->drm, !bo->base.base.import_attach);
> + drm_WARN_ON(&vdev->drm, !drm_gem_is_imported(&bo->base.base));
>
> ivpu_bo_lock(bo);
>
> @@ -157,7 +157,7 @@ static void ivpu_bo_unbind_locked(struct ivpu_bo *bo)
> }
>
> if (bo->base.sgt) {
> - if (bo->base.base.import_attach) {
> + if (drm_gem_is_imported(&bo->base.base)) {
> dma_buf_unmap_attachment(bo->base.base.import_attach,
> bo->base.sgt, DMA_BIDIRECTIONAL);
> } else {
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2026-03-09 9:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 9:27 [PATCH] accel/ivpu: Test for imported buffers with drm_gem_is_imported() Karol Wachowski
2026-03-09 9:39 ` Thomas Zimmermann [this message]
2026-03-09 9:50 ` Karol Wachowski
2026-03-10 2:33 ` Claude review: " Claude Code Review Bot
2026-03-10 2:33 ` Claude Code Review Bot
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=4111369f-f090-4061-91d6-69b6462af86f@suse.de \
--to=tzimmermann@suse.de \
--cc=andrzej.kacprowski@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=karol.wachowski@linux.intel.com \
--cc=lizhi.hou@amd.com \
--cc=maciej.falkowski@linux.intel.com \
--cc=oded.gabbay@gmail.com \
/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