All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: jeff.hugo@oss.qualcomm.com, lizhi.hou@amd.com, stable@vger.kernel.org
Subject: Re: [PATCH v2] accel/ivpu: Fix warning in ivpu_gem_bo_free()
Date: Thu, 5 Jun 2025 14:50:51 +0200	[thread overview]
Message-ID: <04c421f0-5628-4eac-9bb7-46a18f2fefae@linux.intel.com> (raw)
In-Reply-To: <20250528171220.513225-1-jacek.lawrynowicz@linux.intel.com>

Applied to drm-misc-fixes

On 5/28/2025 7:12 PM, Jacek Lawrynowicz wrote:
> Don't WARN if imported buffers are in use in ivpu_gem_bo_free() as they
> can be indeed used in the original context/driver.
> 
> Fixes: 647371a6609d ("accel/ivpu: Add GEM buffer object management")
> Cc: stable@vger.kernel.org # v6.3
> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
> ---
> v2: Use drm_gem_is_imported() to check if the buffer is imported.
> ---
>  drivers/accel/ivpu/ivpu_gem.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ivpu_gem.c
> index c193a80241f5f..5ff0bac739fc9 100644
> --- a/drivers/accel/ivpu/ivpu_gem.c
> +++ b/drivers/accel/ivpu/ivpu_gem.c
> @@ -278,7 +278,8 @@ static void ivpu_gem_bo_free(struct drm_gem_object *obj)
>  	list_del(&bo->bo_list_node);
>  	mutex_unlock(&vdev->bo_list_lock);
>  
> -	drm_WARN_ON(&vdev->drm, !dma_resv_test_signaled(obj->resv, DMA_RESV_USAGE_READ));
> +	drm_WARN_ON(&vdev->drm, !drm_gem_is_imported(&bo->base.base) &&
> +		    !dma_resv_test_signaled(obj->resv, DMA_RESV_USAGE_READ));
>  	drm_WARN_ON(&vdev->drm, ivpu_bo_size(bo) == 0);
>  	drm_WARN_ON(&vdev->drm, bo->base.vaddr);
>  


      parent reply	other threads:[~2025-06-05 12:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-28 17:12 [PATCH v2] accel/ivpu: Fix warning in ivpu_gem_bo_free() Jacek Lawrynowicz
2025-05-28 17:14 ` Lizhi Hou
2025-05-30 19:52 ` Jeff Hugo
2025-06-05 12:50 ` Jacek Lawrynowicz [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=04c421f0-5628-4eac-9bb7-46a18f2fefae@linux.intel.com \
    --to=jacek.lawrynowicz@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jeff.hugo@oss.qualcomm.com \
    --cc=lizhi.hou@amd.com \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.