<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/virtio, branch v6.5.12</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.5.12</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.5.12'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-10-06T11:15:58+00:00</updated>
<entry>
<title>drm/virtio: clean out_fence on complete_submit</title>
<updated>2023-10-06T11:15:58+00:00</updated>
<author>
<name>José Pekkarinen</name>
<email>jose.pekkarinen@foxhound.fi</email>
</author>
<published>2023-09-12T06:08:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a6ad94b6274b3274e329678584626e7c3f410a1'/>
<id>urn:sha1:5a6ad94b6274b3274e329678584626e7c3f410a1</id>
<content type='text'>
[ Upstream commit 4556b93f6c026c62c93e7acc22838224ac2e2eba ]

The removed line prevents the following cleanup function
to execute a dma_fence_put on the out_fence to free its
memory, producing the following output in kmemleak:

unreferenced object 0xffff888126d8ee00 (size 128):
  comm "kwin_wayland", pid 981, jiffies 4295380296 (age 390.060s)
  hex dump (first 32 bytes):
    c8 a1 c2 27 81 88 ff ff e0 14 a9 c0 ff ff ff ff  ...'............
    30 1a e1 2e a6 00 00 00 28 fc 5b 17 81 88 ff ff  0.......(.[.....
  backtrace:
    [&lt;0000000011655661&gt;] kmalloc_trace+0x26/0xa0
    [&lt;0000000055f15b82&gt;] virtio_gpu_fence_alloc+0x47/0xc0 [virtio_gpu]
    [&lt;00000000fa6d96f9&gt;] virtio_gpu_execbuffer_ioctl+0x1a8/0x800 [virtio_gpu]
    [&lt;00000000e6cb5105&gt;] drm_ioctl_kernel+0x169/0x240 [drm]
    [&lt;000000005ad33e27&gt;] drm_ioctl+0x399/0x6b0 [drm]
    [&lt;00000000a19dbf65&gt;] __x64_sys_ioctl+0xc5/0x100
    [&lt;0000000011fa801e&gt;] do_syscall_64+0x5b/0xc0
    [&lt;0000000065c76d8a&gt;] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
unreferenced object 0xffff888121930500 (size 128):
  comm "kwin_wayland", pid 981, jiffies 4295380313 (age 390.096s)
  hex dump (first 32 bytes):
    c8 a1 c2 27 81 88 ff ff e0 14 a9 c0 ff ff ff ff  ...'............
    f9 ec d7 2f a6 00 00 00 28 fc 5b 17 81 88 ff ff  .../....(.[.....
  backtrace:
    [&lt;0000000011655661&gt;] kmalloc_trace+0x26/0xa0
    [&lt;0000000055f15b82&gt;] virtio_gpu_fence_alloc+0x47/0xc0 [virtio_gpu]
    [&lt;00000000fa6d96f9&gt;] virtio_gpu_execbuffer_ioctl+0x1a8/0x800 [virtio_gpu]
    [&lt;00000000e6cb5105&gt;] drm_ioctl_kernel+0x169/0x240 [drm]
    [&lt;000000005ad33e27&gt;] drm_ioctl+0x399/0x6b0 [drm]
    [&lt;00000000a19dbf65&gt;] __x64_sys_ioctl+0xc5/0x100
    [&lt;0000000011fa801e&gt;] do_syscall_64+0x5b/0xc0
    [&lt;0000000065c76d8a&gt;] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[...]

This memleak will grow quickly, being possible to see the
following line in dmesg after few minutes of life in the
virtual machine:

[  706.217388] kmemleak: 10731 new suspected memory leaks (see /sys/kernel/debug/kmemleak)

The patch will remove the line to allow the cleanup
function do its job.

Signed-off-by: José Pekkarinen &lt;jose.pekkarinen@foxhound.fi&gt;
Fixes: e4812ab8e6b1 ("drm/virtio: Refactor and optimize job submission code path")
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230912060824.5210-1-jose.pekkarinen@foxhound.fi
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/virtio: Conditionally allocate virtio_gpu_fence</title>
<updated>2023-09-19T10:30:08+00:00</updated>
<author>
<name>Gurchetan Singh</name>
<email>gurchetansingh@chromium.org</email>
</author>
<published>2023-07-07T21:31:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4037dcd70c3335600a2a95ec6229d70859bd37a1'/>
<id>urn:sha1:4037dcd70c3335600a2a95ec6229d70859bd37a1</id>
<content type='text'>
commit 70d1ace56db6c79d39dbe9c0d5244452b67e2fde upstream.

We don't want to create a fence for every command submission.  It's
only necessary when userspace provides a waitable token for submission.
This could be:

1) bo_handles, to be used with VIRTGPU_WAIT
2) out_fence_fd, to be used with dma_fence apis
3) a ring_idx provided with VIRTGPU_CONTEXT_PARAM_POLL_RINGS_MASK
   + DRM event API
4) syncobjs in the future

The use case for just submitting a command to the host, and expecting
no response.  For example, gfxstream has GFXSTREAM_CONTEXT_PING that
just wakes up the host side worker threads.  There's also
CROSS_DOMAIN_CMD_SEND which just sends data to the Wayland server.

This prevents the need to signal the automatically created
virtio_gpu_fence.

In addition, VIRTGPU_EXECBUF_RING_IDX is checked when creating a
DRM event object.  VIRTGPU_CONTEXT_PARAM_POLL_RINGS_MASK is
already defined in terms of per-context rings.  It was theoretically
possible to create a DRM event on the global timeline (ring_idx == 0),
if the context enabled DRM event polling.  However, that wouldn't
work and userspace (Sommelier).  Explicitly disallow it for
clarity.

Signed-off-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Reviewed-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Tested-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt; # edited coding style
Link: https://patchwork.freedesktop.org/patch/msgid/20230707213124.494-1-gurchetansingh@chromium.org
Signed-off-by: Alyssa Ross &lt;hi@alyssa.is&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/virtio: Wait for each dma-fence of in-fence array individually</title>
<updated>2023-06-03T01:50:50+00:00</updated>
<author>
<name>Dmitry Osipenko</name>
<email>dmitry.osipenko@collabora.com</email>
</author>
<published>2023-04-16T11:52:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eba57fb5498f2858768321e64570caea188455b8'/>
<id>urn:sha1:eba57fb5498f2858768321e64570caea188455b8</id>
<content type='text'>
Use dma-fence-unwrap API for waiting each dma-fence of the in-fence array
individually. Sync file's in-fence array always has a non-matching fence
context ID, which doesn't allow to skip waiting of fences with a matching
context ID in a case of a merged sync file fence.

Suggested-by: Rob Clark &lt;robdclark@gmail.com&gt;
Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Tested-by: Pierre-Eric Pelloux-Prayer &lt;pierre-eric.pelloux-prayer@amd.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230416115237.798604-3-dmitry.osipenko@collabora.com
</content>
</entry>
<entry>
<title>drm/virtio: Refactor and optimize job submission code path</title>
<updated>2023-06-03T01:50:40+00:00</updated>
<author>
<name>Dmitry Osipenko</name>
<email>dmitry.osipenko@collabora.com</email>
</author>
<published>2023-04-16T11:52:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e4812ab8e6b142e1ce19b50fcf744e20ea9adfe3'/>
<id>urn:sha1:e4812ab8e6b142e1ce19b50fcf744e20ea9adfe3</id>
<content type='text'>
Move virtio_gpu_execbuffer_ioctl() into separate virtgpu_submit.c file,
refactoring and optimizing the code along the way to ease addition of new
features to the ioctl.

The optimization is done by using optimal ordering of the job's submission
steps, reducing code path from the start of the 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 &lt;robdclark@gmail.com&gt;
Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Tested-by: Pierre-Eric Pelloux-Prayer &lt;pierre-eric.pelloux-prayer@amd.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230416115237.798604-2-dmitry.osipenko@collabora.com
</content>
</entry>
<entry>
<title>Merge v6.3-rc4 into drm-next</title>
<updated>2023-03-29T14:00:23+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2023-03-29T14:00:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=82bbec189ab34873688484cd14189a5392946fbb'/>
<id>urn:sha1:82bbec189ab34873688484cd14189a5392946fbb</id>
<content type='text'>
I just landed the fence deadline PR from Rob that a bunch of drivers
want/need to apply driver-specific patches. Backmerge -rc4 so that
they don't have to be stuck on -rc2 for no reason at all.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/virtio: Enable fb damage clips property for the primary plane</title>
<updated>2023-03-13T17:22:24+00:00</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javierm@redhat.com</email>
</author>
<published>2023-03-10T12:59:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=01f05940a9a75e11a2be64993c44ad8dd06e6e26'/>
<id>urn:sha1:01f05940a9a75e11a2be64993c44ad8dd06e6e26</id>
<content type='text'>
Christian Hergert reports that the driver doesn't enable the property and
that leads to always doing a full plane update, even when the driver does
support damage clipping for the primary plane.

Don't enable it for the cursor plane, because its .atomic_update callback
doesn't handle damage clips.

Reported-by: Christian Hergert &lt;chergert@redhat.com&gt;
Signed-off-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230310125943.912514-1-javierm@redhat.com
</content>
</entry>
<entry>
<title>Merge drm/drm-fixes into drm-misc-fixes</title>
<updated>2023-03-13T09:14:05+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-03-13T09:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b3c9a04135bdbd3aabd5e9534bad0fe6df505f8a'/>
<id>urn:sha1:b3c9a04135bdbd3aabd5e9534bad0fe6df505f8a</id>
<content type='text'>
Backmerging to get latest upstream.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge drm/drm-next into drm-misc-next</title>
<updated>2023-03-13T08:27:50+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-03-13T08:27:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a1eccc574f977bd21a4ec8ac54bd73a2756bd281'/>
<id>urn:sha1:a1eccc574f977bd21a4ec8ac54bd73a2756bd281</id>
<content type='text'>
Backmerging to get v6.3-rc1 and sync with the other DRM trees.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
</content>
</entry>
<entry>
<title>drm/virtio: Fix handling CONFIG_DRM_VIRTIO_GPU_KMS option</title>
<updated>2023-03-06T17:32:17+00:00</updated>
<author>
<name>Dmitry Osipenko</name>
<email>dmitry.osipenko@collabora.com</email>
</author>
<published>2023-03-06T16:39:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aad9729ec0e009440ac8c1a4be2204e4d3c08977'/>
<id>urn:sha1:aad9729ec0e009440ac8c1a4be2204e4d3c08977</id>
<content type='text'>
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 disabled when it should be enabled and vice versa.

2. The disabled KMS crashed kernel with a NULL dereference in
drm_kms_helper_hotplug_event(), which shall not be invoked with a
disabled KMS.

Fix the inverted config option check in the code and skip handling the
VIRTIO_GPU_EVENT_DISPLAY sent by host when KMS is disabled in guest to fix
the crash.

Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Fixes: 72122c69d717 ("drm/virtio: Add option to disable KMS support")
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230306163916.1595961-1-dmitry.osipenko@collabora.com
</content>
</entry>
<entry>
<title>drm/virtio: Add option to disable KMS support</title>
<updated>2023-03-03T20:29:54+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@chromium.org</email>
</author>
<published>2023-03-02T23:35:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=72122c69d71784e390527819754ea456421c4501'/>
<id>urn:sha1:72122c69d71784e390527819754ea456421c4501</id>
<content type='text'>
Add a build option to disable modesetting support.  This is useful in
cases where the guest only needs to use the GPU in a headless mode, or
(such as in the CrOS usage) window surfaces are proxied to a host
compositor.

As the modesetting ioctls are a big surface area for potential security
bugs to be found (it's happened in the past, we should assume it will
again in the future), it makes sense to have a build option to disable
those ioctls in cases where they serve no legitimate purpose.

v2: Use more if (IS_ENABLED(...))
v3: Also permit the host to advertise no scanouts
v4: Spiff out commit msg
v5: Make num_scanouts==0 and DRM_VIRTIO_GPU_KMS=n behave the same
v6: Drop conditionally building virtgpu_display.c and early-out of
    it's init/fini fxns instead

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Reviewed-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230302233506.3146290-1-robdclark@gmail.com
</content>
</entry>
</feed>
