[Freedreno] [PATCH v2 5/6] drm/panfrost: Implement generic DRM object RSS reporting function
Boris Brezillon
boris.brezillon at collabora.com
Fri Sep 1 06:44:57 UTC 2023
On Fri, 1 Sep 2023 01:03:23 +0100
Adrián Larumbe <adrian.larumbe at 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.
More information about the Freedreno
mailing list