Re: [PATCH] drm/imagination: drop redundant zeroing of new GEM objects

From: Gyeyoung Baek

Date: Sun Nov 22 2026 - 02:55:27 EST


Hi Guillaume,

On Wed, Nov 11, 2026 at 6:43 PM Guillaume La Roque
<glaroque@xxxxxxxxxxxx> wrote:
>
> pvr_gem_object_create() clears every new object through a CPU mapping
> so that userspace never sees data left by a previous owner of the
> pages [1]. shmem already guarantees that: it clears each page it
> allocates, and the dma_sync_sgtable_for_device() call that follows
> makes those zeroes visible to the GPU. The second pass, write-combined
> on non-coherent devices, only adds latency.

I'm not very familiar with shmem, so I'd like to ask: is this zeroing
something shmem guarantees, or just a current implementation detail?

Since the driver would now rely on it, could you spell out in the
commit message where the zeroing happens and why it can be relied on?

--
Thanks,
Gyeyoung