On 6/26/23 15:02, Boris Brezillon wrote:
> -err_pages:
> -     drm_gem_shmem_put_pages(&bo->base);
>  err_unlock:
>       dma_resv_unlock(obj->resv);
> +
> +     if (ret && pinned)
> +             drm_gem_shmem_unpin(&bo->base);

The drm_gem_shmem_unpin() was supposed to be used only in conjunction
with drm_gem_shmem_pin(). I've a pending patch to enable the pin/unpin
refcounting needed by drm-shmem shrinker, it will prohibit invocation of
unpin without a previous pin.

I'm wondering whether it will be okay to simply remove
drm_gem_shmem_put_pages() from the Panfrost code, letting pages to be
kept allocated in a error case. They will be freed once BO is destroyed.

-- 
Best regards,
Dmitry

Reply via email to