Re: [PATCH] drm/virtio: Add execbuf flag to request no fence-event

2022-04-22 Thread Rob Clark
On Tue, Apr 5, 2022 at 10:57 AM Chia-I Wu wrote: > > On Tue, Apr 5, 2022 at 10:38 AM Rob Clark wrote: > > > > From: Rob Clark > > > > It would have been cleaner to have a flag to *request* the fence event. > > But that ship has sailed. So add a flag so t

[PATCH] drm/virtio: Add execbuf flag to request no fence-event

2022-04-05 Thread Rob Clark
From: Rob Clark It would have been cleaner to have a flag to *request* the fence event. But that ship has sailed. So add a flag so that userspace which doesn't care about the events can opt-out. Signed-off-by: Rob Clark --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 8 +--- include/uapi

Re: [PATCH v2 6/8] drm/shmem-helper: Add generic memory shrinker

2022-03-17 Thread Rob Clark
On Wed, Mar 16, 2022 at 5:13 PM Dmitry Osipenko wrote: > > On 3/16/22 23:00, Rob Clark wrote: > > On Mon, Mar 14, 2022 at 3:44 PM Dmitry Osipenko > > wrote: > >> > >> Introduce a common DRM SHMEM shrinker. It allows to reduce code > >> duplication a

Re: [PATCH v2 6/8] drm/shmem-helper: Add generic memory shrinker

2022-03-16 Thread Rob Clark
On Mon, Mar 14, 2022 at 3:44 PM Dmitry Osipenko wrote: > > Introduce a common DRM SHMEM shrinker. It allows to reduce code > duplication among DRM drivers, it also handles complicated lockings > for the drivers. This is initial version of the shrinker that covers > basic needs of GPU drivers. > >

Re: [PATCH v1 0/5] Add memory shrinker to VirtIO-GPU DRM driver

2022-03-09 Thread Rob Clark
On Wed, Mar 9, 2022 at 12:06 PM Dmitry Osipenko wrote: > > On 3/9/22 03:56, Rob Clark wrote: > >> If we really can't track madvise state in the guest for dealing with > >> host memory pressure, I think the better option is to introduce > >> MADV:WILLNEED_REPLAC

Re: [PATCH v1 5/5] drm/virtio: Add memory shrinker

2022-03-08 Thread Rob Clark
On Tue, Mar 8, 2022 at 5:17 AM Dmitry Osipenko wrote: > > Add memory shrinker and new madvise IOCTL to the VirtIO-GPU driver. > Userspace (BO cache manager of Mesa driver) will mark BOs as "don't need" > using the new IOCTL to let shrinker purge the marked BOs on OOM, thus > shrinker will lower

Re: [PATCH v1 0/5] Add memory shrinker to VirtIO-GPU DRM driver

2022-03-08 Thread Rob Clark
On Tue, Mar 8, 2022 at 3:36 PM Dmitry Osipenko wrote: > > On 3/9/22 01:24, Rob Clark wrote: > > On Tue, Mar 8, 2022 at 11:28 AM Dmitry Osipenko > > wrote: > >> > >> On 3/8/22 19:29, Rob Clark wrote: > >>> On Tue, Mar 8, 2022 at 5:17 AM D

Re: [PATCH v1 0/5] Add memory shrinker to VirtIO-GPU DRM driver

2022-03-08 Thread Rob Clark
On Tue, Mar 8, 2022 at 11:28 AM Dmitry Osipenko wrote: > > On 3/8/22 19:29, Rob Clark wrote: > > On Tue, Mar 8, 2022 at 5:17 AM Dmitry Osipenko > > wrote: > >> > >> Hello, > >> > >> This patchset introduces memory shrinker for the VirtIO-GPU

Re: [PATCH v1 0/5] Add memory shrinker to VirtIO-GPU DRM driver

2022-03-08 Thread Rob Clark
On Tue, Mar 8, 2022 at 5:17 AM Dmitry Osipenko wrote: > > Hello, > > This patchset introduces memory shrinker for the VirtIO-GPU DRM driver. > During OOM, the shrinker will release BOs that are marked as "not needed" > by userspace using the new madvise IOCTL. The userspace in this case is > the

[PATCH] drm/virtio: Remove restriction of non-zero blob_flags

2022-02-19 Thread Rob Clark
From: Rob Clark With native userspace drivers in guest, a lot of GEM objects need to be neither shared nor mappable. And in fact making everything mappable and/or sharable results in unreasonably high fd usage in host VMM. Signed-off-by: Rob Clark --- This is for a thing I'm working on, a new

Re: [PATCH] drm/virtio: Add USE_INTERNAL blob flag

2022-02-18 Thread Rob Clark
On Fri, Feb 18, 2022 at 8:42 AM Chia-I Wu wrote: > > On Fri, Feb 18, 2022 at 7:57 AM Rob Clark wrote: > > > > From: Rob Clark > > > > With native userspace drivers in guest, a lot of GEM objects need to be > > neither shared nor mappable. An

[PATCH] drm/virtio: Add USE_INTERNAL blob flag

2022-02-18 Thread Rob Clark
From: Rob Clark With native userspace drivers in guest, a lot of GEM objects need to be neither shared nor mappable. And in fact making everything mappable and/or sharable results in unreasonably high fd usage in host VMM. Signed-off-by: Rob Clark --- This is for a thing I'm working on, a new

[PATCH] drm/virtio: Fix capset-id query size

2022-02-15 Thread Rob Clark
From: Rob Clark The UABI was already defined for pointer to 64b value, and all the userspace users of this ioctl that I could find are already using a uint64_t (but zeroing it out to work around kernel only copying 32b). Unfortunately this ioctl doesn't have a length field, so out of paranoia I

Re: [Freedreno] [PATCH 16/17] iommu: remove DOMAIN_ATTR_IO_PGTABLE_CFG

2021-03-04 Thread Rob Clark
On Thu, Mar 4, 2021 at 7:48 AM Robin Murphy wrote: > > On 2021-03-01 08:42, Christoph Hellwig wrote: > > Signed-off-by: Christoph Hellwig > > Moreso than the previous patch, where the feature is at least relatively > generic (note that there's a bunch of in-flight development around >

[PATCH v3 2/3] drm: plumb attaching dev thru to prime_pin/unpin

2019-07-16 Thread Rob Clark
From: Rob Clark Needed in the following patch for cache operations. Signed-off-by: Rob Clark --- v3: rebased on drm-tip drivers/gpu/drm/drm_gem.c | 8 drivers/gpu/drm/drm_internal.h | 4 ++-- drivers/gpu/drm/drm_prime.c | 4

[PATCH v2 2/3] drm: plumb attaching dev thru to prime_pin/unpin

2019-07-16 Thread Rob Clark
From: Rob Clark Needed in the following patch for cache operations. Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_gem.c | 10 ++ drivers/gpu/drm/drm_gem_vram_helper.c | 6 -- drivers/gpu/drm/drm_prime.c | 4 ++-- drivers/gpu/drm/etnaviv