<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/virtio/virtgpu_object.c, branch v5.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-08-23T08:09:02Z</updated>
<entry>
<title>drm/virtio: use virtio_max_dma_size</title>
<updated>2019-08-23T08:09:02Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2019-08-21T11:12:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b2a0a1ef66f96bf34921a3865581eca32ff05ec'/>
<id>urn:sha1:9b2a0a1ef66f96bf34921a3865581eca32ff05ec</id>
<content type='text'>
We must make sure our scatterlist segments are not too big, otherwise
we might see swiotlb failures (happens with sev, also reproducable with
swiotlb=force).

Suggested-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20190821111210.27165-1-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/virtio: rework resource creation workflow.</title>
<updated>2019-03-28T11:11:56Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2019-03-18T11:33:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=530b28426a94b822b3c03491cde5c9a961d80e7f'/>
<id>urn:sha1:530b28426a94b822b3c03491cde5c9a961d80e7f</id>
<content type='text'>
This patch moves the virtio_gpu_cmd_create_resource() call (which
notifies the host about the new resource created) into the
virtio_gpu_object_create() function.  That way we can call
virtio_gpu_cmd_create_resource() before ttm_bo_init(), so the host
already knows about the object when ttm initializes the object and calls
our driver callbacks.

Specifically the object is already created when the
virtio_gpu_ttm_tt_bind() callback invokes virtio_gpu_object_attach(),
so the extra virtio_gpu_object_attach() calls done after
virtio_gpu_object_create() are not needed any more.

The fence support for the create ioctl becomes a bit more tricky though.
The code moved into virtio_gpu_object_create() too.  We first submit the
(fenced) virtio_gpu_cmd_create_resource() command, then initialize the
ttm object, and finally attach just created object to the fence for the
command in case it didn't finish yet.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Acked-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20190318113332.10900-6-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/virtio: use struct to pass params to virtio_gpu_object_create()</title>
<updated>2019-03-28T11:11:55Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2019-03-18T11:33:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4441235f9566e66467bcb9d9fe744d21c68213fc'/>
<id>urn:sha1:4441235f9566e66467bcb9d9fe744d21c68213fc</id>
<content type='text'>
Create virtio_gpu_object_params, use that to pass object parameters to
virtio_gpu_object_create.  This is just the first step, followup patches
will add more parameters to the struct.  The plan is to use the struct
for all object parameters.

Drop unused "kernel" parameter for virtio_gpu_alloc_object(), it is
unused and always false.

Also drop "pinned" parameter.  virtio-gpu doesn't shuffle around
objects, so effecively they all are pinned anyway.  Hardcode
TTM_PL_FLAG_NO_EVICT so ttm knows.  Doesn't change much for the moment
as virtio-gpu supports TTM_PL_FLAG_TT only so there is no opportunity to
move around objects.  That'll probably change in the future though.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Acked-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20190318113332.10900-3-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/virtio: do NOT reuse resource ids</title>
<updated>2019-02-11T04:44:10Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2019-02-08T14:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=16065fcdd19ddb9e093192914ac863884f308766'/>
<id>urn:sha1:16065fcdd19ddb9e093192914ac863884f308766</id>
<content type='text'>
Bisected guest kernel changes crashing qemu.  Landed at
"6c1cd97bda drm/virtio: fix resource id handling".  Looked again, and
noticed we where not only leaking *some* ids, but *all* ids.  The old
code never ever called virtio_gpu_resource_id_put().

So, commit 6c1cd97bda effectively makes the linux kernel starting
re-using IDs after releasing them, and apparently virglrenderer can't
deal with that.  Oops.

This patch puts a temporary stopgap into place for the 5.0 release.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190208140409.15280-1-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/virtio: Use IDAs more efficiently</title>
<updated>2018-11-14T11:50:34Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>willy@infradead.org</email>
</author>
<published>2018-10-30T16:53:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2ae7f165c0b022a8ed1732f8ab2c11b2c173146e'/>
<id>urn:sha1:2ae7f165c0b022a8ed1732f8ab2c11b2c173146e</id>
<content type='text'>
0-based IDAs are more efficient than any other base.  Convert the
1-based IDAs to be 0-based.

Signed-off-by: Matthew Wilcox &lt;willy@infradead.org&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20181030165352.13065-2-willy@infradead.org
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/virtio: Handle error from virtio_gpu_resource_id_get</title>
<updated>2018-11-14T11:50:34Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>willy@infradead.org</email>
</author>
<published>2018-10-30T16:53:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=556c62e85f9b97139c1b3f6f1585fcee0bc3eb6a'/>
<id>urn:sha1:556c62e85f9b97139c1b3f6f1585fcee0bc3eb6a</id>
<content type='text'>
ida_alloc() can return -ENOMEM in the highly unlikely case we run out
of memory.  The current code creates an object with an invalid ID.

Signed-off-by: Matthew Wilcox &lt;willy@infradead.org&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20181030165352.13065-1-willy@infradead.org
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/virtio: Replace IDRs with IDAs</title>
<updated>2018-10-29T21:50:55Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>willy@infradead.org</email>
</author>
<published>2018-09-26T16:00:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1938d1ae32fefa172288e3a9245ae126640c5c10'/>
<id>urn:sha1:1938d1ae32fefa172288e3a9245ae126640c5c10</id>
<content type='text'>
These IDRs were only being used to allocate unique numbers, not to look
up pointers, so they can use the more space-efficient IDA instead.

Signed-off-by: Matthew Wilcox &lt;willy@infradead.org&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20180926160031.15721-2-willy@infradead.org

[ kraxel: resolve conflict ]

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/virtio: fix resource id handling</title>
<updated>2018-10-29T21:50:55Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2018-10-19T06:18:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c1cd97bdaffa2ae1dbdc8a0857931308ac647cd'/>
<id>urn:sha1:6c1cd97bdaffa2ae1dbdc8a0857931308ac647cd</id>
<content type='text'>
Move virtio_gpu_resource_id_{get,put} to virtgpu_object.c and make them
static.  Allocate and free the id on creation and destroy, drop all
other calls.  That way objects have a valid handle for the whole
lifetime of the object.

Also fixes ids leaking.  Worst offender are dumb buffers, and I think
some error paths too.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Dave Airlie &lt;airlied@redhat.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-7-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/virtio: track created object state</title>
<updated>2018-10-29T21:50:55Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2018-10-19T06:18:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=23c897d72ca8064c626be0ef73fe671488d584bb'/>
<id>urn:sha1:23c897d72ca8064c626be0ef73fe671488d584bb</id>
<content type='text'>
Track whenever the virtio_gpu_object is already created (i.e. host knows
about it) in a new variable.  Add checks to virtio_gpu_object_attach()
to do nothing on objects not created yet.

Make virtio_gpu_ttm_bo_destroy() use the new variable too, instead of
expecting hw_res_handle indicating the object state.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Dave Airlie &lt;airlied@redhat.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-2-kraxel@redhat.com
</content>
</entry>
<entry>
<title>virtio: Rework virtio_gpu_object_kmap()</title>
<updated>2018-09-26T06:05:06Z</updated>
<author>
<name>Ezequiel Garcia</name>
<email>ezequiel@collabora.com</email>
</author>
<published>2018-09-25T16:16:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a20c4173c4219d85ba7775fde584cd34305a0b3d'/>
<id>urn:sha1:a20c4173c4219d85ba7775fde584cd34305a0b3d</id>
<content type='text'>
Currently, virtio_gpu_object_kmap() is only called by
virtio_gpufb_create(), when a DRM framebuffer is created.

Thus, instead of returning the vmap'ed address, emit a warning
if virtio_gpu_object_kmap is called on an already mapped
object. With this change, kmap/kunmap calls are now balanced.

Signed-off-by: Ezequiel Garcia &lt;ezequiel@collabora.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20180925161606.17980-3-ezequiel@collabora.com
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
</feed>
