<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/virtio/virtgpu_object.c, branch v5.6</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.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-02-27T12:54:39Z</updated>
<entry>
<title>drm/virtio: fix mmap page attributes</title>
<updated>2020-02-27T12:54:39Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2020-02-26T15:47:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6be7e07335486f5731cab748d80c68f20896581f'/>
<id>urn:sha1:6be7e07335486f5731cab748d80c68f20896581f</id>
<content type='text'>
virtio-gpu uses cached mappings, set
drm_gem_shmem_object.map_cached accordingly.

Cc: stable@vger.kernel.org
Fixes: c66df701e783 ("drm/virtio: switch from ttm to gem shmem helpers")
Reported-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Reported-by: Guillaume Gardet &lt;Guillaume.Gardet@arm.com&gt;
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Tested-by: Guillaume Gardet &lt;Guillaume.Gardet@arm.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20200226154752.24328-3-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/virtio: fix resource id creation race</title>
<updated>2020-02-24T14:45:34Z</updated>
<author>
<name>John Bates</name>
<email>jbates@chromium.org</email>
</author>
<published>2020-02-20T22:53:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fbb30168c7395b9cfeb9e6f7b0c0bca854a6552d'/>
<id>urn:sha1:fbb30168c7395b9cfeb9e6f7b0c0bca854a6552d</id>
<content type='text'>
The previous code was not thread safe and caused
undefined behavior from spurious duplicate resource IDs.
In this patch, an atomic_t is used instead. We no longer
see any duplicate IDs in tests with this change.

Fixes: 16065fcdd19d ("drm/virtio: do NOT reuse resource ids")
Signed-off-by: John Bates &lt;jbates@chromium.org&gt;
Reviewed-by: Chia-I Wu &lt;olvaffe@gmail.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20200220225319.45621-1-jbates@chromium.org
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/shmem: switch shmem helper to &amp;drm_gem_object_funcs.mmap</title>
<updated>2019-10-17T11:59:16Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2019-10-16T11:51:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0be895893607fb3447478d6e33dfb60644195a09'/>
<id>urn:sha1:0be895893607fb3447478d6e33dfb60644195a09</id>
<content type='text'>
Switch gem shmem helper to the new mmap() workflow,
from &amp;gem_driver.fops.mmap to &amp;drm_gem_object_funcs.mmap.

v2: Fix vm_flags and vm_page_prot handling.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-3-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/virtio: switch from ttm to gem shmem helpers</title>
<updated>2019-09-04T04:54:11Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2019-08-29T10:32:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c66df701e783bc666593e6e665f13670760883ee'/>
<id>urn:sha1:c66df701e783bc666593e6e665f13670760883ee</id>
<content type='text'>
virtio-gpu basically needs a sg_table for the bo, to tell the host where
the backing pages for the object are.  So the gem shmem helpers are a
perfect fit.  Some drm_gem_object_funcs need thin wrappers to update the
host state, but otherwise the helpers handle everything just fine.

Once the fencing was sorted the switch was surprisingly easy and for the
most part just removing the ttm code.

v4: fix drm_gem_object_funcs name.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Chia-I Wu &lt;olvaffe@gmail.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-15-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/virtio: rework virtio_gpu_object_create fencing</title>
<updated>2019-09-04T04:54:09Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2019-08-29T10:32:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2324300f427ffca99135b256a97f9fb62fc2483'/>
<id>urn:sha1:e2324300f427ffca99135b256a97f9fb62fc2483</id>
<content type='text'>
Rework fencing workflow.  Stop using ttm helpers, use the
virtio_gpu_array_* helpers instead.

Due to using the gem reservation object it is initialized and ready for
use before calling ttm_bo_init.  So we can simply use the standard
fencing workflow and drop the tricky logic which checks whenever the
command is in flight still.

v6: rewrite most of the patch.

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-10-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/virtio: remove virtio_gpu_object_wait</title>
<updated>2019-09-04T04:54:08Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2019-08-29T10:32:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=191ab21995b0412ff84946005663365cafd00dcc'/>
<id>urn:sha1:191ab21995b0412ff84946005663365cafd00dcc</id>
<content type='text'>
No users left.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Chia-I Wu &lt;olvaffe@gmail.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-5-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/virtio: pass gem reservation object to ttm init</title>
<updated>2019-09-04T04:54:07Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2019-08-29T10:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=889165ad6190556ffe4a8fa6b0e486f1c25589d8'/>
<id>urn:sha1:889165ad6190556ffe4a8fa6b0e486f1c25589d8</id>
<content type='text'>
With this gem and ttm will use the same reservation object,
so mixing and matching ttm / gem reservation helpers should
work fine.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Chia-I Wu &lt;olvaffe@gmail.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-2-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm/virtio: module_param_named() requires linux/moduleparam.h</title>
<updated>2019-08-28T09:11:57Z</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2019-08-28T08:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b0138364da17617db052c4a738b58bf45e42f500'/>
<id>urn:sha1:b0138364da17617db052c4a738b58bf45e42f500</id>
<content type='text'>
Fixes: 3e93bc2a58aa ("drm/virtio: make resource id workaround runtime switchable.")
Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20190828185516.22b03da8@canb.auug.org.au
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/virtio: make resource id workaround runtime switchable.</title>
<updated>2019-08-27T05:35:08Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2019-08-22T10:26:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e93bc2a58aa241081e043ef9e6e86c42808499a'/>
<id>urn:sha1:3e93bc2a58aa241081e043ef9e6e86c42808499a</id>
<content type='text'>
Also update the comment with a reference to the virglrenderer fix.

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/20190822102614.18164-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>
</feed>
