On Fri, 1 Sep 2023 01:03:23 +0100
Adrián Larumbe <adrian.laru...@collabora.com> wrote:

> >> @@ -274,13 +286,23 @@ panfrost_gem_prime_import_sg_table(struct drm_device 
> >> *dev,
> >>  {
> >>    struct drm_gem_object *obj;
> >>    struct panfrost_gem_object *bo;
> >> +  struct scatterlist *sgl;
> >> +  unsigned int count;
> >> +  size_t total = 0;
> >>  
> >>    obj = drm_gem_shmem_prime_import_sg_table(dev, attach, sgt);
> >>    if (IS_ERR(obj))
> >>            return ERR_CAST(obj);
> >>  
> >> +  for_each_sgtable_dma_sg(sgt, sgl, count) {
> >> +          size_t len = sg_dma_len(sgl);
> >> +
> >> +          total += len;
> >> +  }  
> >
> >Why not simply have bo->rss_size = obj->size here? Not sure I see a
> >reason to not trust dma_buf?  
> 
> Can PRIME-imported BO's ever be heap objects?

Nope, heap BOs can't be exported, and if they can, that's probably a
bug we need to fix.

Reply via email to