[PATCH v6 02/10] Revert "drm/qxl: do not run release if qxl failed to init"

2021-02-04 Thread Gerd Hoffmann
This reverts commit b91907a6241193465ca92e357adf16822242296d. Patch is broken, it effectively makes qxl_drm_release() a nop because on normal driver shutdown qxl_drm_release() is called *after* drm_dev_unregister(). Cc: Tong Zhang Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.c

Re: [PATCH V2] virtio_input: Prevent EV_MSC/MSC_TIMESTAMP loop storm for MT.

2021-02-03 Thread Gerd Hoffmann
ach new frame becomes larger and larger. > + * Disable EV_MSC/MSC_TIMESTAMP forwarding for MT. > + */ > + if (vi->idev->mt && type == EV_MSC && code == MSC_TIMESTAMP) > + return 0; > + Reviewed-by: Gerd Hoffmann take care, Gerd

Re: [PATCH RESEND v3] virtio-input: add multi-touch support

2021-02-03 Thread Gerd Hoffmann
1 file changed, 10 insertions(+), 1 deletion(-) Have no test hardware, the logic looks sane though. Reviewed-by: Gerd Hoffmann take care, Gerd ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

[PATCH v5 1/6] drm/qxl: use drmm_mode_config_init

2021-02-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 012bce0cdb65

[PATCH v5 6/6] drm/qxl: simplify qxl_fence_wait

2021-02-03 Thread Gerd Hoffmann
Now that we have the new release_event wait queue we can just use that in qxl_fence_wait() and simplify the code alot. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_release.c | 42 +++ 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/drivers

[PATCH v5 5/6] drm/qxl: properly free qxl releases

2021-02-03 Thread Gerd Hoffmann
Reorganize qxl_device_fini() a bit. Add missing unpin() calls. Count releases. Add wait queue for releases. That way qxl_device_fini() can easily wait until everything is ready for proper shutdown. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 2 ++ drivers/gpu/drm

[PATCH v5 2/6] drm/qxl: unpin release objects

2021-02-03 Thread Gerd Hoffmann
Balances the qxl_create_bo(..., pinned=true, ...); call in qxl_release_bo_alloc(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_release.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c index c52412724c26

[PATCH v5 3/6] drm/qxl: release shadow on shutdown

2021-02-03 Thread Gerd Hoffmann
In case we have a shadow surface on shutdown release it so it doesn't leak. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 38d6b596094d

[PATCH v5 4/6] drm/qxl: handle shadow in primary destroy

2021-02-03 Thread Gerd Hoffmann
qxl_primary_atomic_disable must check whenever the framebuffer bo has a shadow surface and in case it has check the shadow primary status. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c

Re: [PATCH v4 5/5] drm/qxl: properly free qxl releases

2021-02-03 Thread Gerd Hoffmann
> > + /* > > +* Ask host to release resources (+fill release ring), > > +* then wait for the release actually happening. > > +*/ > > + qxl_io_notify_oom(qdev); > > + for (try = 0; try < 20 && atomic_read(>release_count) > 0; try++) > > + msleep(20); > > A bit icky, why

[PATCH v4 1/5] drm/qxl: use drmm_mode_config_init

2021-01-26 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 012bce0cdb65

[PATCH v4 2/5] drm/qxl: unpin release objects

2021-01-26 Thread Gerd Hoffmann
Balances the qxl_create_bo(..., pinned=true, ...); call in qxl_release_bo_alloc(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_release.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c index c52412724c26

[PATCH v4 5/5] drm/qxl: properly free qxl releases

2021-01-26 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 1 + drivers/gpu/drm/qxl/qxl_kms.c | 22 -- drivers/gpu/drm/qxl/qxl_release.c | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl

[PATCH v4 3/5] drm/qxl: release shadow on shutdown

2021-01-26 Thread Gerd Hoffmann
In case we have a shadow surface on shutdown release it so it doesn't leak. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 38d6b596094d

[PATCH v4 4/5] drm/qxl: handle shadow in primary destroy

2021-01-26 Thread Gerd Hoffmann
qxl_primary_atomic_disable must check whenever the framebuffer bo has a shadow surface and in case it has check the shadow primary status. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c

Re: [PATCH v3 2/4] drm/qxl: unpin release objects

2021-01-25 Thread Gerd Hoffmann
t; to 0 kinda defeats the warning. Figured the unpin is at the completely wrong place while trying to reproduce the lockdep splat ... take care, Gerd >From 43befab4a935114e8620af62781666fa81288255 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 25 Jan 2021 13:10:50 +0100 Subject: [PATCH

Re: [PATCH v3 2/4] drm/qxl: unpin release objects

2021-01-22 Thread Gerd Hoffmann
On Fri, Jan 22, 2021 at 09:13:42AM +0100, Thomas Zimmermann wrote: > Hi > > Am 20.01.21 um 12:12 schrieb Gerd Hoffmann: > > Balances the qxl_create_bo(..., pinned=true, ...); > > call in qxl_release_bo_alloc(). > > > > Signed-off-by: Gerd Hoffmann > > ---

Re: [PATCH v2] drm/virtio: Track total GPU memory for virtio driver

2021-01-21 Thread Gerd Hoffmann
On Wed, Jan 20, 2021 at 10:52:11AM -0800, Yiwei Zhang wrote: > On Wed, Jan 20, 2021 at 5:33 AM Gerd Hoffmann wrote: > > > > Hi, > > > > > > > > > + select TRACE_GPU_MEM > > > > > > > > > +#ifdef CONFIG_TRACE_GPU_MEM >

Re: [PATCH v2] drm/virtio: Track total GPU memory for virtio driver

2021-01-20 Thread Gerd Hoffmann
Hi, > > > > > + select TRACE_GPU_MEM > > > > > +#ifdef CONFIG_TRACE_GPU_MEM That doesn't make sense btw. > > > > > +#ifdef CONFIG_TRACE_GPU_MEM > > > > > +static inline void virtio_gpu_trace_total_mem(struct > > > > > virtio_gpu_device *vgdev, > > > > > +

[PATCH v3 4/4] drm/qxl: handle shadow in primary destroy

2021-01-20 Thread Gerd Hoffmann
qxl_primary_atomic_disable must check whenever the framebuffer bo has a shadow surface and in case it has check the shadow primary status. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c

[PATCH v3 2/4] drm/qxl: unpin release objects

2021-01-20 Thread Gerd Hoffmann
Balances the qxl_create_bo(..., pinned=true, ...); call in qxl_release_bo_alloc(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_release.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c index 0fcfc952d5e9

[PATCH v3 1/4] drm/qxl: use drmm_mode_config_init

2021-01-20 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/qxl/qxl_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 012bce0cdb65..38d6b596094d 100644 --- a/drivers/gpu

[PATCH v3 3/4] drm/qxl: release shadow on shutdown

2021-01-20 Thread Gerd Hoffmann
In case we have a shadow surface on shutdown release it so it doesn't leak. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 38d6b596094d

Re: [PATCH] drivers: gpu: drm: virtio: fix dependency of DRM_VIRTIO_GPU on VIRTIO

2020-12-22 Thread Gerd Hoffmann
On Fri, Dec 04, 2020 at 02:12:21PM +0100, Enrico Weigelt, metux IT consult wrote: > VIRTIO itself has no dependencies and therefore can easily be just > select'ed, instead of depending on it. The current depends on causes > any others trying to select VIRTIO to fail like this: > >

Re: [PATCH v2 18/20] drm/virtgpu: Remove references to struct drm_device.pdev

2020-12-02 Thread Gerd Hoffmann
On Tue, Dec 01, 2020 at 11:35:40AM +0100, Thomas Zimmermann wrote: > Using struct drm_device.pdev is deprecated. Convert virtgpu to struct > drm_device.dev. No functional changes. > > Signed-off-by: Thomas Zimmermann > Acked-by: Sam Ravnborg > Cc: Gerd Hoffmann Acked

Re: [PATCH v2 14/20] drm/qxl: Remove references to struct drm_device.pdev

2020-12-02 Thread Gerd Hoffmann
On Tue, Dec 01, 2020 at 11:35:36AM +0100, Thomas Zimmermann wrote: > Using struct drm_device.pdev is deprecated. Convert qxl to struct > drm_device.dev. No functional changes. > > Signed-off-by: Thomas Zimmermann > Acked-by: Sam Ravnborg > Cc: Gerd Hoffmann Acked

Re: [PATCH v2 05/20] drm/cirrus: Remove references to struct drm_device.pdev

2020-12-02 Thread Gerd Hoffmann
On Tue, Dec 01, 2020 at 11:35:27AM +0100, Thomas Zimmermann wrote: > Using struct drm_device.pdev is deprecated. Convert cirrus to struct > drm_device.dev. No functional changes. > > Signed-off-by: Thomas Zimmermann > Acked-by: Sam Ravnborg > Cc: Gerd Hoffmann Acked

Re: [PATCH v2 04/20] drm/bochs: Remove references to struct drm_device.pdev

2020-12-02 Thread Gerd Hoffmann
On Tue, Dec 01, 2020 at 11:35:26AM +0100, Thomas Zimmermann wrote: > Using struct drm_device.pdev is deprecated. Convert bochs to struct > drm_device.dev. No functional changes. > > Signed-off-by: Thomas Zimmermann > Acked-by: Sam Ravnborg > Cc: Gerd Hoffmann Acked

Re: [PATCH -next] drm/virtio: Make virtgpu_dmabuf_ops with static keyword

2020-11-15 Thread Gerd Hoffmann
On Sat, Nov 14, 2020 at 03:16:13PM +0800, Zou Wei wrote: > Fix the following sparse warning: > > ./virtgpu_prime.c:46:33: warning: symbol 'virtgpu_dmabuf_ops' was not > declared. Should it be static? Pushed to drm-misc-next. thanks, Gerd ___

Re: [PATCH] drm/virtio: Fix a double free in virtio_gpu_cmd_map()

2020-11-06 Thread Gerd Hoffmann
On Fri, Oct 30, 2020 at 02:48:08PM +0300, Dan Carpenter wrote: > This is freed both here and in the caller (virtio_gpu_vram_map()) so > it's a double free. The correct place is only in the caller. > > Fixes: 16845c5d5409 ("drm/virtio: implement blob resources: implement vram > object") >

Re: [PATCH] drm/qxl: replace idr_init() by idr_init_base()

2020-11-06 Thread Gerd Hoffmann
On Fri, Nov 06, 2020 at 12:20:16AM +0530, Deepak R Varma wrote: > idr_init() uses base 0 which is an invalid identifier for this driver. > The idr_alloc for this driver uses 1 as start value for ID range. The > new function idr_init_base allows IDR to set the ID lookup from base 1. > This avoids

Re: [PATCH] drm/virtio: use kvmalloc for large allocations

2020-11-05 Thread Gerd Hoffmann
On Thu, Nov 05, 2020 at 04:00:54PM +0900, Sergey Senozhatsky wrote: > Hi, > > On (20/11/05 07:52), Gerd Hoffmann wrote: > > > - *ents = kmalloc_array(*nents, sizeof(struct virtio_gpu_mem_entry), > > > - GFP_KERNEL); > >

Re: [PATCH] drm/virtio: use kvmalloc for large allocations

2020-11-04 Thread Gerd Hoffmann
Hi, > - *ents = kmalloc_array(*nents, sizeof(struct virtio_gpu_mem_entry), > - GFP_KERNEL); > + *ents = kvmalloc_array(*nents, > +sizeof(struct virtio_gpu_mem_entry), > +GFP_KERNEL); Shouldn't that be

Re: [PATCH 3/3] drm/qxl: Remove fbcon acceleration leftovers

2020-10-29 Thread Gerd Hoffmann
On Thu, Oct 29, 2020 at 11:14:28AM +0100, Daniel Vetter wrote: > These are leftovers from 13aff184ed9f ("drm/qxl: remove dead qxl fbdev > emulation code"). Acked-by: Gerd Hoffmann ___ Virtualization mailing list Virtualiza

Re: [PATCH v2] drm/virtio: Use UUID API for importing the UUID

2020-10-14 Thread Gerd Hoffmann
On Tue, Oct 13, 2020 at 04:27:14PM +0300, Andy Shevchenko wrote: > There is import_uuid() function which imports u8 array to the uuid_t. > Use it instead of open coding variant. > > This allows to hide the uuid_t internals. > > Reviewed-by: David Stevens > Signed-off-by: Andy Shevchenko

Re: [PATCH v1] drm/virtio: Use UUID API for importing the UUID

2020-10-13 Thread Gerd Hoffmann
On Mon, Oct 12, 2020 at 08:18:26PM +0300, Andy Shevchenko wrote: > There is import_uuid() function which imports u8 array to the uuid_t. > Use it instead of open coding variant. > > This allows to hide the uuid_t internals. Doesn't apply to drm-misc-next, please rebase. thanks, Gerd

[PATCH v2 2/4] drm/qxl: release shadow on shutdown

2020-09-29 Thread Gerd Hoffmann
In case we have a shadow surface on shutdown release it so it doesn't leak. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 5bef8f121e54

[PATCH v2 4/4] drm/qxl: use qxl pin function

2020-09-29 Thread Gerd Hoffmann
Otherwise ttm throws a WARN because we try to pin without a reservation. Fixes: 9d36d4320462 ("drm/qxl: switch over to the new pin interface") Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[PATCH v2 1/4] drm/qxl: use drmm_mode_config_init

2020-09-29 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/qxl/qxl_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 65de1f69af58..5bef8f121e54 100644 --- a/drivers/gpu

[PATCH v2 3/4] drm/qxl: handle shadow in primary destroy

2020-09-29 Thread Gerd Hoffmann
qxl_primary_atomic_disable must check whenever the framebuffer bo has a shadow surface and in case it has check the shadow primary status. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c

Re: [PATCH -next] drm/qxl: simplify the return expression of qxl_plane_prepare_fb()

2020-09-29 Thread Gerd Hoffmann
On Mon, Sep 21, 2020 at 09:10:22PM +0800, Qinglang Miao wrote: > Simplify the return expression. Pushed to drm-misc-next. thanks, Gerd ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [virtio-dev] Re: [PATCH v3 0/6] Add virtio-iommu built-in topology

2020-09-25 Thread Gerd Hoffmann
Hi, > Many power platforms are OF based, thus without ACPI or DT support. pseries has lots of stuff below /proc/device-tree. Dunno whenever that is the same kind of device tree we have on arm ... take care, Gerd ___ Virtualization mailing list

Re: [PATCH v3 0/6] Add virtio-iommu built-in topology

2020-09-24 Thread Gerd Hoffmann
On Thu, Sep 24, 2020 at 12:02:55PM +0200, Joerg Roedel wrote: > On Thu, Sep 24, 2020 at 05:38:13AM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 24, 2020 at 11:21:29AM +0200, Joerg Roedel wrote: > > > On Thu, Sep 24, 2020 at 05:00:35AM -0400, Michael S. Tsirkin wrote: > > > > OK so this looks

Re: [PATCH] drm/virtio: drop quirks handling

2020-09-08 Thread Gerd Hoffmann
On Tue, Sep 08, 2020 at 10:57:21AM +0200, Daniel Vetter wrote: > On Tue, Sep 08, 2020 at 08:47:41AM +0200, Gerd Hoffmann wrote: > > These days dma ops can be overridden per device, and the virtio core > > "can be overridden" or "are"? Didn't happen yet, so scra

[PATCH 2/3] drm/qxl: release shadow on shutdown

2020-09-08 Thread Gerd Hoffmann
In case we have a shadow surface on shutdown release it so it doesn't leak. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 4be04eaf7f37

[PATCH 1/3] drm/qxl: use drmm_mode_config_init

2020-09-08 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index fa79688013b7..4be04eaf7f37 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b

[PATCH 3/3] drm/qxl: handle shadow in primary destroy

2020-09-08 Thread Gerd Hoffmann
qxl_primary_atomic_disable must check whenever the framebuffer bo has a shadow surface and in case it has check the shadow primary status. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c

[PATCH 1/3] drm/virtio: use drmm_mode_config_init

2020-09-08 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +- drivers/gpu/drm/virtio/virtgpu_display.c | 11 +++ drivers/gpu/drm/virtio/virtgpu_kms.c | 6 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h

[PATCH 2/3] drm/virtio: return virtio_gpu_queue errors

2020-09-08 Thread Gerd Hoffmann
In case queuing virtio commands fails (can happen when the device got unplugged) pass up the error. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_vq.c | 36 +++-- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/virtio

[PATCH 3/3] drm/virtio: add virtio_gpu_cmd_unref_resource error handling

2020-09-08 Thread Gerd Hoffmann
shutdown. Signed-off-by: Gerd Hoffmann --- 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/virtgpu_vq.c index b1884e6e242c..4d2325bf4aed 100644 --- a/drivers/gpu/drm/virtio

[PATCH] drm/virtio: drop quirks handling

2020-09-08 Thread Gerd Hoffmann
. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_object.c | 19 ++- drivers/gpu/drm/virtio/virtgpu_vq.c | 16 ++-- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio

[PATCH v3 2/2] drm/virtio: set max_segment

2020-09-07 Thread Gerd Hoffmann
When initializing call virtio_max_dma_size() to figure the scatter list limit. Needed to make virtio-gpu work properly with SEV. v2: place max_segment in drm driver not gem object. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_kms.c | 1 + 1 file changed, 1 insertion

Re: [PATCH 1/2] drm/virtio: fix unblank

2020-08-28 Thread Gerd Hoffmann
On Mon, Aug 24, 2020 at 09:24:40AM +0200, Jiri Slaby wrote: > On 18. 08. 20, 9:25, Gerd Hoffmann wrote: > > When going through a disable/enable cycle without changing the > > framebuffer the optimization added by commit 3954ff10e06e ("drm/virtio: > > skip set_scanout if

Re: [PATCH 2/2] drm/virtio: Remove open-coded commit-tail function

2020-08-21 Thread Gerd Hoffmann
On Thu, Aug 20, 2020 at 08:32:51AM +0200, Jiri Slaby wrote: > On 19. 08. 20, 15:24, Gerd Hoffmann wrote: > > On Wed, Aug 19, 2020 at 02:43:28PM +0200, Jiri Slaby wrote: > >> On 09. 07. 20, 14:33, Daniel Vetter wrote: > >>> Exactly matches the one in the helpers.

Re: [PATCH 2/2] drm/virtio: Remove open-coded commit-tail function

2020-08-19 Thread Gerd Hoffmann
On Wed, Aug 19, 2020 at 02:43:28PM +0200, Jiri Slaby wrote: > On 09. 07. 20, 14:33, Daniel Vetter wrote: > > Exactly matches the one in the helpers. > > It's not that exact. The order of modeset_enables and planes is > different. And this causes a regression -- no fb in qemu. Does

Re: [PATCH v3 30/38] virtio_input: convert to LE accessors

2020-08-18 Thread Gerd Hoffmann
On Wed, Aug 05, 2020 at 09:44:36AM -0400, Michael S. Tsirkin wrote: > Virtio input is modern-only. Use LE accessors for config space. > > Signed-off-by: Michael S. Tsirkin Reviewed-by: Gerd Hoffmann ___ Virtualization mailing list Virtu

[PATCH v2 2/2] drm/virtio: set max_segment

2020-08-18 Thread Gerd Hoffmann
When initializing call virtio_max_dma_size() to figure the scatter list limit. Needed to make virtio-gpu work properly with SEV. v2: place max_segment in drm driver not gem object. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_kms.c | 1 + 1 file changed, 1 insertion

[PATCH 2/2] drm/virtio: set max_segment

2020-08-18 Thread Gerd Hoffmann
When initializing gem objects call virtio_max_dma_size() to figure the scatter list limit. Needed to make virtio-gpu work properly with SEV. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio

[PATCH 2/2] drm/virtio: drop virtio_gpu_output->enabled

2020-08-18 Thread Gerd Hoffmann
Not needed, already tracked by drm_crtc_state->active. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 - drivers/gpu/drm/virtio/virtgpu_display.c | 4 drivers/gpu/drm/virtio/virtgpu_plane.c | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --

[PATCH 1/2] drm/virtio: fix unblank

2020-08-18 Thread Gerd Hoffmann
ds_modeset() (Daniel). Cc: 1882...@bugs.launchpad.net Fixes: 3954ff10e06e ("drm/virtio: skip set_scanout if framebuffer didn't change") Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/virtio/virtgpu_display.c | 11 +++ dr

Re: [PATCH v6 0/3] Support virtio cross-device resources

2020-08-18 Thread Gerd Hoffmann
On Tue, Aug 18, 2020 at 10:37:41AM +0900, David Stevens wrote: > This patchset implements the current proposal for virtio cross-device > resource sharing [1]. It will be used to import virtio resources into > the virtio-video driver currently under discussion [2]. The patch > under consideration

Re: [PATCH] drm/qxl: Fix build errors

2020-08-17 Thread Gerd Hoffmann
Hi, > I guess things are never quite so easy :-). It looks like Daniel's > patch is in drm-misc-fixes and Sidong's patch is in drm-misc-next. On > their own they're fine, but once they are merged in drm-tip the build > error shows up. Ah, ok. I've already wondered how that got past my build

Re: [virtio-dev] Re: [PATCH v5 0/3] Support virtio cross-device resources

2020-08-17 Thread Gerd Hoffmann
On Mon, Aug 17, 2020 at 12:50:08PM +0200, Gerd Hoffmann wrote: > On Tue, Jun 23, 2020 at 10:31:28AM +0900, David Stevens wrote: > > Unless there are any remaining objections to these patches, what are > > the next steps towards getting these merged? Sorry, I'm not familiar > &

Re: [PATCH] drm/qxl: Replace deprecated function in qxl_display

2020-08-17 Thread Gerd Hoffmann
On Sun, May 24, 2020 at 11:26:23AM +0900, Sidong Yang wrote: > Hi, Dave. > > This is resended e-mail for your advice. > > I'm a newbie interested in linux kernel and qxl module. > Please check this patch and give me advice for me. > Also I'll be glad if there is any task that you bothered. >

Re: [virtio-dev] Re: [PATCH v5 0/3] Support virtio cross-device resources

2020-08-17 Thread Gerd Hoffmann
On Tue, Jun 23, 2020 at 10:31:28AM +0900, David Stevens wrote: > Unless there are any remaining objections to these patches, what are > the next steps towards getting these merged? Sorry, I'm not familiar > with the workflow for contributing patches to Linux. Sorry, just have been busy and not

Re: [PATCH][next] drm/virtio: Use struct_size() helper in kmalloc()

2020-08-17 Thread Gerd Hoffmann
On Wed, Jun 17, 2020 at 04:57:07PM -0500, Gustavo A. R. Silva wrote: > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes. > > This code was detected with the help of Coccinelle and, audited and > fixed manually. > >

Re: [PATCH] drm/virtio: fix unblank

2020-08-17 Thread Gerd Hoffmann
On Mon, Aug 17, 2020 at 11:03:42AM +0200, Gerd Hoffmann wrote: > Hi, > > > > --- a/drivers/gpu/drm/virtio/virtgpu_display.c > > > +++ b/drivers/gpu/drm/virtio/virtgpu_display.c > > > @@ -100,6 +100,7 @@ static void virtio_gpu_crtc_atomic_enable(struct >

Re: [PATCH] drm/virtgpu: remove redundant assignments to width and height

2020-08-17 Thread Gerd Hoffmann
On Wed, Jul 01, 2020 at 02:41:54PM +0100, Colin King wrote: > From: Colin Ian King > > Variables width and height are being assigned values that are never > read. The assignments are redundant and can be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King Pused

Re: [PATCH] drm/virtio: fix unblank

2020-08-17 Thread Gerd Hoffmann
Hi, > > --- a/drivers/gpu/drm/virtio/virtgpu_display.c > > +++ b/drivers/gpu/drm/virtio/virtgpu_display.c > > @@ -100,6 +100,7 @@ static void virtio_gpu_crtc_atomic_enable(struct > > drm_crtc *crtc, > > struct virtio_gpu_output *output = drm_crtc_to_virtio_gpu_output(crtc); > > > >

Re: [PATCH] drm/virtio: fix memory leak in virtio_gpu_cleanup_object()

2020-08-07 Thread Gerd Hoffmann
On Wed, Jul 22, 2020 at 01:18:51PM +0800, Xin He wrote: > Before setting shmem->pages to NULL, kfree() should > be called. > sg_free_table(shmem->pages); > + kfree(shmem->pages); > shmem->pages = NULL; Pushed to drm-misc-fixes.

Re: [PATCH v3] drm/virtio: fix missing dma_fence_put() in virtio_gpu_execbuffer_ioctl()

2020-08-07 Thread Gerd Hoffmann
On Tue, Jul 21, 2020 at 06:16:47PM +0800, Xin He wrote: > From: Qi Liu > > We should put the reference count of the fence after calling > virtio_gpu_cmd_submit(). So add the missing dma_fence_put(). > virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, >

Re: [PATCH v3 10/38] virtio_gpu: correct tags for config space fields

2020-08-07 Thread Gerd Hoffmann
On Wed, Aug 05, 2020 at 09:43:42AM -0400, Michael S. Tsirkin wrote: > Since gpu is a modern-only device, > tag config space fields as having little endian-ness. > > Signed-off-by: Michael S. Tsirkin > Reviewed-by: Cornelia Huck Reviewed-by

Re: [PATCH v3 34/38] drm/virtio: convert to LE accessors

2020-08-07 Thread Gerd Hoffmann
On Wed, Aug 05, 2020 at 09:44:48AM -0400, Michael S. Tsirkin wrote: > Virtgpu is modern-only. Use LE accessors for config space. > > Signed-off-by: Michael S. Tsirkin Reviewed-by: Gerd Hoffmann ___ Virtualization mailing list Virtu

[PATCH] drm/virtio: fix unblank

2020-08-07 Thread Gerd Hoffmann
.net Fixes: 3954ff10e06e ("drm/virtio: skip set_scanout if framebuffer didn't change") Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/virtio/virtgpu_display.c | 1 + drivers/gpu/drm/virtio/virtgpu_plane.c | 4 +++- 3 files changed, 5 inser

[PATCH v2] drm/qxl: don't take vga ports on rev5+

2020-08-07 Thread Gerd Hoffmann
qemu 5.0 introduces a new qxl hardware revision 5. Unlike revision 4 (and below) the device doesn't switch back into vga compatibility mode when someone touches the vga ports. So we don't have to reserve the vga ports any more to avoid that happening. Signed-off-by: Gerd Hoffmann --- drivers

Re: [PATCH v2 11/24] virtio_input: correct tags for config space fields

2020-08-04 Thread Gerd Hoffmann
+ __le32 res; > }; > > struct virtio_input_devids { > - __u16 bustype; > - __u16 vendor; > - __u16 product; > - __u16 version; > + __le16 bustype; > + __le16 vendor; > + __le16 pro

Re: [PATCH 2/2] drm/virtio: Remove open-coded commit-tail function

2020-07-09 Thread Gerd Hoffmann
On Thu, Jul 09, 2020 at 02:33:39PM +0200, Daniel Vetter wrote: > Exactly matches the one in the helpers. > > This avoids me having to roll out dma-fence critical section > annotations to this copy. > > Signed-off-by: Daniel Vetter > Cc: David Airlie > Cc: Gerd Hoffma

[PATCH] drm/virtio: fix unblank

2020-06-12 Thread Gerd Hoffmann
uffer didn't change") Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/virtio/virtgpu_display.c | 1 + drivers/gpu/drm/virtio/virtgpu_plane.c | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgp

Re: [PATCH v4 0/3] Support virtio cross-device resources

2020-05-28 Thread Gerd Hoffmann
On Tue, May 26, 2020 at 07:58:08PM +0900, David Stevens wrote: > This patchset implements the current proposal for virtio cross-device > resource sharing [1]. It will be used to import virtio resources into > the virtio-video driver currently under discussion [2]. The patch > under consideration

Re: Potential Memory Leak Bugs in drivers/gpu/drm/virtio/virtgpu_vq.c (Linux 5.6).

2020-05-28 Thread Gerd Hoffmann
On Thu, May 28, 2020 at 03:57:05PM +0800, Dongyang Zhan wrote: > Hi, > My name is Dongyang Zhan, I am a security researcher. > Currently, I found two possible memory bugs in > drivers/gpu/drm/virtio/virtgpu_vq.c (Linux 5.6). > I hope you can help me to confirm them. Thank you. Sorry. Not

Re: [PATCH v5 25/38] drm: virtio: fix common struct sg_table related issues

2020-05-15 Thread Gerd Hoffmann
ssible. This, almost always, hides references to the > nents and orig_nents entries, making the code robust, easier to follow > and copy/paste safe. Looks all sane. Acked-by: Gerd Hoffmann take care, Gerd ___ Virtualization mailing list Virtualization@li

Re: [PATCH v3 1/4] dma-buf: add support for virtio exported objects

2020-05-14 Thread Gerd Hoffmann
Hi, > - for the runtime upcasting the usual approach is to check the ->ops > pointer. Which means that would need to be the same for all virtio > dma_bufs, which might get a bit awkward. But I'd really prefer we not > add allocator specific stuff like this to dma-buf. This is exactly the

Re: [PATCH 0/1] Add uvirtio for testing

2020-04-30 Thread Gerd Hoffmann
On Wed, Apr 29, 2020 at 08:59:18PM -0700, lepton wrote: > On Wed, Apr 29, 2020 at 4:58 AM Gerd Hoffmann wrote: > > > > > 3) Need to be verbose on how the vring processing work in the commit log > > > of > > > patch 1 > > > > Ecven b

Re: [PATCH 0/1] Add uvirtio for testing

2020-04-29 Thread Gerd Hoffmann
> 3) Need to be verbose on how the vring processing work in the commit log of > patch 1 Ecven better a file documenting the interface somewhere in Documentation/ take care, Gerd ___ Virtualization mailing list

Re: [PATCH] drm/qxl: qxl_release use after free

2020-04-29 Thread Gerd Hoffmann
t; > It can lead to crashes in qxl driver or trigger memory corruption > in some kmalloc-192 slab object > > Gerd Hoffmann proposes to swap the qxl_release_fence_buffer_objects() + > qxl_push_{cursor,command}_ring_release() calls to close that race window. > > cc: sta...@vger

Re: [PATCH 1/1] drm/qxl: add mutex_lock/mutex_unlock to ensure the order in which resources are rele

2020-04-29 Thread Gerd Hoffmann
Hi, > > The only way I see for this to happen is that the guest is preempted > > between qxl_push_{cursor,command}_ring_release() and > > qxl_release_fence_buffer_objects() calls. The host can complete the qxl > > command then, signal the guest, and the IRQ handler calls > >

Re: [PATCH] drm/qxl: lost qxl_bo_kunmap_atomic_page in qxl_image_init_helper()

2020-04-28 Thread Gerd Hoffmann
On Mon, Apr 27, 2020 at 10:55:27AM +0300, Vasily Averin wrote: > Signed-off-by: Vasily Averin > --- > drivers/gpu/drm/qxl/qxl_image.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/qxl/qxl_image.c b/drivers/gpu/drm/qxl/qxl_image.c > index 43688ecdd8a0..7270da62fc29

Re: [PATCH 2/2] drm/qxl: qxl_release leak in qxl_hw_surface_alloc()

2020-04-28 Thread Gerd Hoffmann
On Mon, Apr 27, 2020 at 08:32:51AM +0300, Vasily Averin wrote: > Cc: sta...@vger.kernel.org > Fixes: 8002db6336dd ("qxl: convert qxl driver to proper use for reservations") > Signed-off-by: Vasily Averin Both patches pushed to drm-misc-fixes. thanks, Gerd

Re: [PATCH Resend] drm/qxl: Use correct notify port address when creating cursor ring

2020-04-24 Thread Gerd Hoffmann
On Fri, Apr 24, 2020 at 05:57:37PM +0800, Huacai Chen wrote: > Hi, Gerd > > On Tue, Mar 31, 2020 at 10:53 PM Gerd Hoffmann wrote: > > > > On Tue, Mar 31, 2020 at 02:18:08PM +0800, Huacai Chen wrote: > > > The command ring and cursor ring use different notify p

Re: [PATCH v1] drm/bochs: fix an issue of ioremap() leak

2020-04-23 Thread Gerd Hoffmann
Hi, > I am a newbie, andy gave me some directions to submit the patch, eg: check > ioremap leak. At this time, I found that the bochs driver may have similar > problems, so I submitted this patch, then, Andy said the best is to switch > this driver to use pcim _ * () functions and drop tons of

Re: [PATCH 1/1] drm/qxl: add mutex_lock/mutex_unlock to ensure the order in which resources are released.

2020-04-21 Thread Gerd Hoffmann
On Sat, Apr 18, 2020 at 02:39:17PM +0800, Caicai wrote: > When a qxl resource is released, the list that needs to be released is > fetched from the linked list ring and cleared. When you empty the list, > instead of trying to determine whether the ttm buffer object for each > qxl in the list is

Re: [PATCH 59/59] drm/bochs: Remove explicit drm_connector_register

2020-04-21 Thread Gerd Hoffmann
On Wed, Apr 15, 2020 at 09:40:34AM +0200, Daniel Vetter wrote: > This is leftovers from the old drm_driver->load callback > upside-down issues. It doesn't do anything for not-hotplugged > connectors since drm_dev_register takes care of that. > > Signed-off-by: Daniel Vetter &

Re: [PATCH 37/59] drm/cirrus: Move to drm/tiny

2020-04-21 Thread Gerd Hoffmann
On Wed, Apr 15, 2020 at 09:40:12AM +0200, Daniel Vetter wrote: > Because it is. Indeed. Acked-by: Gerd Hoffmann take care, Gerd ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mail

Re: upstream boot error: KASAN: slab-out-of-bounds Write in virtio_gpu_object_create

2020-04-06 Thread Gerd Hoffmann
Hi, > > > +drivers/gpu/drm/virtio/virtgpu_object.c maintainers > > > Now we have both mainline and linux-next boot broken (linux-next is > > > broken for the past 40 days). > > > No testing of new code happens. > > > > > > > virtio_gpu_object_shmem_init > > > >

Re: upstream boot error: KASAN: slab-out-of-bounds Write in virtio_gpu_object_create

2020-04-06 Thread Gerd Hoffmann
On Mon, Apr 06, 2020 at 09:07:44AM +0200, Dmitry Vyukov wrote: > On Mon, Apr 6, 2020 at 8:46 AM syzbot > wrote: > > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:ffc1c20c Merge tag 'for-5.7/dm-changes' of git://git.kerne.. > > git tree: upstream > > console

Re: [PATCH 31/44] drm/qxl: Don't use drm_device->dev_private

2020-04-06 Thread Gerd Hoffmann
On Fri, Apr 03, 2020 at 03:58:15PM +0200, Daniel Vetter wrote: > Upcasting using a container_of macro is more typesafe, faster and > easier for the compiler to optimize. > > Signed-off-by: Daniel Vetter > Cc: Dave Airlie > Cc: Gerd Hoffmann > Cc: virtualization@lists.linu

Re: [PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc

2020-04-06 Thread Gerd Hoffmann
On Fri, Apr 03, 2020 at 03:58:14PM +0200, Daniel Vetter wrote: > Also need to remove the drm_dev_put from the remove hook. > > Signed-off-by: Daniel Vetter > Cc: Dave Airlie > Cc: Gerd Hoffmann > Cc: virtualization@lists.linux-foundation.org > Cc: spice-de...@lists.f

Re: [PATCH Resend] drm/qxl: Use correct notify port address when creating cursor ring

2020-03-31 Thread Gerd Hoffmann
On Tue, Mar 31, 2020 at 02:18:08PM +0800, Huacai Chen wrote: > The command ring and cursor ring use different notify port addresses > definition: QXL_IO_NOTIFY_CMD and QXL_IO_NOTIFY_CURSOR. However, in > qxl_device_init() we use QXL_IO_NOTIFY_CMD to create both command ring > and cursor ring. This

Re: arm64 kernel crash in bochs_get_edid_block() with QEMU '-device VGA'

2020-03-25 Thread Gerd Hoffmann
On Sat, Feb 15, 2020 at 01:11:45PM +0100, Juerg Haefliger wrote: > The QEMU default edid=off results in a kernel crash [1] on arm64 due > to commit [2]. To reproduce: Should be fixed in qemu 5.0-rc0 cheers, Gerd ___ Virtualization mailing list

Re: [PATCH v3 0/4] Support virtio cross-device resources

2020-03-20 Thread Gerd Hoffmann
On Wed, Mar 11, 2020 at 08:20:00PM +0900, David Stevens wrote: > This patchset implements the current proposal for virtio cross-device > resource sharing [1], with minor changes based on recent comments. It > is expected that this will be used to import virtio resources into the > virtio-video

<    1   2   3   4   5   6   7   8   9   10   >