lkml.org 
[lkml]   [2023]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 5/6] drm/panfrost: Implement generic DRM object RSS reporting function
On Fri, 1 Sep 2023 01:03:23 +0100
Adrián Larumbe <adrian.larumbe@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.

\
 
 \ /
  Last update: 2023-09-01 08:45    [W:0.148 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site