[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 0/5] drm/qxl: fix driver shutdown issues.

2021-01-26 Thread Gerd Hoffmann
] drm_minor_release+0x3d/0x60 but I don't think this is the qxl driver's fault. Gerd Hoffmann (5): drm/qxl: use drmm_mode_config_init drm/qxl: unpin release objects drm/qxl: release shadow on shutdown drm/qxl: handle shadow in primary destroy drm/qxl: properly free qxl releases drivers/gpu/drm/qxl

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 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

[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 0/4] drm/qxl: fix some driver shutdown issues.

2021-01-20 Thread Gerd Hoffmann
Some progress. Not complete though, I still get an unclean mm warning on shutdown due to some release objects not being freed yet. Gerd Hoffmann (4): drm/qxl: use drmm_mode_config_init drm/qxl: unpin release objects drm/qxl: release shadow on shutdown drm/qxl: handle shadow in primary

[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

Re: [PATCH 1/2] drm/hyperv: Add DRM driver for hyperv synthetic video device

2021-01-05 Thread Gerd Hoffmann
Hi, > > It's not possible to do page flip with this virtual device. The call to > > SYNTHVID_VRAM_LOCATION is only honoured once. So unfortunately need to > > use SHMEM helpers. > > I was thinking about using struct video_output_situation.vram_offset; in > case you want to tinker with that.

Re: [PATCH] drm/virtio: align blob resources to page sizes

2020-12-22 Thread Gerd Hoffmann
On Fri, Dec 18, 2020 at 07:19:59PM -0800, Chia-I Wu wrote: > They trigger the BUG_ON() in drm_gem_private_object_init otherwise. > > Signed-off-by: Chia-I Wu > Cc: Gurchetan Singh > Cc: Gerd Hoffmann Pushed to drm-misc-next. thanks, Gerd

Re: [PATCH] drm/qxl: use flexible-array member instead of zero-length array

2020-12-22 Thread Gerd Hoffmann
On Fri, Dec 11, 2020 at 09:32:29AM +0800, Tian Tao wrote: > Use flexible-array member introduced in C99 instead of zero-length > array. Most of zero-length array was already taken care in previous > patch [1]. Now modified few more cases which were not handled earlier. > > [1].

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 v3 1/3] drm/virtio: virtio_{blah} --> virtio_gpu_{blah}

2020-12-02 Thread Gerd Hoffmann
On Mon, Nov 30, 2020 at 06:16:21PM -0800, Gurchetan Singh wrote: > virtio_gpu typically uses the prefix virtio_gpu, but there are > a few places where the virtio prefix is used. Modify this for > consistency. > > v3: add r-b tags > > Signed-off-by: Gurchetan Singh > Reviewed-by: Anthoine

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 1/5] drm/virtio: suffix create blob call with _ioctl like any ioctl

2020-11-20 Thread Gerd Hoffmann
On Wed, Nov 18, 2020 at 05:08:05PM -0800, Gurchetan Singh wrote: > From: Anthoine Bourgeois > > For coherency, all ioctls are suffixed > > Signed-off-by: Anthoine Bourgeois All pushed to drm-misc-next. thanks, Gerd ___ dri-devel mailing list

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 ___ dri-devel mailing list dri-devel@lists.freed

Re: [PATCH v3 25/32] drm: kernel-doc: add description for a new function parameter

2020-10-27 Thread Gerd Hoffmann
he new parameter. > > Fixes: 707d561f77b5 ("drm: allow limiting the scatter list size.") > Signed-off-by: Mauro Carvalho Chehab Acked-by: Gerd Hoffmann > --- > drivers/gpu/drm/drm_prime.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/

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

Re: [PATCH] virtio-gpu api: fix 64/32 compat issue with blob implementation

2020-09-30 Thread Gerd Hoffmann
On Tue, Sep 29, 2020 at 02:53:33PM -0700, Gurchetan Singh wrote: > From: Alistair Delva > > We encountered this issue when booting blob with a 32-bit kernel. > The implementation doesn't match v6 of the virtio-spec change, so fix > this. > > Fixes: ff886cbdcc44 ("virtio-gpu api: blob

Re: [PATCH] drm/qxl: fix usage of ttm_bo_init

2020-09-29 Thread Gerd Hoffmann
On Tue, Sep 29, 2020 at 01:23:06PM +0200, Christian König wrote: > We need to use ttm_bo_init_reserved here to make sure > that the BO is pinned before it becomes visible on the LRU. > > Signed-off-by: Christian König Reviewed-by: Gerd Hoffmann # Tested-by: G

[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 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 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

[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 0/4] drm/qxl: fix stale mm entries on driver shutdown

2020-09-29 Thread Gerd Hoffmann
v2: repost, add a pin fix. Gerd Hoffmann (4): drm/qxl: use drmm_mode_config_init drm/qxl: release shadow on shutdown drm/qxl: handle shadow in primary destroy drm/qxl: use qxl pin function drivers/gpu/drm/qxl/qxl_display.c | 11 +-- drivers/gpu/drm/qxl/qxl_object.c | 2 +- 2

Re: [PATCH v4 01/19] drm/virtio: blob prep: refactor getting pages and attaching backing

2020-09-29 Thread Gerd Hoffmann
On Wed, Sep 23, 2020 at 05:31:56PM -0700, Gurchetan Singh wrote: > Useful for upcoming blob resources. Pushed to drm-misc-next (whole series). thanks, Gerd ___ dri-devel mailing list dri-devel@lists.freedesktop.org

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 ___ dri-devel mailing list dri-devel@lists.freedesktop.org

Re: [PATCH 1/9] drm/format-helper: Pass destination pitch to drm_fb_memcpy_dstclip()

2020-09-28 Thread Gerd Hoffmann
Hi, > > I don't quite remember where exactly this was implemented. It was not a > > shared buffer, though. IIRC the buffer allocation code in one of the > > libs rounded the size towards multiples of 64. I remember thinking that > > it was probably done for tiled rendering. Happens when

Re: [PATCH 07/11] drm/qxl: switch over to the new pin interface

2020-09-22 Thread Gerd Hoffmann
vived smoke test. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann take care, Gerd ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 12/19] drm/virtio: implement blob resources: implement vram object

2020-09-17 Thread Gerd Hoffmann
Hi, > + if (resp_type == VIRTIO_GPU_RESP_OK_MAP_INFO) { > + vram->map_info = resp->map_info; > + vram->map_state = STATE_OK; > + } else { > + vram->map_state = STATE_ERR; > + } Ah, found it, here. ok. take care, Gerd

Re: [PATCH v3 09/19] drm/virtio: implement blob resources: probe for host visible region

2020-09-17 Thread Gerd Hoffmann
Hi, > + if (!devm_request_mem_region(>vdev->dev, > + vgdev->host_visible_region.addr, > + vgdev->host_visible_region.len, > + dev_name(>vdev->dev))) { > +

Re: [PATCH v3 02/19] drm/virtio: blob prep: make CPU responses more generic

2020-09-17 Thread Gerd Hoffmann
On Wed, Sep 16, 2020 at 05:08:21PM -0700, Gurchetan Singh wrote: > RESOURCE_MAP_BLOB / RESOURCE_UNMAP_BLOB can use this. > -#define UUID_INITIALIZING 0 > -#define UUID_INITIALIZED 1 > -#define UUID_INITIALIZATION_FAILED 2 > +#define STATE_INITIALIZING 0 > +#define STATE_OK 1 > +#define STATE_ERR

Re: [PATCH v2 10/23] virtio-gpu api: host visible feature

2020-09-09 Thread Gerd Hoffmann
Hi, > --- a/include/uapi/drm/virtgpu_drm.h kernel <-> userspace API. > --- a/include/uapi/linux/virtio_gpu.h host <-> guest API. Please create sepparate patches for these. thanks, Gerd ___ dri-devel mailing list dri-devel@lists.freedesktop.org

Re: [PATCH v2 10/23] virtio-gpu api: host visible feature

2020-09-09 Thread Gerd Hoffmann
Hi, > +enum virtio_gpu_shm_id { > + VIRTIO_GPU_SHM_ID_UNDEFINED = 0, > + VIRTIO_GPU_SHM_ID_HOST_VISIBLE = 1 > +}; I think this is also not in the virtio spec update. ___ dri-devel mailing list dri-devel@lists.freedesktop.org

Re: [PATCH v2 04/23] virtio: Add get_shm_region method

2020-09-09 Thread Gerd Hoffmann
On Wed, Sep 02, 2020 at 05:00:25PM -0700, Gurchetan Singh wrote: > On Wed, Sep 2, 2020 at 3:15 PM Vivek Goyal wrote: > > > Hi Gurchetan, > > > > Now Miklos has queued, these tree virtio patches for shared memory > > region in his tree as part of virtiofs dax patch series. > > > > I am hoping

Re: [PATCH v2 09/23] virtio-gpu api: blob resources

2020-09-09 Thread Gerd Hoffmann
Hi, > @@ -100,7 +102,7 @@ struct drm_virtgpu_resource_info { > __u32 bo_handle; > __u32 res_handle; > __u32 size; > - __u32 stride; > + __u32 blob_mem; > }; Huh? This is not in the virtio spec update proposed. > struct drm_virtgpu_3d_box { > @@ -117,6 +119,8 @@

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

Re: [PATCH v4 1/1] drm: allow limiting the scatter list size.

2020-09-08 Thread Gerd Hoffmann
> > > The comments I've found suggest very much not ... Or is that all very > > > old stuff only that no one cares about anymore? > > > > I think these days it is possible to override dma_ops per device, which > > in turn allows virtio to deal with the quirks without the rest of the > > kernel

[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 0/3] drm/qxl: fix stale mm entries on driver shutdown

2020-09-08 Thread Gerd Hoffmann
Gerd Hoffmann (3): drm/qxl: use drmm_mode_config_init drm/qxl: release shadow on shutdown drm/qxl: handle shadow in primary destroy drivers/gpu/drm/qxl/qxl_display.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) -- 2.27.0

[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 0/3] drm/virtio: fix stale mm entries on driver shutdown

2020-09-08 Thread Gerd Hoffmann
Gerd Hoffmann (3): drm/virtio: use drmm_mode_config_init drm/virtio: return virtio_gpu_queue errors drm/virtio: add virtio_gpu_cmd_unref_resource error handling drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +- drivers/gpu/drm/virtio/virtgpu_display.c | 11 --- drivers/gpu/drm

[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 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 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] 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

Re: [PATCH 03/13] drm/qxl: move bind/unbind/destroy to the driver function table.

2020-09-07 Thread Gerd Hoffmann
On Tue, Sep 08, 2020 at 06:46:20AM +1000, Dave Airlie wrote: > From: Dave Airlie > > Acked-by: Christian König > Signed-off-by: Dave Airlie Reviewed-by: Gerd Hoffmann ___ dri-devel mailing list dri-devel@lists.freedeskt

Re: [PATCH v4 1/1] drm: allow limiting the scatter list size.

2020-09-07 Thread Gerd Hoffmann
On Mon, Sep 07, 2020 at 03:53:02PM +0200, Daniel Vetter wrote: > On Mon, Sep 7, 2020 at 1:24 PM Gerd Hoffmann wrote: > > > > Add drm_device argument to drm_prime_pages_to_sg(), so we can > > call dma_max_mapping_size() to figure the segment size limit > > and call into

[PATCH v4 0/1] drm: fix virtio-gpu + sev

2020-09-07 Thread Gerd Hoffmann
virtio-gpu must make sure scatter list segments are not too big. Gerd Hoffmann (1): drm: allow limiting the scatter list size. include/drm/drm_prime.h | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 3 ++- drivers/gpu/drm/drm_gem_shmem_helper.c | 2

[PATCH v4 1/1] drm: allow limiting the scatter list size.

2020-09-07 Thread Gerd Hoffmann
segment size limits so far ... v2: place max_segment in drm driver not gem object. v3: move max_segment next to the other gem fields. v4: just use dma_max_mapping_size(). Signed-off-by: Gerd Hoffmann --- include/drm/drm_prime.h | 3 ++- drivers/gpu/drm/amd/amdgpu

Re: [PATCH v2 1/2] drm: allow limiting the scatter list size.

2020-09-07 Thread Gerd Hoffmann
> > + /** > > +* @max_segment: > > +* > > +* Max size for scatter list segments. When unset the default > > +* (SCATTERLIST_MAX_SEGMENT) is used. > > +*/ > > + size_t max_segment; > > Is there no better place for this then "at the bottom"? drm_device is a > huge

[PATCH v3 0/2] drm: fix virtio-gpu + sev

2020-09-07 Thread Gerd Hoffmann
virtio-gpu must make sure scatter list segments are not too big. Gerd Hoffmann (2): drm: allow limiting the scatter list size. drm/virtio: set max_segment include/drm/drm_device.h| 8 include/drm/drm_prime.h | 3 ++- drivers/gpu/drm/amd

[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

[PATCH v3 1/2] drm: allow limiting the scatter list size.

2020-09-07 Thread Gerd Hoffmann
in drm driver not gem object. v3: move max_segment next to the other gem fields. Signed-off-by: Gerd Hoffmann --- include/drm/drm_device.h| 8 include/drm/drm_prime.h | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 3 ++- drivers/gpu/drm

Re: [PATCH] udmabuf: Add missing compact_ioctl

2020-09-06 Thread Gerd Hoffmann
Hi, > +#ifdef CONFIG_COMPAT > + .compat_ioctl = udmabuf_ioctl, > +#endif Pushed to drm-misc-next. thanks, Gerd ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

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] drm: virtio: fix kconfig dependency warning

2020-08-28 Thread Gerd Hoffmann
Hi, > config DRM_VIRTIO_GPU > tristate "Virtio GPU driver" > - depends on DRM && VIRTIO && MMU > + depends on DRM && VIRTIO_MENU && MMU Shouldn't this depend on both VIRTIO and VIRTIO_MENU, simliar to the other virtio drivers? take care, Gerd

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] virtio: fix build for configs without dma-bufs

2020-08-19 Thread Gerd Hoffmann
On Wed, Aug 19, 2020 at 12:10:11PM +0900, David Stevens wrote: > Reported-by: kernel test robot > Signed-off-by: David Stevens Pushed to drm-misc-next thanks for the qick fix, Gerd ___ dri-devel mailing list dri-devel@lists.freedesktop.org

Re: [Virtual ppce500] virtio_gpu virtio0: swiotlb buffer is full

2020-08-18 Thread Gerd Hoffmann
On Tue, Aug 18, 2020 at 04:41:38PM +0200, Christian Zigotzky wrote: > Hello Gerd, > > I compiled a new kernel with the latest DRM misc updates today. The patch is > included in these updates. > > This kernel works with the VirtIO-GPU in a virtual e5500 QEMU/KVM HV machine > on my X5000. > >

[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 v2 1/2] drm: allow limiting the scatter list size.

2020-08-18 Thread Gerd Hoffmann
in drm driver not gem object. Signed-off-by: Gerd Hoffmann --- include/drm/drm_device.h| 8 include/drm/drm_prime.h | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 3 ++- drivers/gpu/drm/drm_gem_shmem_helper.c | 3 ++- drivers/gpu/drm

[PATCH v2 0/2] drm: fix virtio-gpu + sev

2020-08-18 Thread Gerd Hoffmann
virtio-gpu must make sure scatter list segments are not too big. Gerd Hoffmann (2): drm: allow limiting the scatter list size. drm/virtio: set max_segment include/drm/drm_device.h| 8 include/drm/drm_prime.h | 3 ++- drivers/gpu/drm/amd

Re: [PATCH 1/2] drm: allow limiting the scatter list size.

2020-08-18 Thread Gerd Hoffmann
Hi, > > > I'm missing an explanation why this should be useful (it certainly is). > > virtio-gpu needs this to work properly with SEV (see patch 2/2 of this > > series). > > Yeah, that's the problem patch 2/2 never showed up here :) The list should have everything. Your inbox probably has

Re: [PATCH 1/2] drm: allow limiting the scatter list size.

2020-08-18 Thread Gerd Hoffmann
On Tue, Aug 18, 2020 at 09:57:59AM +0200, Christian König wrote: > Am 18.08.20 um 09:48 schrieb Gerd Hoffmann: > > Add max_segment argument to drm_prime_pages_to_sg(). When set pass it > > through to the __sg_alloc_table_from_pages() call, otherwise use > > SCATTERLIST_MAX_S

Re: [Virtual ppce500] virtio_gpu virtio0: swiotlb buffer is full

2020-08-18 Thread Gerd Hoffmann
On Mon, Aug 17, 2020 at 11:19:58AM +0200, Christian Zigotzky wrote: > Hello > > I compiled the RC1 of kernel 5.9 today. Unfortunately the issue with the > VirtIO-GPU (see below) still exists. Therefore we still need the patch (see > below) for using the VirtIO-GPU in a virtual e5500 PPC64 QEMU

[PATCH 0/2] drm: fix virtio-gpu + sev

2020-08-18 Thread Gerd Hoffmann
Gerd Hoffmann (2): drm: allow limiting the scatter list size. drm/virtio: set max_segment include/drm/drm_gem.h | 8 include/drm/drm_prime.h | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 3 ++- drivers/gpu/drm

[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 1/2] drm: allow limiting the scatter list size.

2020-08-18 Thread Gerd Hoffmann
Add max_segment argument to drm_prime_pages_to_sg(). When set pass it through to the __sg_alloc_table_from_pages() call, otherwise use SCATTERLIST_MAX_SEGMENT. Also add max_segment field to gem objects and pass it to drm_prime_pages_to_sg() calls in drivers and helpers. Signed-off-by: Gerd

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

2020-08-18 Thread Gerd Hoffmann
Gerd Hoffmann (2): drm/virtio: fix unblank drm/virtio: drop virtio_gpu_output->enabled drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +- drivers/gpu/drm/virtio/virtgpu_display.c | 15 +++ drivers/gpu/drm/virtio/virtgpu_plane.c | 6 -- 3 files changed, 16 inserti

[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: Revert "drm/virtio: Call the right shmem helpers"

2020-08-17 Thread Gerd Hoffmann
On Mon, Jun 15, 2020 at 04:05:00PM -0700, Gurchetan Singh wrote: > This reverts commit d323bb44e4d23802eb25d13de1f93f2335bd60d0. > > Fixes a double-free regression: > > [4.357928] drm_gem_shmem_free_object+0xb4/0x100 > [4.358983] virtio_gpu_dequeue_ctrl_func+0xd9/0x290 > [4.360343]

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 ___ dri-devel mailing list

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