Hi list,
I have a simple scenario that there are clients rendering to buffer
objects using the CPU, and the display server compositing the buffers
using OpenGL and doing page flips to present the final contents. It
is like doing the following steps repeatedly
1) process A (the server) allocates
[Answer myself for some of the questions]
On Mon, Mar 28, 2011 at 3:35 PM, Chia-I Wu olva...@gmail.com wrote:
Hi list,
I have a simple scenario that there are clients rendering to buffer
objects using the CPU, and the display server compositing the buffers
using OpenGL and doing page flips
Hi list,
I have a simple scenario that there are clients rendering to buffer
objects using the CPU, and the display server compositing the buffers
using OpenGL and doing page flips to present the final contents. It
is like doing the following steps repeatedly
1) process A (the server) allocates
[Answer myself for some of the questions]
On Mon, Mar 28, 2011 at 3:35 PM, Chia-I Wu wrote:
> Hi list,
>
> I have a simple scenario that there are clients rendering to buffer
> objects using the CPU, and the display server compositing the buffers
> using OpenGL and doing page f
On Tue, Mar 29, 2011 at 12:59 AM, Marek Ol??k wrote:
> On Mon, Mar 28, 2011 at 9:35 AM, Chia-I Wu wrote:
>>
>> Hi list,
>>
>> I have a simple scenario that there are clients rendering to buffer
>> objects using the CPU, and the display server compositing the
It gets the generic states from the adreno core.
This also adds a missing NULL check in msm_gpu_open.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 44 +++
drivers/gpu/drm/msm/msm_debugfs.c | 2 +-
2 files changed, 45 insertions(+), 1
memptrs_bo is used to store msm_rbmemptrs. Size it correctly.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/msm/msm_gpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index 11aac8337066..d23049eb29c4 100644
Ah, thanks. I was on drm-next branch. I will switch to msm-next.
On Thu, Dec 20, 2018 at 11:47 AM Jordan Crouse
wrote:
> On Thu, Dec 20, 2018 at 10:47:02AM -0800, Chia-I Wu wrote:
> > memptrs_bo is used to store msm_rbmemptrs. Size it correctly.
> >
> > Signed-off-by:
On Wed, Apr 17, 2019 at 2:57 AM Gerd Hoffmann wrote:
>
> On Fri, Apr 12, 2019 at 04:34:20PM -0700, Chia-I Wu wrote:
> > Hi,
> >
> > I am still new to virgl, and missed the last round of discussion about
> > resource_create_v2.
> >
> > From the discuss
Hi,
I am still new to virgl, and missed the last round of discussion about
resource_create_v2.
>From the discussion below, semantically resource_create_v2 creates a host
resource object _without_ any storage; memory_create creates a host memory
object which provides the storage. Is that
It was changed to GFP_ATOMIC in commit ec2f0577c (add & use
virtio_gpu_queue_fenced_ctrl_buffer) because the allocation happened
with a spinlock held. That was no longer true after commit
9fdd90c0f (add virtio_gpu_alloc_fence()).
Signed-off-by: Chia-I Wu
Cc: Gerd Hoffmann
Cc: Gustavo Pad
Trace when commands are queued for both ctrlq and cursorq. Trace
when responses are received for ctrlq.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/Makefile | 2 +-
drivers/gpu/drm/virtio/virtgpu_trace.h| 52 +++
drivers/gpu/drm/virtio
off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 1 -
drivers/gpu/drm/virtio/virtgpu_fence.c | 17 ++---
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 491dec071
On Fri, Apr 19, 2019 at 9:21 AM Emil Velikov wrote:
>
> On Fri, 19 Apr 2019 at 16:57, Marc-André Lureau
> wrote:
> >
> > This patch does more harm than good, as it breaks both Xwayland and
> > gnome-shell with X11.
> >
> > Xwayland requires DRI3 & DRI3 requires PRIME.
> >
> > X11 crash for
(Add missing CCs)
On Mon, Apr 29, 2019 at 3:08 PM Chia-I Wu wrote:
>
> This is motivated by having meaningful ftrace events, but it also
> fixes use cases where dma_fence_is_later is called, such as in
> sync_file_merge.
>
> In other drivers, fence creation and cmdbuf s
Suggested-by: Emil Velikov
Reviewed-by: Chia-I Wu
> ---
>
> This patch was suggested in this email thread:
>
> [PATCH] drm/virtio: allocate fences with GFP_KERNEL
> https://www.spinics.net/lists/dri-devel/msg208536.html
>
> drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +-
> dri
On Thu, Jul 4, 2019 at 4:25 AM Gerd Hoffmann wrote:
>
> Hi,
>
> > > if (fence)
> > > virtio_gpu_fence_emit(vgdev, hdr, fence);
> > > + if (vbuf->objs) {
> > > + virtio_gpu_array_add_fence(vbuf->objs, >f);
> > > +
On Thu, Jul 4, 2019 at 4:10 AM Gerd Hoffmann wrote:
>
> Hi,
>
> > > - r = ttm_bo_reserve(>tbo, true, false, NULL);
> > > + r = reservation_object_lock_interruptible(bo->gem_base.resv,
> > > NULL);
> > Can you elaborate a bit about how TTM keeps the BOs alive in, for
> > example,
On Thu, Jul 4, 2019 at 4:48 AM Gerd Hoffmann wrote:
>
> On Wed, Jul 03, 2019 at 01:05:12PM -0700, Chia-I Wu wrote:
> > On Tue, Jul 2, 2019 at 7:19 AM Gerd Hoffmann wrote:
> > >
> > > Switch to the virtio_gpu_array_* helper workflow.
> > (just repeating
On Thu, Jul 4, 2019 at 4:51 AM Gerd Hoffmann wrote:
>
> Hi,
>
> > > convert_to_hw_box(, >box);
> > > if (!vgdev->has_virgl_3d) {
> > > virtio_gpu_cmd_transfer_to_host_2d
> > > - (vgdev, qobj, offset,
> > > + (vgdev,
On Thu, Jul 4, 2019 at 11:46 AM Chia-I Wu wrote:
>
> On Thu, Jul 4, 2019 at 4:25 AM Gerd Hoffmann wrote:
> >
> > Hi,
> >
> > > > if (fence)
> > > > virtio_gpu_fence_emit(vg
virtio_gpu_dequeue_ctrl_func. If virtqueue_notify was called with
the vq lock held, the worker thread would have to busy wait inside
virtio_gpu_dequeue_ctrl_func.
v2: fix scrambled commit message
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 19 +--
1 file changed, 13
virtio_gpu_dequeue_ctrl_func. If virtqueue_notify was called with
the vq lock held, the worker thread would busy wait inside
virtio_gpu_dequeue_ctrl_func.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers
On Tue, Jul 2, 2019 at 7:19 AM Gerd Hoffmann wrote:
>
> Call reservation_object_* directly instead
> of using ttm_bo_{reserve,unreserve}.
>
> v4: check for EINTR only.
> v3: check for EINTR too.
>
> Signed-off-by: Gerd Hoffmann
> Reviewed-by: Daniel Vetter
> ---
>
On Tue, Jul 2, 2019 at 7:19 AM Gerd Hoffmann wrote:
>
> 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.
>
> New workflow:
>
> (1) All gem objects needed by
per.
> v5: some small optimizations (Chia-I Wu).
> v4: make them virtio-private instead of generic helpers.
>
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h | 17 ++
> drivers/gpu/drm/virtio/virtgpu_gem.c | 83
> 2 fi
On Wed, Jul 3, 2019 at 11:31 AM Chia-I Wu wrote:
>
> On Tue, Jul 2, 2019 at 7:19 AM Gerd Hoffmann wrote:
> >
> > Some helper functions to manage an array of gem objects.
> >
> > v6:
> > - add ticket to struct virtio_gpu_object_array.
> > - add v
On Tue, Jul 2, 2019 at 7:19 AM Gerd Hoffmann wrote:
>
> Switch to the virtio_gpu_array_* helper workflow.
(just repeating my question on patch 6)
Does this fix the obj refcount issue? When was the issue introduced?
>
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h
On Tue, Jul 2, 2019 at 7:19 AM Gerd Hoffmann wrote:
>
> Switch to the virtio_gpu_array_* helper workflow.
>
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +-
> drivers/gpu/drm/virtio/virtgpu_ioctl.c | 43 --
>
On Wed, Jun 19, 2019 at 11:07 PM Gerd Hoffmann wrote:
>
> Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl().
> This also makes the ioctl run lockless.
The userspace has a BO cache to avoid freeing BOs immediately but to
reuse them on next allocations. The BO cache checks if a BO
.
On Wed, Jun 19, 2019 at 11:08 PM Gerd Hoffmann wrote:
>
> 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,
On Wed, Jun 19, 2019 at 11:07 PM Gerd Hoffmann wrote:
>
> Use gem reservation helpers and direct reservation_object_* calls
> instead of ttm.
>
> v3: Due to using the gem reservation object it is initialized and ready
> for use before calling ttm_bo_init, so we can also drop the tricky fence
>
On Wed, Jun 19, 2019 at 11:08 PM Gerd Hoffmann wrote:
>
> Some helper functions to manage an array of gem objects.
>
> v4: make them virtio-private instead of generic helpers.
>
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h | 10 ++
>
On Wed, Jun 19, 2019 at 11:08 PM Gerd Hoffmann wrote:
>
> Use gem reservation helpers and direct reservation_object_* calls
> instead of ttm.
>
> v3: Also attach the array of gem objects to the virtio command buffer,
> so we can drop the object references in the completion callback. Needed
>
On Mon, Jul 1, 2019 at 11:04 AM Gurchetan Singh
wrote:
>
>
>
> On Fri, Jun 28, 2019 at 5:14 AM Gerd Hoffmann wrote:
> >
> > Use gem reservation helpers and direct reservation_object_* calls
> > instead of ttm.
> >
> > v5: fix fencing (Chia-I Wu).
>
On Thu, Aug 22, 2019 at 2:47 AM Gerd Hoffmann wrote:
>
> Use drm_atomic_helper_check_plane_state()
> to sanity check the plane state.
>
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_plane.c | 17 -
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
>
On Thu, Aug 22, 2019 at 3:26 AM Gerd Hoffmann wrote:
>
> Also update the comment with a reference to the virglrenderer fix.
>
> Signed-off-by: Gerd Hoffmann
Reviewed-by: Chia-I Wu
> ---
> drivers/gpu/drm/virtio/virtgpu_object.c | 44 ++---
> 1 file c
On Thu, Aug 29, 2019 at 2:24 PM David Riley wrote:
>
> Userspace requested command buffer allocations could be too large
> to make as a contiguous allocation. Use vmalloc if necessary to
> satisfy those allocations.
>
> Signed-off-by: David Riley
> ---
> drivers/gpu/drm/virtio/virtgpu_ioctl.c
On Fri, Aug 30, 2019 at 4:16 AM Gerd Hoffmann wrote:
>
> Hi,
>
> > > > - kfree(vbuf->data_buf);
> > > > + kvfree(vbuf->data_buf);
> > >
> > > if (is_vmalloc_addr(vbuf->data_buf)) ...
> > >
> > > needed here I gues?
> > >
> >
> > kvfree() handles vmalloc/kmalloc/kvmalloc internally by
worker is also the one which will free up slots in the command
> queue.
>
> Reported-by: Chia-I Wu
> Signed-off-by: Gerd Hoffmann
Tested-by: Chia-I Wu
Reviewed-by: Chia-I Wu
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h | 8
> drive
The series is
Reviewed-by: Chia-I Wu
However I ran into a deadlock with one GPU-heavy app. When I exits
Unigine Valley benchmark with ctrl-c, the entire driver locks up
probably 8 out of 10 times on my machine. When that happens,
virtio_gpu_dequeue_ctrl_func does not return and is blocked
On Fri, Aug 23, 2019 at 2:55 AM Gerd Hoffmann wrote:
>
> ttm increasingly gets into the way while hacking on virtio-gpu memory
> management. It also overkill for what virtio-gpu needs. Lets get rid
> of it.
>
> v8:
> - rebase to latest drm-misc-next, adapt to changes.
Other than two (minor)
per.
> v5: some small optimizations (Chia-I Wu).
> v4: make them virtio-private instead of generic helpers.
>
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h | 17 +
> drivers/gpu/drm/virtio/virtgpu_gem.c | 93
> 2 fi
On Fri, Aug 23, 2019 at 2:55 AM Gerd Hoffmann wrote:
>
> Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl().
> This also makes the ioctl run lockless.
>
> v5: handle lookup failure.
> v2: use reservation_object_test_signaled_rcu for VIRTGPU_WAIT_NOWAIT.
>
> Signed-off-by: Gerd
On Mon, Aug 26, 2019 at 10:21 PM Gerd Hoffmann wrote:
>
> On Mon, Aug 26, 2019 at 03:34:56PM -0700, Chia-I Wu wrote:
> > On Thu, Aug 22, 2019 at 2:47 AM Gerd Hoffmann wrote:
> > >
> > > Use drm_atomic_helper_check_plane_state()
> > > to sanity check
k. This avoids triggering a vmexit while holding the lock and
> thereby fixes a rather bad spinlock contention.
>
> Suggested-by: Chia-I Wu
> Signed-off-by: Gerd Hoffmann
Series is
Reviewed-by: Chia-I Wu
> ---
> drivers/gpu/drm/virtio/virtgpu_vq.c | 25 +++--
On Wed, Sep 4, 2019 at 10:23 PM Gerd Hoffmann wrote:
>
> On Wed, Sep 04, 2019 at 04:10:30PM -0700, Chia-I Wu wrote:
> > On Wed, Sep 4, 2019 at 12:48 AM Gerd Hoffmann wrote:
> > >
> > > Only call virtio_gpu_array_add_fence if we actually have a fence.
> > >
On Thu, Sep 12, 2019 at 4:46 AM Gerd Hoffmann wrote:
>
> Signed-off-by: Gerd Hoffmann
Reviewed-by: Chia-I Wu
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c
> b/drivers/gpu/
On Thu, Sep 12, 2019 at 9:00 AM David Riley wrote:
>
> Fix warning introduced with commit e1218b8c0cc1
> ("drm/virtio: Use vmalloc for command buffer allocations.")
> from drm-misc-next.
>
> Signed-off-by: David Riley
Reviewed-by: Chia-I Wu
> ---
> drive
On Wed, Sep 4, 2019 at 12:48 AM Gerd Hoffmann wrote:
>
> Only call virtio_gpu_array_add_fence if we actually have a fence.
>
> Fixes: da758d51968a ("drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing")
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_vq.c | 9 +
On Tue, Jul 2, 2019 at 7:19 AM Gerd Hoffmann wrote:
>
> 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
I tried my best to review this series. I am not really a kernel dev
so please take that with a grain of salt.
On Wed, Jun 19, 2019 at 11:01 PM Gerd Hoffmann wrote:
>
> Hi,
>
> > Also, I strongly recommend you do a very basic igt to exercise this, i.e.
> > allocate some buffers, submit them in
On Fri, Jun 28, 2019 at 5:13 AM Gerd Hoffmann wrote:
>
> Use gem reservation helpers and direct reservation_object_* calls
> instead of ttm.
>
> v5: fix fencing (Chia-I Wu).
> v3: Due to using the gem reservation object it is initialized and ready
> for use before calling t
On Fri, Jun 28, 2019 at 5:13 AM Gerd Hoffmann wrote:
>
> Use gem reservation helpers and direct reservation_object_* calls
> instead of ttm.
>
> v5: fix fencing (Chia-I Wu).
> v3: Also attach the array of gem objects to the virtio command buffer,
> so we can drop
(pressed Send too early)
On Sun, Jun 30, 2019 at 11:20 AM Chia-I Wu wrote:
>
> On Fri, Jun 28, 2019 at 5:13 AM Gerd Hoffmann wrote:
> >
> > Use gem reservation helpers and direct reservation_object_* calls
> > instead of ttm.
> >
> > v5: fix fencing (Chia-
On Fri, Jun 28, 2019 at 3:49 AM Gerd Hoffmann wrote:
>
> > > static inline struct virtio_gpu_object*
> > > virtio_gpu_object_ref(struct virtio_gpu_object *bo)
>
> > The last users of these two helpers are removed with this patch. We
> > can remove them.
>
> patch 12/12 does that.
I meant
On Fri, Jun 28, 2019 at 3:34 AM Gerd Hoffmann wrote:
>
> Hi,
>
> > > --- a/drivers/gpu/drm/virtio/virtgpu_drv.h
> > > +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
> > > @@ -120,9 +120,9 @@ struct virtio_gpu_vbuffer {
> > >
> > > char *resp_buf;
> > > int resp_size;
> > > -
> > >
On Fri, Jun 28, 2019 at 3:05 AM Gerd Hoffmann wrote:
>
> On Wed, Jun 26, 2019 at 04:55:20PM -0700, Chia-I Wu wrote:
> > On Wed, Jun 19, 2019 at 11:07 PM Gerd Hoffmann wrote:
> > >
> > > Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl().
> > >
On Fri, Jul 5, 2019 at 1:53 AM Gerd Hoffmann wrote:
>
> On Thu, Jul 04, 2019 at 12:17:48PM -0700, Chia-I Wu wrote:
> > On Thu, Jul 4, 2019 at 4:10 AM Gerd Hoffmann wrote:
> > >
> > > Hi,
> > >
> > > > > - r = ttm_bo
On Mon, Dec 2, 2019 at 5:36 PM Gurchetan Singh
wrote:
>
> With the misc device, we should end up using the result of
> get_arch_dma_ops(..) or dma-direct ops.
>
> This can allow us to have WC mappings in the guest after
> synchronization.
>
> Signed-off-by: Gurchetan Singh
> ---
>
Hi,
On Mon, Dec 9, 2019 at 2:44 PM Chia-I Wu wrote:
>
> On Mon, Dec 2, 2019 at 5:36 PM Gurchetan Singh
> wrote:
> >
> > With the misc device, we should end up using the result of
> > get_arch_dma_ops(..) or dma-direct ops.
> >
> > This can allow us
On Wed, Dec 11, 2019 at 12:42 AM Gerd Hoffmann wrote:
>
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_plane.c | 31 ++
> 1 file changed, 17 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c
>
On Wed, Dec 11, 2019 at 12:42 AM Gerd Hoffmann wrote:
>
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_plane.c | 41 +++---
> 1 file changed, 24 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c
>
On Thu, Dec 12, 2019 at 4:53 AM Gerd Hoffmann wrote:
>
> v2: fix src rect handling (Chia-I Wu).
>
> Gerd Hoffmann (3):
> drm/virtio: skip set_scanout if framebuffer didn't change
> virtio-gpu: batch display update commands.
> virtio-gpu: use damage info for di
n,
> .unpin = drm_gem_shmem_unpin,
> .get_sg_table = drm_gem_shmem_get_sg_table,
> - .vmap = udl_gem_object_vmap,
> + .vmap = drm_gem_shmem_vmap,
> .vunmap = drm_gem_shmem_vunmap,
> - .mmap = udl_gem_object_mmap,
> + .mmap = drm_gem_shm
On Tue, Feb 11, 2020 at 3:56 PM Gurchetan Singh
wrote:
>
> We currently do it when open the DRM fd, let's delay it. First step,
> remove the hyercall from initialization.
>
> Signed-off-by: Gurchetan Singh
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h | 2 ++
>
On Tue, Feb 11, 2020 at 3:56 PM Gurchetan Singh
wrote:
>
> We only want create a new virglrenderer context after the first
> 3D ioctl.
>
> Signed-off-by: Gurchetan Singh
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h | 1 +
> drivers/gpu/drm/virtio/virtgpu_ioctl.c | 5 +
>
The fixes look reasonable.
Reviewed-by: Chia-I Wu
On Tue, Feb 11, 2020 at 5:50 AM Gerd Hoffmann wrote:
>
>
>
> Gerd Hoffmann (2):
> drm/virtio: fix virtio_gpu_execbuffer_ioctl locking
> drm/virtio: fix virtio_gpu_cursor_plane_update().
>
> drivers/gpu/drm/vir
On Wed, Feb 12, 2020 at 3:13 AM Gerd Hoffmann wrote:
>
> Drop the virtio_gpu_{disable,enable}_notify(). Add a new
> virtio_gpu_notify() call instead, which must be called whenever
> the driver wants make sure the host is notified needed.
>
> Drop notification from command submission. Add
Series is
Reviewed-by: Chia-I Wu
After the series, virtio_gpu_cmd_* may or may not call
virtio_gpu_notify. It is error-prone and should be fixed, such that
virtio_gpu_cmd_* never notifies, or such that different naming
conventions are used for functions that notify and for those don't
Better reflect the structure of the code and metion why we could not
always honor the guest.
Signed-off-by: Chia-I Wu
Cc: Gurchetan Singh
Cc: Gerd Hoffmann
---
arch/x86/kvm/vmx/vmx.c | 27 +--
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kvm
When the flag is set, it means the the userspace wants to do DMA
with the memory and the guest will use an appropriate memory type to
access the memory. The kernel should be prepared to honor the
guest's memory type.
Signed-off-by: Chia-I Wu
Cc: Gurchetan Singh
Cc: Gerd Hoffmann
Hi,
Host GPU drivers like to give userspace WC mapping. When the userspace makes
the mapping available to a guest, it also tells the guest to create a WC
mapping. However, even when the guest kernel picks the correct memory type,
it gets ignored because of VMX_EPT_IPAT_BIT on Intel.
This
When a memslot has KVM_MEM_DMA set, we want VMX_EPT_IPAT_BIT cleared
for the memslot. Before that is possible, simply call
kvm_arch_register_noncoherent_dma for the memslot.
SVM does not have the ignore-pat bit. Guest PAT is always honored.
Signed-off-by: Chia-I Wu
Cc: Gurchetan Singh
Cc
On Mon, Feb 24, 2020 at 5:24 AM Emil Velikov wrote:
>
> On Mon, 24 Feb 2020 at 11:06, Gerd Hoffmann wrote:
> >
> > On Fri, Feb 21, 2020 at 04:54:02PM -0800, Gurchetan Singh wrote:
> > > On Fri, Feb 21, 2020 at 3:06 PM Chia-I Wu wrote:
> > > >
> >
On Wed, Oct 2, 2019 at 5:18 PM Gurchetan Singh
wrote:
>
> On Wed, Oct 2, 2019 at 1:49 AM Gerd Hoffmann wrote:
> >
> > On Tue, Oct 01, 2019 at 06:49:35PM -0700, Gurchetan Singh wrote:
> > > This doesn't really break userspace, since it always passes down
> > > 0 for stride/layer_stride currently.
On Wed, Feb 26, 2020 at 10:25 AM Thomas Hellström (VMware)
wrote:
>
> Hi, Gerd,
>
> While looking at this patchset I came across some stuff that seems
> strange but that was merged in a previous patchset.
>
> (please refer to
>
On Wed, Feb 5, 2020 at 3:00 AM Gerd Hoffmann wrote:
>
> Add new virtio_gpu_cleanup_object() helper function for object cleanup.
> Wire up callback function for resource unref, do cleanup from callback
> when we know the host stopped using the resource.
>
> Signed-off-by: Gerd Hoffmann
> ---
>
On Wed, Feb 5, 2020 at 3:00 AM Gerd Hoffmann wrote:
>
> Introduce new virtio_gpu_object_shmem_init() helper function which will
> create the virtio_gpu_mem_entry array, containing the backing storage
> information for the host. For the most path this just moves code from
>
This series consists of fixes and cleanups for
virtio_gpu_queue_fenced_ctrl_buffer, except for the last patch. The fixes are
for corner cases that were overlooked. The cleanups make the last patch
easier, but they should be good in themselves as well.
The last patch changes the disable_notify
sgs setup does not need to be in the critical section.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 66 +++--
1 file changed, 35 insertions(+), 31 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
Make sure elemcnt does not exceed the maximum element count in
virtio_gpu_queue_ctrl_sgs. We should improve our error handling or
impose a size limit on execbuffer, which are TODOs.
Signed-off-by: Chia-I Wu
Cc: David Riley
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 1 +
drivers/gpu/drm
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 70 ++---
1 file changed, 35 insertions(+), 35 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 6ccb2a54dfb3c..299470aac281a 100644
--- a/drivers
It becomes clear that virtio_gpu_queue_fenced_ctrl_buffer should be
responsible for setting up sgs and virtio_gpu_queue_ctrl_sgs should
be responsible for queuing sgs.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 22 ++
1 file changed, 10 insertions
Call virtqueue_kick_prepare once in virtio_gpu_enable_notify, not
whenever a command is added. This should be more efficient since
the intention is to batch commands.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 1 -
drivers/gpu/drm/virtio/virtgpu_vq.c | 28
It is a helper to return the virtio_gpu_ctrl_hdr in a vbuf.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 20 +++-
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
index
We don't propagate erros to the callers. We have to unlock object
arrays on errors.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio
the incorrect and unnecessary error
path.
This also adds a WARN_ON(ret) until we properly handle errors.
Signed-off-by: Chia-I Wu
Cc: David Riley
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/virtio
We can get it from vbuf.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 312fd8a039a1e..5815c7d50dc20
When vqs_ready is false, vq should be considered invalid and we
should not check vq->num_free. After this change, a fenced command
queued before the vqs are ready will have fence id 0 and will be
considered done.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c |
outcnt may be greater than 1 since commit e1218b8c0cc1 (drm/virtio:
Use vmalloc for command buffer allocations.).
Signed-off-by: Chia-I Wu
Cc: David Riley
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio
On Wed, Feb 5, 2020 at 2:26 AM Gerd Hoffmann wrote:
>
> Avoid flooding the log in case we screw up badly.
>
> Signed-off-by: Gerd Hoffmann
Reviewed-by: Chia-I Wu
> ---
> drivers/gpu/drm/virtio/virtgpu_vq.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
bar -> add bar to ctrlq and commit is
caller-controlled
virtio_gpu_{disable,enable}_notify is also replaced by
virtio_gpu_commit_ctrl.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_display.c | 9 ++-
drivers/gpu/drm/virtio/virtgpu_drv.h
This series replaces the global disable_notify state by command-level bools to
control vq kicks. When command batching is applied to more places, this
prevents one process from affecting another process.
___
dri-devel mailing list
Call virtqueue_kick_prepare once in virtio_gpu_enable_notify, not
whenever a command is added. This should be more efficient since
the intention is to batch commands.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 1 -
drivers/gpu/drm/virtio/virtgpu_vq.c | 28
On Thu, Feb 6, 2020 at 12:55 AM Gerd Hoffmann wrote:
>
> Hi,
>
> > > virtio_gpu_cmd_resource_attach_backing(vgdev, obj->hw_res_handle,
> > > - ents, nents,
> > > + obj->ents, obj->nents,
> > >
On Thu, Feb 6, 2020 at 1:49 AM Gerd Hoffmann wrote:
>
> On Wed, Feb 05, 2020 at 10:19:53AM -0800, Chia-I Wu wrote:
> > Make sure elemcnt does not exceed the maximum element count in
> > virtio_gpu_queue_ctrl_sgs. We should improve our error handling or
> > impose a
num_free < elemcnt) {
> + indirect = virtio_has_feature(vgdev->vdev,
> VIRTIO_RING_F_INDIRECT_DESC);
> + vqcnt = indirect ? 1 : elemcnt;
Is the feature dynamic and require the lock held? If not, the result
can be cached and the fixup can happen before grabbing the lo
On Wed, Feb 5, 2020 at 10:43 PM Gerd Hoffmann wrote:
>
> > > -
> > > - drm_gem_shmem_free_object(obj);
> > > + if (bo->created) {
> > > + virtio_gpu_cmd_unref_resource(vgdev, bo);
> > > + /* completion handler calls virtio_gpu_cleanup_object() */
> >
bool has_virgl_3d;
> bool has_edid;
> + bool has_indirect;
has_indirect_desc? Either way,
Reviewed-by: Chia-I Wu
>
> struct work_struct config_changed_work;
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_debugfs.c
> b/drivers/gpu/drm/virtio/virtgp
1 - 100 of 210 matches
Mail list logo