On 5/3/23 09:51, Gerd Hoffmann wrote:
> On Mon, May 01, 2023 at 06:38:45PM +0300, Dmitry Osipenko wrote:
>> On 4/16/23 14:52, Dmitry Osipenko wrote:
>>> We have multiple Vulkan context types that are awaiting for the addition
>>> of the sync object DRM UAPI support to t
On 4/6/23 19:06, Dmitry Osipenko wrote:
> Change locking policy of mmap() callback, making exporters responsible
> for handling dma-buf reservation locking. Previous locking policy stated
> that dma-buf is locked for both importers and exporters by the dma-buf
> core, which cause
On 4/16/23 14:52, Dmitry Osipenko wrote:
> We have multiple Vulkan context types that are awaiting for the addition
> of the sync object DRM UAPI support to the VirtIO-GPU kernel driver:
>
> 1. Venus context
> 2. Native contexts (virtio-freedreno, virtio-intel, virtio-amdgpu)
On 4/16/23 14:52, Dmitry Osipenko wrote:
> Add sync object DRM UAPI support to VirtIO-GPU driver. Sync objects
> support is needed by native context VirtIO-GPU Mesa drivers, it also will
> be used by Venus and Virgl contexts.
>
> Reviewed-by; Emil Velikov
> Signed-off-b
Hello Gurchetan,
On 4/18/23 02:17, Gurchetan Singh wrote:
> On Sun, Apr 16, 2023 at 4:53 AM Dmitry Osipenko <
> dmitry.osipe...@collabora.com> wrote:
>
>> We have multiple Vulkan context types that are awaiting for the addition
>> of the sync object DRM UAPI suppo
ioctl to the point of
pushing job to virtio queue. Job's initialization is now performed before
in-fence is awaited and out-fence setup is made after sending out job to
virtio.
Reviewed-by: Rob Clark
Reviewed-by; Emil Velikov
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virti
Add sync object DRM UAPI support to VirtIO-GPU driver. Sync objects
support is needed by native context VirtIO-GPU Mesa drivers, it also will
be used by Venus and Virgl contexts.
Reviewed-by; Emil Velikov
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/virtgpu_drv.c| 3
to add a new/upcoming host-waits feature
because of how variables are passed around the code, the virtgpu_ioctl.c
also was growing to unmanageable size.
Dmitry Osipenko (3):
drm/virtio: Refactor and optimize job submission code path
drm/virtio: Wait for each dma-fence of in-fenc
Rob Clark
Reviewed-by; Emil Velikov
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/virtgpu_submit.c | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_submit.c
b/drivers/gpu/drm/virtio/virtgpu_submit.c
index 84
Hello,
On 4/11/23 14:07, Emil Velikov wrote:
> Hi Dmitry,
>
> On Sun, 9 Apr 2023 at 13:40, Dmitry Osipenko
> wrote:
>
>> +static void virtio_gpu_free_syncobjs(struct drm_syncobj **syncobjs,
>> +uint32_t nr_syncobjs)
>> +{
&g
y difficult to add a new/upcoming host-waits feature
because of how variables are passed around the code, the virtgpu_ioctl.c
also was growing to unmanageable size.
Dmitry Osipenko (3):
drm/virtio: Refactor and optimize job submission code path
drm/virtio: Wait for each dma-fence
Rob Clark
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/virtgpu_submit.c | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_submit.c
b/drivers/gpu/drm/virtio/virtgpu_submit.c
index 902734778d1b..b60dea077240 10
Add sync object DRM UAPI support to VirtIO-GPU driver. Sync objects
support is needed by native context VirtIO-GPU Mesa drivers, it also will
be used by Venus and Virgl contexts.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/virtgpu_drv.c| 3 +-
drivers/gpu/drm/virtio
ioctl to the point of
pushing job to virtio queue. Job's initialization is now performed before
in-fence is awaited and out-fence setup is made after sending out job to
virtio.
Reviewed-by: Rob Clark
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/Makefile | 2 +-
drive
dma-bufs which required to take the lock from the DRM
exporter side.
Reviewed-by: Emil Velikov
Signed-off-by: Dmitry Osipenko
---
drivers/dma-buf/dma-buf.c | 17 +++--
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
: Daniel Vetter
Acked-by: Thomas Zimmermann
Reviewed-by: Emil Velikov
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c| 208 --
drivers/gpu/drm/lima/lima_gem.c | 8 +-
drivers/gpu/drm/panfrost/panfrost_drv.c | 7 +-
.../gpu
once these
drivers are moved to use reservation lock universally. The problem is
solved by moving the lock down to exporters. This patch prepares DRM
drivers for the locking policy update.
Reviewed-by: Emil Velikov
Acked-by: Christian König
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/d
once these
drivers are moved to use reservation lock universally. The problem
solved by moving the lock down to exporters. This patch prepares dma-buf
heaps for the locking policy update.
Reviewed-by: Emil Velikov
Signed-off-by: Dmitry Osipenko
---
drivers/dma-buf/heaps/cma_heap.c| 3 ---
d
once these
drivers are moved to use reservation lock universally. The problem is
solved by moving the lock down to exporters. This patch prepares fastrpc
for the locking policy update.
Reviewed-by: Emil Velikov
Signed-off-by: Dmitry Osipenko
---
drivers/misc/fastrpc.c | 3 ---
1 file changed, 3
once these
drivers are moved to use reservation lock universally. The problem is
solved by moving the lock down to exporters. This patch prepares udmabuf
for the locking policy update.
Reviewed-by: Emil Velikov
Signed-off-by: Dmitry Osipenko
---
drivers/dma-buf/udmabuf.c | 2 --
1 file
once these
drivers are moved to use reservation lock universally. The problem is
solved by moving the lock down to exporters. This patch prepares videobuf2
for the locking policy update.
Reviewed-by: Emil Velikov
Signed-off-by: Dmitry Osipenko
---
drivers/media/common/videobuf2/videobuf2-dma-co
.
- Added r-b from Emil Velikov and placed the drm_WARN in the
drm-shmem patch like he suggested in a comment to v1.
- Corrected drm-shmem patch dma_resv_lock(obj->resv) inconsistently
used with dma_resv_unlock(shmem->base.resv). Now shmem->base.resv
variant i
On 4/3/23 18:17, Christian König wrote:
> Am 02.04.23 um 18:48 schrieb Dmitry Osipenko:
>> Don't assert held dma-buf reservation lock on memory mapping of exported
>> buffer.
>>
>> We're going to change dma-buf mmap() locking policy such that exporters
>>
On 3/30/23 18:32, Emil Velikov wrote:
>> +static int virtio_gpu_dma_fence_wait(struct virtio_gpu_submit *submit,
>> + struct dma_fence *fence)
>> +{
>> +struct dma_fence_unwrap itr;
>> +struct dma_fence *f;
>> +int err;
>> +
>> +dma_fence_unwrap_for_e
On 4/3/23 16:22, Emil Velikov wrote:
> On Mon, 3 Apr 2023 at 14:00, Emil Velikov wrote:
>
I think we should zero num_(in|out)_syncobjs when the respective parse
fails. Otherwise we get one "cleanup" within the parse function itself
and a second during the cleanup_submit. Haven't lo
On 4/2/23 19:48, Dmitry Osipenko wrote:
> This patchset makes dma-buf exporters responisble for taking care of
> the reservation lock. I also included patch that moves drm-shmem to use
> reservation lock, to let CI test the whole set. I'm going to take all
> the patches via
On 3/30/23 20:24, Emil Velikov wrote:
> Hi Dmitry,
>
> Have you considered creating a few DRM helpers for this functionality?
>
> AFAICT this is the third driver which supports syncobj timelines and
> looking at one of the implementations ... it is not great. Note that
> this suggestion is _not_
: Daniel Vetter
Acked-by: Thomas Zimmermann
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c| 217 --
drivers/gpu/drm/lima/lima_gem.c | 8 +-
drivers/gpu/drm/panfrost/panfrost_drv.c | 7 +-
.../gpu/drm/panfrost
dma-bufs which required to take the lock from the DRM
exporter side.
Signed-off-by: Dmitry Osipenko
---
drivers/dma-buf/dma-buf.c | 17 +++--
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index aa4ea8530cb3
bufs, it's solved
by moving the lock down to exporters.
Fixes: aa3f99896443 ("udmabuf: Assert held reservation lock for dma-buf
mmapping")
Signed-off-by: Dmitry Osipenko
---
drivers/dma-buf/udmabuf.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/dma-buf/udmabuf.c b/
bufs, it's solved
by moving the lock down to exporters.
Fixes: 39ce25291871 ("drm: Assert held reservation lock for dma-buf mmapping")
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_prime.c| 2 --
drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 2 --
bufs, it's solved
by moving the lock down to exporters.
Fixes: 265751a513ad ("fastrpc: Assert held reservation lock for dma-buf
mmapping")
Signed-off-by: Dmitry Osipenko
---
drivers/misc/fastrpc.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/misc/fastrpc.c b/dri
bufs, it's solved
by moving the lock down to exporters.
Fixes: 27f3733a1049 ("dma-buf/heaps: Assert held reservation lock for dma-buf
mmapping")
Signed-off-by: Dmitry Osipenko
---
drivers/dma-buf/heaps/cma_heap.c| 3 ---
drivers/dma-buf/heaps/system_heap.c | 3 ---
2 files chan
bufs, it's solved
by moving the lock down to exporters.
Fixes: 3a6ca1810f77 ("media: videobuf2: Assert held reservation lock for
dma-buf mmapping")
Signed-off-by: Dmitry Osipenko
---
drivers/media/common/videobuf2/videobuf2-dma-contig.c | 3 ---
drivers/media/common/videobuf2/v
exporters.
[1]
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_114671v2/shard-snb5/igt@prime_vgem@s...@rcs0.html
[2]
https://elixir.bootlin.com/linux/v6.3-rc4/source/drivers/gpu/drm/drm_prime.c#L924
Dmitry Osipenko (7):
Revert "media: videobuf2: Assert held reservation lock for dma-buf
On 3/26/23 12:19, Christian König wrote:
> Am 25.03.23 um 15:58 schrieb Dmitry Osipenko:
>> On 3/15/23 16:46, Dmitry Osipenko wrote:
>>> On 3/14/23 05:26, Dmitry Osipenko wrote:
>>>> @@ -633,7 +605,10 @@ int drm_gem_shmem_mmap(struct
>>>> drm_gem_
On 3/15/23 16:46, Dmitry Osipenko wrote:
> On 3/14/23 05:26, Dmitry Osipenko wrote:
>> @@ -633,7 +605,10 @@ int drm_gem_shmem_mmap(struct drm_gem_shmem_object
>> *shmem, struct vm_area_struct
>> return ret;
>> }
>>
>> +dma_resv_lo
Move virtio_gpu_execbuffer_ioctl() into separate virtgpu_submit.c file
and refactor the code along the way to ease addition of new features to
the ioctl.
Reviewed-by: Rob Clark
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/Makefile | 2 +-
drivers/gpu/drm/virtio
Add sync object DRM UAPI support to VirtIO-GPU driver. It's required
for enabling a full-featured Vulkan fencing by Venus and native context
VirtIO-GPU Mesa drivers.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/virtgpu_drv.c| 3 +-
drivers/gpu/drm/virtio/virtgpu_sub
- Added new patch that refactors job submission code path. I found
that it was very difficult to add a new/upcoming host-waits feature
because of how variables are passed around the code, the virtgpu_ioctl.c
also was growing to unmanageable size.
Dmitry Osipenko (2):
drm/vi
On 3/24/23 00:51, Dmitry Osipenko wrote:
> On 3/24/23 00:18, Rob Clark wrote:
> ...
>>> +static int
>>> +virtio_gpu_parse_deps(struct virtio_gpu_submit *submit)
>>> +{
>>> + struct drm_virtgpu_execbuffer *exbuf = submit->exbuf;
>>> +
On 3/23/23 22:03, Dmitry Osipenko wrote:
> struct virtio_gpu_submit {
> + struct virtio_gpu_submit_post_dep *post_deps;
> + unsigned int num_out_syncobjs;
> +
> + struct drm_syncobj **in_syncobjs;
> + unsigned int num_in_syncobjs;
> + uint64_t *in_fence_
On 3/24/23 00:18, Rob Clark wrote:
...
>> +static int
>> +virtio_gpu_parse_deps(struct virtio_gpu_submit *submit)
>> +{
>> + struct drm_virtgpu_execbuffer *exbuf = submit->exbuf;
>> + struct drm_virtgpu_execbuffer_syncobj syncobj_desc;
>> + size_t syncobj_stride = exbuf->syncobj_s
Add sync object DRM UAPI support to VirtIO-GPU driver. It's required
for enabling a full-featured Vulkan fencing by Venus and native context
VirtIO-GPU Mesa drivers.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/virtgpu_drv.c| 3 +-
drivers/gpu/drm/virtio/virtgpu_sub
Move virtio_gpu_execbuffer_ioctl() into separate virtgpu_submit.c file
and refactor the code along the way to ease addition of new features to
the ioctl.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/Makefile | 2 +-
drivers/gpu/drm/virtio/virtgpu_drv.h| 4 +
drivers
new/upcoming host-waits feature
because of how variables are passed around the code, the virtgpu_ioctl.c
also was growing to unmanageable size.
Dmitry Osipenko (2):
drm/virtio: Refactor job submission code path
drm/virtio: Support sync objects
drivers/gpu/drm/virtio/Makefile
On 3/23/23 00:25, Rob Clark wrote:
...
>> +static int virtio_gpu_dma_fence_wait(struct virtio_gpu_submit *submit,
>> +struct dma_fence *fence)
>> +{
>> + struct dma_fence *itr;
>> + int idx, err;
>> +
>> + dma_fence_array_for_each(itr, idx, fenc
Move virtio_gpu_execbuffer_ioctl() into separate virtgpu_submit.c file
and refactor the code along the way to ease addition of new features to
the ioctl.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/Makefile | 2 +-
drivers/gpu/drm/virtio/virtgpu_drv.h| 4 +
drivers
Add sync object DRM UAPI support to VirtIO-GPU driver. It's required
for enabling a full-featured Vulkan fencing by Venus and native context
VirtIO-GPU Mesa drivers.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/virtgpu_drv.c| 3 +-
drivers/gpu/drm/virtio/virtgpu_sub
difficult to add a new/upcoming host-waits feature
because of how variables are passed around the code, the virtgpu_ioctl.c
also was growing to unmanageable size.
Dmitry Osipenko (2):
drm/virtio: Refactor job submission code path
drm/virtio: Support sync objects
drivers/gpu/drm/virtio
On 3/14/23 05:26, Dmitry Osipenko wrote:
> @@ -633,7 +605,10 @@ int drm_gem_shmem_mmap(struct drm_gem_shmem_object
> *shmem, struct vm_area_struct
> return ret;
> }
>
> + dma_resv_lock(shmem->base.resv, NULL);
> ret = drm_g
Export drm_gem_shmem_get_pages_sgt_locked() that will be used by virtio-gpu
shrinker during GEM swap-in operation done under the held reservation lock.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 3 ++-
include/drm/drm_gem_shmem_helper.h | 1 +
2 files
Replace Panfrost's custom memory shrinker with a common drm-shmem
memory shrinker.
Tested-by: Steven Price # Firefly-RK3288
Reviewed-by: Steven Price
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/panfrost/Makefile | 1 -
drivers/gpu/drm/panfrost/panfrost_device.h
memory if
guest supports SWAP file or partition.
Acked-by: Gerd Hoffmann
Signed-off-by: Daniel Almeida
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 20 +++-
drivers/gpu/drm/virtio/virtgpu_gem.c| 68
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 37 +
. Initialize drm-shmem internals using drmm_gem_shmem_init(drm_device),
which will register drm-shmem shrinker
3. Implement madvise IOCTL that will use drm_gem_shmem_madvise()
Signed-off-by: Daniel Almeida
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c| 351
ted-by: Thomas Zimmermann
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c
b/drivers/gpu/drm/drm_gem_shmem_helper.c
index a02377a5131b..9e94652a141c 100644
--- a/d
Factor out pages unpinning code from drm_gem_shmem_purge() into new
drm_gem_shmem_unpin_pages(). This prepares code for addition of memory
shrinker support. The new common function will be used by shrinker for
eviction of shmem pages.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm
: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 7 +++
include/drm/drm_gem_shmem_helper.h | 9 +
2 files changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c
b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 4da9c9c39b9a..81d61791f874 100644
--- a
do
that. Switch the vmap/vunmap to use pin/unpin functions in a preparation
of addition of the memory shrinker support.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers
: Daniel Vetter
Acked-by: Thomas Zimmermann
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c| 217 --
drivers/gpu/drm/lima/lima_gem.c | 8 +-
drivers/gpu/drm/panfrost/panfrost_drv.c | 7 +-
.../gpu/drm/panfrost
-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 67 +-
1 file changed, 54 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c
b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 8fc2a3277486..4da9c9c39b9a 100644
--- a/drivers/gpu/
s://lore.kernel.org/dri-devel/6c16f303-81df-7ebe-85e9-51bb40a8b...@collabora.com/T/
Dmitry Osipenko (10):
drm/shmem-helper: Switch to reservation lock
drm/shmem-helper: Factor out pages alloc/release from
drm_gem_shmem_get/put_pages()
drm/shmem-helper: Add pages_pin_count field
drm/shmem-helper
On 3/7/23 21:25, Dmitry Osipenko wrote:
>> Not really a problem with this patchset, but having such branches looks
>> like a bug in the driver's GEM design. Whatever your GEM object needs or
>> does, it should be hidden in the implementation. Why is virtio doing this?
&
On 3/7/23 13:42, Thomas Zimmermann wrote:
> Hi
>
> Am 05.03.23 um 23:10 schrieb Dmitry Osipenko:
> [...]
>> *bo_ptr = bo;
>> diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c
>> b/drivers/gpu/drm/virtio/virtgpu_plane.c
>> index 4c09e313bebc..3f21512f
On 3/6/23 19:39, Dmitry Osipenko wrote:
> VirtIO-GPU got a new config option for disabling KMS. There were two
> problems left unnoticed during review when the new option was added:
>
> 1. The IS_ENABLED(CONFIG_DRM_VIRTIO_GPU_KMS) check in the code was
> inverted, hence KMS was d
Hoffmann
Fixes: 72122c69d717 ("drm/virtio: Add option to disable KMS support")
Signed-off-by: Dmitry Osipenko
---
Changelog:
v3: - Moved another similar "has_edid" occurence under the "num_scanouts"
condition in virtio_gpu_init(), like was suggested by Emil
On 3/6/23 18:02, Emil Velikov wrote:
> On 2023/03/06, Dmitry Osipenko wrote:
>> VirtIO-GPU got a new config option for disabling KMS. There were two
>> problems left unnoticed during review when the new option was added:
>>
>> 1. The IS_ENABLED(CONFIG_DRM_VIRTIO_GPU
: 72122c69d717 ("drm/virtio: Add option to disable KMS support")
Signed-off-by: Dmitry Osipenko
---
Changelog:
v2: - Moved the "has_edid" under the "num_scanouts" condition, like was
suggested by Gerd Hoffmann.
drivers/gpu/drm/virtio/virtgpu_kms.c | 14 --
Replace Panfrost's custom memory shrinker with a common drm-shmem
memory shrinker.
Tested-by: Steven Price # Firefly-RK3288
Reviewed-by: Steven Price
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/panfrost/Makefile | 1 -
drivers/gpu/drm/panfrost/panfrost_device.h
memory if
guest supports SWAP file or partition.
Acked-by: Gerd Hoffmann
Signed-off-by: Daniel Almeida
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 18 +++-
drivers/gpu/drm/virtio/virtgpu_gem.c| 52 +
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 37 +
Export drm_gem_un/pin() functions. They will be used by VirtIO-GPU driver
for pinning of an active framebuffer, preventing it from swapping out by
memory shrinker.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem.c | 2 ++
drivers/gpu/drm/drm_internal.h | 2 --
include/drm
Export drm_gem_shmem_get_pages_sgt_locked() that will be used by virtio-gpu
shrinker during GEM swap-in operation done under the held reservation lock.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 3 ++-
include/drm/drm_gem_shmem_helper.h | 1 +
2 files
ted-by: Thomas Zimmermann
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c
b/drivers/gpu/drm/drm_gem_shmem_helper.c
index e47cc45f39a1..b814352aae33 100644
--- a/d
. Initialize drm-shmem internals using drmm_gem_shmem_init(drm_device),
which will register drm-shmem shrinker
3. Implement madvise IOCTL that will use drm_gem_shmem_madvise()
Signed-off-by: Daniel Almeida
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c| 351
: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 7 +++
include/drm/drm_gem_shmem_helper.h | 9 +
2 files changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c
b/drivers/gpu/drm/drm_gem_shmem_helper.c
index a62c41336a7f..0c3abb0c2ea2 100644
--- a
-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 67 +-
1 file changed, 54 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c
b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 651ca7f380a2..a62c41336a7f 100644
--- a/drivers/gpu/
Factor out pages unpinning code from drm_gem_shmem_purge() into new
drm_gem_shmem_unpin_pages(). This prepares code for addition of memory
shrinker support. The new common function will be used by shrinker for
eviction of shmem pages.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm
do
that. Switch the vmap/vunmap to use pin/unpin functions in a preparation
of addition of the memory shrinker support.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers
: Daniel Vetter
Acked-by: Thomas Zimmermann
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c| 217 --
drivers/gpu/drm/lima/lima_gem.c | 8 +-
drivers/gpu/drm/panfrost/panfrost_drv.c | 7 +-
.../gpu/drm/panfrost
v10:- Was partially applied to misc-fixes/next.
https://lore.kernel.org/dri-devel/6c16f303-81df-7ebe-85e9-51bb40a8b...@collabora.com/T/
Dmitry Osipenko (11):
drm/shmem-helper: Switch to reservation lock
drm/shmem-helper: Factor out pages alloc/release from
drm_gem_shmem_get/put_pages()
: 72122c69d717 ("drm/virtio: Add option to disable KMS support")
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/virtgpu_kms.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c
b/drivers/gpu/drm/virtio/virtgpu_k
On 3/3/23 02:35, Rob Clark wrote:
> @@ -223,12 +223,15 @@ int virtio_gpu_init(struct virtio_device *vdev, struct
> drm_device *dev)
> num_scanouts, &num_scanouts);
> vgdev->num_scanouts = min_t(uint32_t, num_scanouts,
> VIRTIO_GPU_MAX_S
On 2/28/23 19:55, Lucas Stach wrote:
> drm_gem_prime_mmap() takes a reference on the GEM object, but before that
> drm_gem_mmap_obj() already takes a reference, which will be leaked as only
> one reference is dropped when the mapping is closed. Drop the extra
> reference when dma_buf_mmap() succeed
it's init/fini fxns instead
>
> Signed-off-by: Rob Clark
> Reviewed-by: Dmitry Osipenko
> Reviewed-by: Javier Martinez Canillas
> ---
Applied to misc-next
--
Best regards,
Dmitry
On 3/1/23 21:54, Rob Clark wrote:
> /* virtgpu_display.c */
> +#if defined(CONFIG_DRM_VIRTIO_GPU_KMS)
> int virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev);
> void virtio_gpu_modeset_fini(struct virtio_gpu_device *vgdev);
> +#else
> +static inline int virtio_gpu_modeset_init(struct virt
gitimate purpose.
>
> v2: Use more if (IS_ENABLED(...))
> v3: Also permit the host to advertise no scanouts
> v4: Spiff out commit msg
>
> Signed-off-by: Rob Clark
> Reviewed-by: Dmitry Osipenko
> ---
Gerd, to give you some context on the v4.. we've chatted a bit more on
967 at drivers/gpu/drm/drm_gem_shmem_helper.c:243
> drm_gem_shmem_pin+0x42/0x90 [drm_shmem_helper]
>
> Signed-off-by: Thomas Zimmermann
> ---
Thanks Thomas,
Acked-by: Dmitry Osipenko
--
Best regards,
Dmitry
On 2/28/23 17:40, Jani Nikula wrote:
...
>>> And the build is indeed currently broken.
>>>
>>> Moreover, when the build was fine for a while, apparently the changes in
>>> shmem broke a bunch of machines in Intel CI. And due to this, we aren't
>>> getting any CI results for incoming patches right n
Hi,
On 2/28/23 15:50, Andi Shyti wrote:
> Commit 67b7836d4458 ("drm/shmem-helper: Switch to reservation
> lock") removes the drm_gem_shmem_get_pages_locked() and
> drm_gem_shmem_put_pages_locked().
>
> But then commit edaa0db9 ("drm/shmem-helper: Fix locking for
> drm_gem_shmem_get_pages_sgt(
On 2/28/23 12:19, Javier Martinez Canillas wrote:
> Gerd Hoffmann writes:
>
> Hello Gerd,
>
>> On Mon, Feb 27, 2023 at 07:40:11AM -0800, Rob Clark wrote:
>>> On Sun, Feb 26, 2023 at 10:38 PM Gerd Hoffmann wrote:
On Fri, Feb 24, 2023 at 10:02:24AM -0800, Rob Clark wrote:
> From: Rob Cla
with `#if IS_ENABLED()`, for
consistency.
Maybe won't hurt to expand the commit message a tad, emphasizing the
security aspect and telling about the new num_scanouts=0 behaviour.
I can change it all while applying, if Gerd is okay with this patch.
Othwerise, good to me:
Reviewed-by: D
On 2/27/23 20:38, Rob Clark wrote:
...
> + if (IS_ENABLED(CONFIG_DRM_VIRTIO_GPU_KMS)) {
> + /* get display info */
> + virtio_cread_le(vgdev->vdev, struct virtio_gpu_config,
> + num_scanouts, &num_scanouts);
> + vgdev->num_scanouts
On 2/27/23 11:25, kernel test robot wrote:
> All errors (new ones prefixed by >>):
>
>drivers/gpu/drm/drm_gem_shmem_helper.c:832:18: warning: no previous
> prototype for function 'drm_gem_shmem_get_pages_sgt_locked'
> [-Wmissing-prototypes]
>struct sg_table *drm_gem_shmem_get_pages_sgt_l
On 2/27/23 13:37, Jani Nikula wrote:
> On Mon, 27 Feb 2023, Dmitry Osipenko wrote:
>> On 2/17/23 16:41, Dmitry Osipenko wrote:
>>> On 2/17/23 16:28, Thomas Zimmermann wrote:
>>>> Hi,
>>>>
>>>> I looked through the series. Most of the patches
Replace Panfrost's custom memory shrinker with a common drm-shmem
memory shrinker.
Tested-by: Steven Price # Firefly-RK3288
Reviewed-by: Steven Price
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/panfrost/Makefile | 1 -
drivers/gpu/drm/panfrost/panfrost_device.h
: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem.c | 29 +
include/drm/drm_gem.h | 3 +++
2 files changed, 32 insertions(+)
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index e5b2c077b314..3b16026e47f8 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b
memory if
guest supports SWAP file or partition.
Acked-by: Gerd Hoffmann
Signed-off-by: Daniel Almeida
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 18 +++-
drivers/gpu/drm/virtio/virtgpu_gem.c| 52 +
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 37 +
: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 12 +++-
include/drm/drm_gem_shmem_helper.h | 9 +
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c
b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 49ab49454783
. Initialize drm-shmem internals using drmm_gem_shmem_init(drm_device),
which will register drm-shmem shrinker
3. Implement madvise IOCTL that will use drm_gem_shmem_madvise()
Signed-off-by: Daniel Almeida
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c| 353
ted-by: Thomas Zimmermann
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c
b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 56de12bb28b1..ba1db7c5659c 100644
--- a/d
301 - 400 of 2018 matches
Mail list logo