- 04 9月, 2019 4 次提交
-
-
由 Gerd Hoffmann 提交于
Switch to the virtio_gpu_array_* helper workflow. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NChia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-12-kraxel@redhat.com
-
由 Gerd Hoffmann 提交于
Switch to the virtio_gpu_array_* helper workflow. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NChia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-11-kraxel@redhat.com
-
由 Gerd Hoffmann 提交于
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: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NChia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-10-kraxel@redhat.com
-
由 Gerd Hoffmann 提交于
Rework fencing workflow, starting with virtio_gpu_execbuffer_ioctl. Stop using ttm helpers, use the virtio_gpu_array_* helpers (which work on the reservation objects directly) instead. Also store the object array in struct virtio_gpu_vbuffer, so we explicitly keep a reference of all buffers used instead of depending on ttm_bo_put() checking whenever the object is actually idle before releasing it. New workflow: (1) All gem objects needed by a command are added to a virtio_gpu_object_array. (2) All reservation objects will be locked (virtio_gpu_array_lock_resv). (3) virtio_gpu_fence_emit() completes fence initialization. (4) fence gets added to the objects, reservation objects are unlocked (virtio_gpu_array_add_fence, virtio_gpu_array_unlock_resv). (5) virtio command is submitted to the host. (6) The completion callback (virtio_gpu_dequeue_ctrl_func) will drop object references and free virtio_gpu_object_array. v6: rewrite most of the patch. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NChia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-9-kraxel@redhat.com
-
- 28 8月, 2019 2 次提交
-
-
由 Gerd Hoffmann 提交于
Split virtqueue_kick() call into virtqueue_kick_prepare(), which requires serialization, and virtqueue_notify(), which does not. Move the virtqueue_notify() call out of the critical section protected by the queue lock. This avoids triggering a vmexit while holding the lock and thereby fixes a rather bad spinlock contention. Suggested-by: NChia-I Wu <olvaffe@gmail.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NChia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190813082509.29324-3-kraxel@redhat.com
-
由 Gerd Hoffmann 提交于
Make the queue functions return void, none of the call sites checks the return value. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NChia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190813082509.29324-2-kraxel@redhat.com
-
- 16 7月, 2019 1 次提交
-
-
由 Sam Ravnborg 提交于
Drop use of the deprecated drmP.h header file. Fix fallout by adding missing include files. Signed-off-by: NSam Ravnborg <sam@ravnborg.org> Acked-by: NGerd Hoffmann <kraxel@redhat.com> Acked-by: NEmil Velikov <emil.velikov@collabora.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: virtualization@lists.linux-foundation.org Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-28-sam@ravnborg.org
-
- 26 6月, 2019 1 次提交
-
-
由 Gerd Hoffmann 提交于
drm_connector_update_edid_property can sleep, we must not call it while holding a spinlock. Move the callsite. Fixes: b4b01b49 ("drm/virtio: add edid support") Reported-by: NMax Filippov <jcmvbkbc@gmail.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Tested-by: NMax Filippov <jcmvbkbc@gmail.com> Tested-by: NCornelia Huck <cohuck@redhat.com> Acked-by: NCornelia Huck <cohuck@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190405044602.2334-1-kraxel@redhat.com
-
- 11 6月, 2019 1 次提交
-
-
由 David Riley 提交于
After data is copied to the cache entry, atomic_set is used indicate that the data is the entry is valid without appropriate memory barriers. Similarly the read side was missing the corresponding memory barriers. Signed-off-by: NDavid Riley <davidriley@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190610211810.253227-5-davidriley@chromium.orgSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 06 6月, 2019 2 次提交
-
-
由 David Riley 提交于
virtio_gpu_cmd_get_capset would check for the existence of an entry under lock. If it was not found, it would unlock and call virtio_gpu_cmd_get_capset to create a new entry. The new entry would be added it to the list without checking if it was added by another task during the period where the lock was not held resulting in duplicate entries. Compounding this issue, virtio_gpu_cmd_capset_cb would stop iterating after find the first matching entry. Multiple callbacks would modify the first entry, but any subsequent entries and their associated waiters would eventually timeout since they don't become valid, also wasting memory along the way. Signed-off-by: NDavid Riley <davidriley@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190605234423.11348-3-davidriley@chromium.orgSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 David Riley 提交于
If multiple callers occur simultaneously, wake them all up. Signed-off-by: NDavid Riley <davidriley@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190605234423.11348-2-davidriley@chromium.orgSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 06 5月, 2019 1 次提交
-
-
由 Chia-I Wu 提交于
Trace when commands are queued for both ctrlq and cursorq. Trace when responses are received for ctrlq. Signed-off-by: NChia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190429220825.156644-3-olvaffe@gmail.comSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 28 3月, 2019 3 次提交
-
-
由 Gerd Hoffmann 提交于
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: NGerd Hoffmann <kraxel@redhat.com> Acked-by: NNoralf Trønnes <noralf@tronnes.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190318113332.10900-6-kraxel@redhat.com
-
由 Gerd Hoffmann 提交于
Add 3d resource parameters to virtio_gpu_object_params struct. With that in place we can use it for virtio_gpu_cmd_resource_create_3d() calls. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Acked-by: NNoralf Trønnes <noralf@tronnes.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190318113332.10900-5-kraxel@redhat.com
-
由 Gerd Hoffmann 提交于
Add format, width and height fields to the virtio_gpu_object_params struct. With that in place we can use the parameter struct for virtio_gpu_cmd_create_resource() calls too. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Acked-by: NNoralf Trønnes <noralf@tronnes.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190318113332.10900-4-kraxel@redhat.com
-
- 08 1月, 2019 1 次提交
-
-
由 Gerd Hoffmann 提交于
If we got an error response code from the host, print it to the log. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Link: http://patchwork.freedesktop.org/patch/msgid/20181219122708.4586-2-kraxel@redhat.com
-
- 29 11月, 2018 2 次提交
-
-
由 Gerd Hoffmann 提交于
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NRobert Foss <robert.foss@collabora.com> Link: http://patchwork.freedesktop.org/patch/msgid/20181128151021.29565-3-kraxel@redhat.com
-
由 Gerd Hoffmann 提交于
Since commit "9fdd90c0 drm/virtio: add virtio_gpu_alloc_fence()" fences are not allocated any more by virtio_gpu_fence_emit(). So there is no need to pass down a reference to the fence pointer, a plain pointer is enough now. Convert virtio_gpu_fence_emit() and callers. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NRobert Foss <robert.foss@collabora.com> Link: http://patchwork.freedesktop.org/patch/msgid/20181128151021.29565-2-kraxel@redhat.com
-
- 21 11月, 2018 1 次提交
-
-
由 Gerd Hoffmann 提交于
linux guest driver implementation of the VIRTIO_GPU_F_EDID feature. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Acked-by: NDaniel Vetter <daniel@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20181030063206.19528-3-kraxel@redhat.com
-
- 14 11月, 2018 1 次提交
-
-
由 Robert Foss 提交于
Refactor fence creation, add fences to relevant GPU operations and add cursor helper functions. This removes the potential for allocation failures from the cmd_submit and atomic_commit paths. Now a fence will be allocated first and only after that will we proceed with the rest of the execution. Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.com> Signed-off-by: NRobert Foss <robert.foss@collabora.com> Link: http://patchwork.freedesktop.org/patch/msgid/20181112165157.32765-2-robert.foss@collabora.comSuggested-by: NRob Herring <robh@kernel.org> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 30 10月, 2018 4 次提交
-
-
由 Sabyasachi Gupta 提交于
Replaced kmem_cache_alloc + memset with kmem_cache_zalloc Signed-off-by: NSabyasachi Gupta <sabyasachi.linux@gmail.com> Reviewed-by: NJani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/5bc9ff7e.1c69fb81.105c2.1fef@mx.google.comSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
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: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NDave Airlie <airlied@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-7-kraxel@redhat.com
-
由 Gerd Hoffmann 提交于
We pass the obj anyway, so obj->hw_res_handle can be used instead in virtio_gpu_object_attach() and virtio_gpu_cmd_create_resource(). Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NDave Airlie <airlied@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-6-kraxel@redhat.com
-
由 Gerd Hoffmann 提交于
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: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NDave Airlie <airlied@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20181019061847.18958-2-kraxel@redhat.com
-
- 25 9月, 2018 1 次提交
-
-
由 Gerd Hoffmann 提交于
Pass virtio_gpu_object down to virtio_gpu_cmd_transfer_to_host_2d and virtio_gpu_cmd_transfer_to_host_3d functions, instead of passing just the virtio resource handle. This is needed to lookup the scatter list of the object, for dma sync. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NJiandi An <jiandi.an@amd.com> Tested-by: NJiandi An <jiandi.an@amd.com> Link: http://patchwork.freedesktop.org/patch/msgid/20180920062924.6514-1-kraxel@redhat.com
-
- 19 9月, 2018 1 次提交
-
-
由 Jiandi An 提交于
With virtio gpu ttm-pages being dma mapped, dma sync is needed when swiotlb is used as bounce buffers, before TRANSFER_TO_HOST_2D/3D commands are sent. Signed-off-by: NJiandi An <jiandi.an@amd.com> Link: http://patchwork.freedesktop.org/patch/msgid/20180919070931.91168-1-jiandi.an@amd.comSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 05 9月, 2018 2 次提交
-
-
由 Gerd Hoffmann 提交于
Use the dma mapping api and properly add iommu mappings for objects, unless virtio is in iommu quirk mode. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NDave Airlie <airlied@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20180829122026.27012-3-kraxel@redhat.com
-
由 Gerd Hoffmann 提交于
The new function balances virtio_gpu_object_attach(). Also make virtio_gpu_cmd_resource_inval_backing() static and switch call sites to the new virtio_gpu_object_attach() function. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NDave Airlie <airlied@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20180829122026.27012-2-kraxel@redhat.com
-
- 30 8月, 2018 1 次提交
-
-
由 Dan Carpenter 提交于
This doesn't affect runtime because in the current code "idx" is always valid. First, we read from "vgdev->capsets[idx].max_size" before checking whether "idx" is within bounds. And secondly the bounds check is off by one so we could end up reading one element beyond the end of the vgdev->capsets[] array. Fixes: 62fb7a5e ("virtio-gpu: add 3d/virgl support") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Link: http://patchwork.freedesktop.org/patch/msgid/20180704094250.m7sgvvzg3dhcvv3h@kili.mountainSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 26 4月, 2018 1 次提交
-
-
由 Gerd Hoffmann 提交于
Wait until we have enough space in the virt queue to actually queue up our request. Avoids the guest spinning in case we have a non-zero amount of free entries but not enough for the request. Cc: stable@vger.kernel.org Reported-by: NAlain Magloire <amagloire@blackberry.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NDave Airlie <airlied@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20180403095904.11152-1-kraxel@redhat.comSigned-off-by: NSean Paul <seanpaul@chromium.org>
-
- 27 2月, 2018 4 次提交
-
-
由 Rodrigo Siqueira 提交于
This patch fixes the checkpatch.pl check: virtgpu_ioctl.c:535: CHECK: spaces preferred around that '|' (ctx:VxV) virtgpu_vq.c:277: CHECK: spaces preferred around that '+' (ctx:VxV) ... Signed-off-by: NRodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: NGurchetan Singh <gurchetansingh@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/8402b55696b44483ba2e1f6aaeb53bf709ffbfe7.1519343668.git.rodrigosiqueiramelo@gmail.comSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Rodrigo Siqueira 提交于
This patch fixes the checkpatch.pl check: virtgpu_drv.c:116: CHECK: Please don't use multiple blank lines virtgpu_vq.c:599: CHECK: Please don't use multiple blank lines virtgpu_prime.c:42: CHECK: Please don't use multiple blank lines Signed-off-by: NRodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: NGurchetan Singh <gurchetansingh@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/c43a006f2ed93a16fe824b4a2686a2d5e2ef56f5.1519343668.git.rodrigosiqueiramelo@gmail.comSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Rodrigo Siqueira 提交于
This patch fixes the checkpatch.pl warning: virtgpu_ioctl.c:551: WARNING: Block comments use a trailing */ on a separate line ... Signed-off-by: NRodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: NGurchetan Singh <gurchetansingh@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/f0bd4104a7d26bf7561c3a2b4632041c5411f1f2.1519343668.git.rodrigosiqueiramelo@gmail.comSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Rodrigo Siqueira 提交于
This patch fixes the checkpatch.pl warnings: virtgpu_drv.c:57: WARNING: Missing a blank line after declarations virtgpu_display.c:99: WARNING: Missing a blank line after declarations ... Signed-off-by: NRodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: NGurchetan Singh <gurchetansingh@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/41767852ff9dc584c825e32db6222b9a311603b9.1519343668.git.rodrigosiqueiramelo@gmail.comSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 14 3月, 2017 1 次提交
-
-
由 Gerd Hoffmann 提交于
kmem_cache_alloc returns NULL on error, not ERR_PTR. Fixes: f5985bf9Reported-by: NJiri Slaby <jslaby@suse.cz> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1489393346-13874-1-git-send-email-kraxel@redhat.com
-
- 07 3月, 2017 1 次提交
-
-
由 Gerd Hoffmann 提交于
Just use kmem_cache instead of rolling our own, limited implementation. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1488377348-5006-1-git-send-email-kraxel@redhat.com
-
- 15 12月, 2016 2 次提交
-
-
由 Michael S. Tsirkin 提交于
virtio_gpu_queue_ctrl_buffer_locked is called with ctrlq.qlock taken, it releases and acquires this lock. This causes a sparse warning. Add appropriate annotations for sparse context checking. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
When virtio_gpu_free_vbufs exits due to list empty, it does not drop the free_vbufs lock that it took. list empty is not expected to happen anyway, but it can't hurt to fix this and drop the lock. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 15 11月, 2016 1 次提交
-
-
由 Gerd Hoffmann 提交于
virtio-gpu guest driver appearently can run out of buffers. allocate some extra buffers, as quick stopgap for 4.9. analyzing root cause and fixing it properly is TBD. Reported-by: NJiri Slaby <jslaby@suse.cz> Tested-by: NJiri Slaby <jslaby@suse.cz> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 16 10月, 2015 1 次提交
-
-
由 Gerd Hoffmann 提交于
Add the bits needed for opengl rendering support: query capabilities, new virtio commands, drm ioctls. Signed-off-by: NDave Airlie <airlied@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-