On Mon, 2 Feb 2026 16:35:26 +0000
Steven Price <[email protected]> wrote:
> > +
> > +void panthor_gem_unpin(struct panthor_gem_object *bo)
> > +{
> > + if (drm_gem_is_imported(&bo->base))
> > + return;
> > +
> > + if (!refcount_dec_not_one(&bo->backing.pin_count))
> > + panthor_gem_backing_unpin_locked(bo);
>
> I don't think we're holding the resv lock here? In which case we need a
> dma_resv_lock()/unlock() pair around this.
Absolutely. I'll fix that in the next version.
> > +struct drm_gem_object *
> > +panthor_gem_prime_import_sg_table(struct drm_device *dev,
> > + struct dma_buf_attachment *attach,
> > + struct sg_table *sgt)
> > +{
> > + struct panthor_gem_object *bo;
> > + int ret;
> > +
> > + bo = panthor_gem_alloc_object(0);
> > + if (IS_ERR(bo))
> > + return &bo->base;
>
> Should be ERR_CAST(bo) - bo isn't a valid pointer here.
Good catch. Will fix in v3.