[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230901084457.5bc1ad69@collabora.com>
Date: Fri, 1 Sep 2023 08:44:57 +0200
From: Boris Brezillon <boris.brezillon@...labora.com>
To: Adrián Larumbe <adrian.larumbe@...labora.com>
Cc: maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
tzimmermann@...e.de, airlied@...il.com, daniel@...ll.ch,
robdclark@...il.com, quic_abhinavk@...cinc.com,
dmitry.baryshkov@...aro.org, sean@...rly.run,
marijn.suijten@...ainline.org, robh@...nel.org,
steven.price@....com, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
healych@...zon.com, kernel@...labora.com,
freedreno@...ts.freedesktop.org
Subject: Re: [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@...labora.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.
Powered by blists - more mailing lists