<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/virtio/virtgpu_fence.c, branch linux-5.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-12-02T10:48:14Z</updated>
<entry>
<title>drm/virtio: consider dma-fence context when signaling</title>
<updated>2020-12-02T10:48:14Z</updated>
<author>
<name>Gurchetan Singh</name>
</author>
<published>2020-12-01T02:16:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=36549848ed27c22bb2ffd5d1468efc6505b05f97'/>
<id>urn:sha1:36549848ed27c22bb2ffd5d1468efc6505b05f97</id>
<content type='text'>
This an incremental refactor towards multiple dma-fence contexts
in virtio-gpu.  Since all fences are still allocated using
&amp;virtio_gpu_fence_driver.context, nothing should break and every
processed fence will be signaled.

The overall idea is every 3D context can allocate a number of
dma-fence contexts.  Each dma-fence context refers to it's own
timeline.

For example, consider the following case where virgl submits
commands to the GPU (fence ids 1, 3) and does a metadata query with
the CPU (fence id 5).  In a different process, gfxstream submits
commands to the GPU (fence ids 2, 4).

fence_id (&amp;dma_fence.seqno)       | 1 2 3 4 5
----------------------------------|-----------
fence_ctx 0 (virgl gpu)           | 1   3
fence_ctx 1 (virgl metadata query)|         5
fence_ctx 2 (gfxstream gpu)       |   2   4

With multiple fence contexts, we can wait for the metadata query
to finish without waiting for the virgl gpu to finish.  virgl gpu
does not have to wait for gfxstream gpu.  The fence id still is the
monotonically increasing sequence number, but it's only revelant to
the specific dma-fence context.

To fully enable this feature, we'll need to:
  - have each 3d context allocate a number of fence contexts. Not
    too hard with explicit context initialization on the horizon.
  - have guest userspace specify fence context when performing
    ioctls.
  - tag each fence emitted to the host with the fence context
    information.  virtio_gpu_ctrl_hdr has padding + flags available,
    so that should be easy.

This change goes in the direction specified above, by:
  - looking up the virtgpu_fence given a fence_id
  - signalling all prior fences in a given context
  - signalling current fence

v2: fix grammar in comment
v3: add r-b tags

Reviewed-by: Anthoine Bourgeois &lt;anthoine.bourgeois@gmail.com&gt;
Signed-off-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20201201021623.619-3-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/virtio: rework virtio_fence_signaled</title>
<updated>2020-12-02T10:48:14Z</updated>
<author>
<name>Gurchetan Singh</name>
</author>
<published>2020-12-01T02:16:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b9662c3a54eba1a06e2c14744dd78b065df120c5'/>
<id>urn:sha1:b9662c3a54eba1a06e2c14744dd78b065df120c5</id>
<content type='text'>
virtio_gpu_fence_event_process sets the last_fence_id and
subsequently calls dma_fence_signal_locked(..).

dma_fence_signal_locked(..) sets DMA_FENCE_FLAG_SIGNALED_BIT,
which is actually checked before &amp;dma_fence_ops.(*signaled) is
called.

The check for last_fence_id is therefore a bit redundant, and
it will not be sufficient to check the last_fence_id for multiple
synchronization timelines.  Remove it.

v3: add r-b tags

Signed-off-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Reviewed-by: Anthoine Bourgeois &lt;anthoine.bourgeois@gmail.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20201201021623.619-2-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/virtio: virtio_{blah} --&gt; virtio_gpu_{blah}</title>
<updated>2020-12-02T10:48:14Z</updated>
<author>
<name>Gurchetan Singh</name>
</author>
<published>2020-12-01T02:16:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41a90202cd150a2f1318582a985e27b4a3bd9a8d'/>
<id>urn:sha1:41a90202cd150a2f1318582a985e27b4a3bd9a8d</id>
<content type='text'>
virtio_gpu typically uses the prefix virtio_gpu, but there are
a few places where the virtio prefix is used.  Modify this for
consistency.

v3: add r-b tags

Signed-off-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Reviewed-by: Anthoine Bourgeois &lt;anthoine.bourgeois@gmail.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20201201021623.619-1-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/virtio: rename sync_seq and last_seq</title>
<updated>2020-11-20T09:44:41Z</updated>
<author>
<name>Gurchetan Singh</name>
</author>
<published>2020-11-19T01:08:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65f8453dc69159fd499e0c5b7fafbba771a1dfe2'/>
<id>urn:sha1:65f8453dc69159fd499e0c5b7fafbba771a1dfe2</id>
<content type='text'>
To be clearer about our intentions to associate sequence numbers
and fence IDs, let's rename these variables.

Signed-off-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Reviewed-by: Anthoine Bourgeois &lt;anthoine.bourgeois@gmail.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20201119010809.528-5-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/virtio: use fence_id when processing fences</title>
<updated>2020-11-20T09:44:41Z</updated>
<author>
<name>Gurchetan Singh</name>
</author>
<published>2020-11-19T01:08:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bb53a604a74b38e6d71ae12174c8c1d229c2e2b1'/>
<id>urn:sha1:bb53a604a74b38e6d71ae12174c8c1d229c2e2b1</id>
<content type='text'>
Currently, the fence ID, which can be used to identify a
virtgpu fence, is the same as the fence sequence number.

Let's use the fence_id name to clearly signal this.

Signed-off-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Reviewed-by: Anthoine Bourgeois &lt;anthoine.bourgeois@gmail.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20201119010809.528-4-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/virtio: move to_virtio_fence inside virtgpu_fence</title>
<updated>2019-12-19T06:13:46Z</updated>
<author>
<name>Gurchetan Singh</name>
</author>
<published>2019-12-19T00:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c91a1e2b5a6a72260dd2a116a6157cb9e740c35d'/>
<id>urn:sha1:c91a1e2b5a6a72260dd2a116a6157cb9e740c35d</id>
<content type='text'>
That's the only file that uses it.

Signed-off-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20191219005733.18960-5-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/virtio: static-ify virtio_fence_signaled</title>
<updated>2019-12-19T06:13:45Z</updated>
<author>
<name>Gurchetan Singh</name>
</author>
<published>2019-12-19T00:57:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=974e65e384b441062004576c625ade3d54bb5d79'/>
<id>urn:sha1:974e65e384b441062004576c625ade3d54bb5d79</id>
<content type='text'>
Not used anywhere else.

Signed-off-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20191219005733.18960-1-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/virtio: add fence sanity check</title>
<updated>2019-09-04T04:54:12Z</updated>
<author>
<name>Gerd Hoffmann</name>
</author>
<published>2019-08-29T10:33:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=12afce08ed51a67aafcc678f4b6e428d71b1f6fb'/>
<id>urn:sha1:12afce08ed51a67aafcc678f4b6e428d71b1f6fb</id>
<content type='text'>
Make sure we don't leak half-initialized fences outside the driver.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Chia-I Wu &lt;olvaffe@gmail.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-19-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/virtgpu: drop use of drmP.h</title>
<updated>2019-07-15T16:11:31Z</updated>
<author>
<name>Sam Ravnborg</name>
</author>
<published>2019-06-30T06:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3d639776e601ddc1ee4e23fc6638c421377ae93'/>
<id>urn:sha1:a3d639776e601ddc1ee4e23fc6638c421377ae93</id>
<content type='text'>
Drop use of the deprecated drmP.h header file.
Fix fallout by adding missing include files.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Acked-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: virtualization@lists.linux-foundation.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-28-sam@ravnborg.org
</content>
</entry>
<entry>
<title>drm/virtio: Remove redundant return type</title>
<updated>2019-05-06T13:36:23Z</updated>
<author>
<name>Robert Foss</name>
</author>
<published>2019-05-06T09:10:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fa2b7c21d9b974b5b1b4f63a02edeaf049054dba'/>
<id>urn:sha1:fa2b7c21d9b974b5b1b4f63a02edeaf049054dba</id>
<content type='text'>
virtio_gpu_fence_emit() always returns 0, since it
has no error paths.

Consequently no calls for virtio_gpu_fence_emit()
use the return value, and it can be removed.

Signed-off-by: Robert Foss &lt;robert.foss@collabora.com&gt;
Reviewed-by: Chia-I Wu &lt;olvaffe@gmail.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20190506091034.30289-1-robert.foss@collabora.com
Suggested-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Reviewed-by: Chia-I Wu &lt;olvaffe@gmail.com&gt;
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
</feed>
