[PATCH v2 12/18] drm/qxl: track primary bo

2018-12-13 Thread Gerd Hoffmann
Track which bo is used as primary surface. With that in place we don't need the primary_created flag any more, we can just check the primary bo pointer instead. Also verify we don't already have a primary surface in qxl_io_create_primary(). Signed-off-by: Gerd Hoffmann --- drivers/g

[PATCH v2 16/18] drm/qxl: implement prime kmap/kunmap

2018-12-13 Thread Gerd Hoffmann
Generic fbdev emulation needs this. Also: We must keep track of the number of mappings now, so we don't unmap early in case two users want a kmap of the same bo. Add a sanity check to destroy callback to make sure kmap/kunmap is balanced. Signed-off-by: Gerd Hoffmann --- drivers/gpu/dr

[PATCH v2 14/18] drm/qxl: cover all crtcs in shadow bo.

2018-12-13 Thread Gerd Hoffmann
ry surface), make it big enough that dumb bo's for all crtcs fit in side-by-side. Adjust the pageflip blits to place the heads next to each other in the shadow. With this patch in place multihead qxl works with wayland. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 5

[PATCH v2 18/18] drm/qxl: remove dead qxl fbdev emulation code

2018-12-13 Thread Gerd Hoffmann
Lovely diffstat, thanks to the new generic fbdev emulation. drm/qxl/Makefile |2 drm/qxl/qxl_draw.c | 232 drm/qxl/qxl_drv.h | 21 --- drm/qxl/qxl_fb.c | 300 - Signed-off-by: Gerd Hoffmann

[PATCH v2 02/18] drm/qxl: drop unused qxl_fb_virtual_address

2018-12-13 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 38c5a8b1df..7eabf4a9ed 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h

[PATCH v2 13/18] drm/qxl: use shadow bo directly

2018-12-13 Thread Gerd Hoffmann
the workflow in qxl_primary_atomic_update(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_cmd.c | 8 +++- drivers/gpu/drm/qxl/qxl_display.c | 33 +++-- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_cmd.

[PATCH v2 04/18] drm/qxl: change the way slot is detected

2018-12-13 Thread Gerd Hoffmann
From: Frediano Ziglio Instead of relaying on surface type use the actual placement. This allow to have different placement for a single type of surface. Signed-off-by: Frediano Ziglio [ kraxel: rebased, adapted to upstream changes ] Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl

[PATCH v2 01/18] drm/qxl: drop ttm_mem_reg arg from qxl_hw_surface_alloc()

2018-12-14 Thread Gerd Hoffmann
Not used, is always NULL. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h| 3 +-- drivers/gpu/drm/qxl/qxl_cmd.c| 14 ++ drivers/gpu/drm/qxl/qxl_object.c | 2 +- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b

[PATCH v2 15/18] drm/qxl: use qxl_num_crtc directly

2018-12-14 Thread Gerd Hoffmann
e, and when reading the code you don't have to trace where and why qdev->monitors_config->max_allowed is set. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/dr

[PATCH v2 17/18] drm/qxl: use generic fbdev emulation

2018-12-14 Thread Gerd Hoffmann
Switch qxl over to the new generic fbdev emulation. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 7 --- drivers/gpu/drm/qxl/qxl_drv.c | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl

[PATCH] drm/virtio: switch to generic fbdev emulation

2018-12-15 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 14 --- drivers/gpu/drm/virtio/virtgpu_display.c | 1 - drivers/gpu/drm/virtio/virtgpu_drv.c | 9 +- drivers/gpu/drm/virtio/virtgpu_fb.c | 191 --- drivers/gpu/drm/virtio

[PATCH 03/14] drm/bochs: atomic: add atomic_flush+atomic_enable callbacks.

2018-12-19 Thread Gerd Hoffmann
Conversion to atomic modesetting, step one. Add atomic crtc helper callbacks. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_kms.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c

[PATCH] drm/bochs: add edid present check

2018-12-19 Thread Gerd Hoffmann
Check first two header bytes before trying to read the edid blob, to avoid the log being spammed in case qemu has no edid support (old qemu or edid turned off). Fixes: 01f23459cf drm/bochs: add edid support. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_hw.c | 4 1 file

[PATCH 06/14] drm/bochs: atomic: use atomic set_config helper

2018-12-19 Thread Gerd Hoffmann
Conversion to atomic modesetting, step four. Use atomic set_config helper for crtc. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index

[PATCH 01/14] drm/bochs: encoder cleanup

2018-12-19 Thread Gerd Hoffmann
Most unused callbacks can be NULL pointers these days. Drop a bunch of empty encoder callbacks. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_kms.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm

[PATCH 02/14] drm/bochs: split bochs_hw_setmode

2018-12-19 Thread Gerd Hoffmann
Create a separate bochs_hw_setformat function to configure the framebuffer format (actually just the byteorder). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs.h | 5 +++-- drivers/gpu/drm/bochs/bochs_hw.c | 19 --- drivers/gpu/drm/bochs/bochs_kms.c | 3

[PATCH 04/14] drm/bochs: atomic: add mode_set_nofb callback.

2018-12-19 Thread Gerd Hoffmann
Conversion to atomic modesetting, step two. Add mode_set_nofb crtc helper callback. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_kms.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index

[PATCH 12/14] drm/bochs: switch to generic drm fbdev emulation

2018-12-19 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index a9c7140e3b..f1f65324bb 100644 --- a/drivers/gpu/drm/bochs/bochs_drv.c +++ b

[PATCH 10/14] drm/bochs: drop unused gpu_addr arg from bochs_bo_pin()

2018-12-19 Thread Gerd Hoffmann
It's always NULL, so just remove it. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs.h | 2 +- drivers/gpu/drm/bochs/bochs_fbdev.c | 2 +- drivers/gpu/drm/bochs/bochs_kms.c | 2 +- drivers/gpu/drm/bochs/bochs_mm.c| 11 +-- 4 files changed, 4 insertions(+

[PATCH 05/14] drm/bochs: atomic: switch planes to atomic, wire up helpers.

2018-12-19 Thread Gerd Hoffmann
Conversion to atomic modesetting, step three. Wire up atomic helpers. Switch planes to atomic. We are late to the party, the transitional helpers are gone, so this can't be splitted into smaller steps any more. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_fbdev.c

[PATCH 09/14] drm/bochs: remove old bochs_crtc_* functions

2018-12-19 Thread Gerd Hoffmann
Remove the old, now unused crtc callbacks. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_kms.c | 81 --- 1 file changed, 81 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 9e836386e9

[PATCH 14/14] drm/bochs: move remaining fb bits to kms

2018-12-19 Thread Gerd Hoffmann
bochs_fbdev.c is almost empty now. Move the remaining framebuffer bits over to bochs_kms.c. Pure code motion. No functional change. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_fbdev.c | 29 - drivers/gpu/drm/bochs/bochs_kms.c | 17

[PATCH 07/14] drm/bochs: atomic: use atomic page_flip helper

2018-12-19 Thread Gerd Hoffmann
Conversion to atomic modesetting, step five. Use atomic page_flip helper for crtc. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_kms.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm

[PATCH 11/14] drm/bochs: add basic prime support

2018-12-19 Thread Gerd Hoffmann
Generic framebuffer emulation needs this. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs.h | 11 +++ drivers/gpu/drm/bochs/bochs_drv.c | 15 +- drivers/gpu/drm/bochs/bochs_mm.c | 63 +++ 3 files changed, 88 insertions(+), 1

[PATCH 08/14] drm/bochs: atomic: set DRIVER_ATOMIC

2018-12-19 Thread Gerd Hoffmann
Conversion to atomic modesetting, final step. Set the DRIVER_ATOMIC flag. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index

[PATCH 06/10] drm/virtio: params struct for virtio_gpu_cmd_create_resource()

2018-12-19 Thread Gerd Hoffmann
Add format, width and height to the virtio_gpu_object_params struct and use the struct for virtio_gpu_cmd_create_resource(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 7 --- drivers/gpu/drm/virtio/virtgpu_gem.c | 8 drivers/gpu/drm/virtio

[PATCH 13/14] drm/bochs: drop old fbdev emulation code

2018-12-19 Thread Gerd Hoffmann
Not needed any more, bochs uses the generic emulation now. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs.h | 9 --- drivers/gpu/drm/bochs/bochs_drv.c | 6 -- drivers/gpu/drm/bochs/bochs_fbdev.c | 137 3 files changed, 152 deletions

[PATCH 03/10] drm/virtio: drop virtio_gpu_fence_cleanup()

2018-12-19 Thread Gerd Hoffmann
Just call drm_fence_put directly instead. Also set vgfb->fence to NULL after dropping the reference. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 - drivers/gpu/drm/virtio/virtgpu_fence.c | 8 drivers/gpu/drm/virtio/virtgpu_ioctl.c | 2 +- drivers/gpu/

[PATCH 01/10] drm/virtio: log error responses

2018-12-19 Thread Gerd Hoffmann
If we got an error response code from the host, print it to the log. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_vq.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c

[PATCH 10/10] drm/virtio: ditch virtio_gpu_object_attach() calls

2018-12-19 Thread Gerd Hoffmann
With virtio_gpu_object_create() being called earlier ttm_bo_init() will handle the virtio_gpu_object_attach() (via backend binding), so we can drop the extra calls now. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_gem.c | 9 - drivers/gpu/drm/virtio/virtgpu_ioctl.c

[PATCH 09/10] drm/virtio: move virtio_gpu_cmd_create_resource call into virtio_gpu_object_create

2018-12-19 Thread Gerd Hoffmann
Specifically call virtio_gpu_object_create() before ttm_bo_init(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h| 2 ++ drivers/gpu/drm/virtio/virtgpu_gem.c| 3 +-- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 10 ++ drivers/gpu/drm/virtio/virtgpu_object.c

[PATCH 05/10] drm/virtio: use struct to pass params to virtio_gpu_object_create()

2018-12-19 Thread Gerd Hoffmann
Create virtio_gpu_object_params, use that to pass object parameters to virtio_gpu_object_create. Also drop unused "kernel" parameter (unused, always false). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h| 15 ++- drivers/gpu/drm/virtio/vir

[PATCH 07/10] drm/virtio: params struct for virtio_gpu_cmd_create_resource_3d()

2018-12-19 Thread Gerd Hoffmann
Add 3d resource parameters to virtio_gpu_object_params struct and use it for virtio_gpu_cmd_resource_create_3d() calls. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 10 +- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 25 ++--- drivers/gpu/drm

[PATCH 02/10] drm/virtio: fix pageflip flush

2018-12-19 Thread Gerd Hoffmann
Sending the flush command only makes sense if we actually have a framebuffer attached to the scanout (handle != 0). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_plane.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/virtio

[PATCH 04/10] drm/virtio: move virtio_gpu_object_{attach, detach} calls.

2018-12-19 Thread Gerd Hoffmann
and move_notify callbacks are not needed any more, so drop them. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_ttm.c | 92 ++-- 1 file changed, 24 insertions(+), 68 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_ttm.c b/drivers/gpu/drm

[PATCH 08/10] drm/virtio: drop fencing in virtio_gpu_resource_create_ioctl

2018-12-19 Thread Gerd Hoffmann
There is no need to wait for completion here. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 51 +- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio

Re: [PATCH] drm/bochs: add edid present check

2018-12-19 Thread Gerd Hoffmann
Hi, > You could probably have a comment here explaining the magic below > (just like in the commit message to ease the task of understanding > while reading the code why 2 of 8 bytes of the EDID header is checked > and why it is all needed). Of course one can use git blame... Up to you Makes se

[PATCH v2] drm/bochs: add edid present check

2018-12-19 Thread Gerd Hoffmann
Check first two header bytes before trying to read the edid blob, to avoid the log being spammed in case qemu has no edid support (old qemu or edid turned off). Fixes: 01f23459cf drm/bochs: add edid support. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_hw.c | 8 1 file

[PATCH v2 3/4] Add virtio gpu driver.

2015-04-01 Thread Gerd Hoffmann
more work on the qemu side and will be added later. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/virtio/Kconfig | 14 + drivers/gpu/drm/virtio/Makefile

[PATCH v2 4/4] Add virtio-vga bits.

2015-04-01 Thread Gerd Hoffmann
--- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 32 ++-- drivers/virtio/virtio_pci_common.c | 7 ++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c index 56bd

Re: [PATCH v2 4/4] Add virtio-vga bits.

2015-04-01 Thread Gerd Hoffmann
On Mi, 2015-04-01 at 15:26 +0200, Michael S. Tsirkin wrote: > On Wed, Apr 01, 2015 at 03:15:30PM +0200, Gerd Hoffmann wrote: > > +static void virtio_pci_kick_out_firmware_fb(struct pci_dev *pci_dev) > > +{ > > + struct apertures_struct *ap; > > + boo

Re: [PATCH v2 3/4] Add virtio gpu driver.

2015-04-07 Thread Gerd Hoffmann
On Do, 2015-04-02 at 17:52 +0200, Marc-André Lureau wrote: > Perhaps that condition should be changed: > + BUG_ON(size >= MAX_INLINE_CMD_SIZE); Done. thanks, Gerd ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https:

[PATCH v3 4/4] Add virtio gpu driver.

2015-05-22 Thread Gerd Hoffmann
more work on the qemu side and will be added later. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/virtio/Kconfig | 14 + drivers/gpu/drm/virtio/Makefile

Re: [patch] drm/virtio: checking for NULL instead of IS_ERR

2015-06-10 Thread Gerd Hoffmann
On Mi, 2015-06-10 at 22:27 +0300, Dan Carpenter wrote: > virtio_gpu_alloc_object() returns an error pointer, it never returns > NULL. > > Fixes: dc5698e80cf7 ('Add virtio gpu driver.') > Signed-off-by: Dan Carpenter R

Re: [patch] drm/virtio: remove some dead code

2015-06-10 Thread Gerd Hoffmann
On Mi, 2015-06-10 at 22:27 +0300, Dan Carpenter wrote: > The goto is correct, and we never reach the return statement so just > delete the dead code. > > Signed-off-by: Dan Carpenter Reviewed-by: Gerd Hoffmann ___ Virtualization

[PATCH 1/3] Add virtio-vga bits.

2015-06-16 Thread Gerd Hoffmann
--- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 44 +--- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c index f4ec816..88a3916 100644 --- a/drivers/gpu/drm/virtio/virtgp

[PATCH 2/3] drm/virtgpu: initialise fbdev after getting initial display info

2015-06-16 Thread Gerd Hoffmann
From: Dave Airlie This should avoid issues with the fbdev path trying to render before we've gotten the display info. Signed-off-by: Dave Airlie [ kraxel: wait for display-info reply ] Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/v

[PATCH 3/3] virtio-gpu: add locking for vbuf pool

2015-06-16 Thread Gerd Hoffmann
From: Dave Airlie Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/virtio/virtgpu_vq.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio

[PATCH] virtio-pci: alloc only resources actually used.

2015-06-16 Thread Gerd Hoffmann
Move resource allocation from common code to legacy and modern code. Only request resources actually used, i.e. bar0 in legacy mode and the regions specified by capabilities in modern mode. Signed-off-by: Gerd Hoffmann --- drivers/virtio/virtio_pci_common.c | 7 - drivers/virtio

Re: [PATCH] virtio-pci: alloc only resources actually used.

2015-06-18 Thread Gerd Hoffmann
Hi, > > +static struct resource *request_capability(struct pci_dev *dev, int off, > > + const char *name) > > +{ > > + u8 bar; > > + u32 offset, length; > > + > > + pci_read_config_byte(dev, off + offsetof(struct virtio_pci_cap, > > +

[PATCH v2] virtio-pci: alloc only resources actually used.

2015-06-18 Thread Gerd Hoffmann
Move resource allocation from common code to legacy and modern code. Only request resources actually used, i.e. bar0 in legacy mode and the regions specified by capabilities in modern mode. Signed-off-by: Gerd Hoffmann --- drivers/virtio/virtio_pci_common.c | 7 drivers/virtio

Re: [PATCH v2] virtio-pci: alloc only resources actually used.

2015-06-18 Thread Gerd Hoffmann
Hi, > > + if (offset + length < offset || > > + offset + length > pci_resource_len(dev, bar)) { > > + dev_err(&dev->dev, > > + "virtio_pci: virtio capability %u@%u " > > + "out of range on bar %i length %lu\n", > > + length,

[PATCH] virtio-pci: alloc only resources actually used.

2015-06-23 Thread Gerd Hoffmann
Move resource allocation from common code to legacy and modern code. Only request resources actually used, i.e. bar0 in legacy mode and the bar(s) specified by capabilities in modern mode. Signed-off-by: Gerd Hoffmann --- drivers/virtio/virtio_pci_common.c | 7 --- drivers/virtio

[PATCH] virtio-pci: alloc only resources actually used.

2015-06-23 Thread Gerd Hoffmann
Move resource allocation from common code to legacy and modern code. Only request resources actually used, i.e. bar0 in legacy mode and the bar(s) specified by capabilities in modern mode. Signed-off-by: Gerd Hoffmann --- drivers/virtio/virtio_pci_common.c | 7 --- drivers/virtio

Re: [PATCH] virtio-gpu: fix compilation warnings

2015-09-07 Thread Gerd Hoffmann
On Mi, 2015-09-02 at 12:30 +0300, Mike Rapoport wrote: > Update snprintf format in virtgpu_fence.c and virtgpu_debugfs.c to fix the > following compilation warnings: > > C [M] drivers/gpu/drm/virtio/virtgpu_fence.o > drivers/gpu/drm/virtio/virtgpu_fence.c: In function > ‘virtio_timeline_value_st

[PATCH 3/5] update virtio gpu driver: add 3d/virgl support

2015-09-09 Thread Gerd Hoffmann
Add the bits needed for opengl rendering support: query capabilities, new virtio commands, drm ioctls. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/Makefile| 3 +- drivers/gpu/drm/virtio/virtgpu_drv.c | 10 + drivers/gpu/drm/virtio

[PATCH 4/5] virtio_gpu: add basic prime support

2015-09-09 Thread Gerd Hoffmann
From: Dave Airlie This is enough to enable DRI3. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/Makefile| 2 +- drivers/gpu/drm/virtio/virtgpu_drv.c | 13 +- drivers/gpu/drm/virtio/virtgpu_drv.h | 12 ++ drivers/gpu/drm/virtio

[PATCH 5/5] virtgpu: mark as a render gpu

2015-09-09 Thread Gerd Hoffmann
From: Dave Airlie Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c index 1245d09..e00298e 100644 --- a/drivers/gpu/drm/virtio

[PATCH 1/5] virtio-gpu: add virtio_gpu_queue_ctrl_buffer_nolock

2015-09-09 Thread Gerd Hoffmann
Add virtio_gpu_queue_ctrl_buffer_nolock function, which does the same as virtio_gpu_queue_ctrl_buffer but does not take the virtqueue lock. The caller must hold the lock instead. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_vq.c | 17 + 1 file changed, 13

[PATCH 2/5] virtio-gpu: add & use virtio_gpu_queue_fenced_ctrl_buffer

2015-09-09 Thread Gerd Hoffmann
Add helper function to handle the submission of fenced control requests. Make sure we initialize the fence while holding the virtqueue lock, so requests can't be reordered. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +- drivers/gpu/drm/virtio/virtgpu

Re: [PATCH 1/5] virtio-gpu: add virtio_gpu_queue_ctrl_buffer_nolock

2015-09-10 Thread Gerd Hoffmann
On Do, 2015-09-10 at 09:39 +0100, Emil Velikov wrote: > Hi Gerd, > > On 9 September 2015 at 12:42, Gerd Hoffmann wrote: > > Add virtio_gpu_queue_ctrl_buffer_nolock function, which does the same as > > virtio_gpu_queue_ctrl_buffer but does not take the virtqueue lock. The

Re: [PATCH 5/5] virtgpu: mark as a render gpu

2015-09-10 Thread Gerd Hoffmann
On Do, 2015-09-10 at 09:59 +0100, Emil Velikov wrote: > On 9 September 2015 at 12:42, Gerd Hoffmann wrote: > > From: Dave Airlie > > > > Signed-off-by: Gerd Hoffmann > > --- > > drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +- > > 1 file changed, 1 insertion

Re: [PATCH 3/5] update virtio gpu driver: add 3d/virgl support

2015-09-10 Thread Gerd Hoffmann
Hi, > Just a FYI - Daniel Vetter has a series in flight which deprecates > DRM_UNLOCKED for KMS drivers. Thanks for the heads up. > > > --- /dev/null > > +++ b/include/uapi/drm/virtgpu_drm.h > > @@ -0,0 +1,163 @@ > > > + > > +struct drm_virtgpu_3d_box { > > + uint32_t x, y, z; > > +

Re: [PATCH 5/5] virtgpu: mark as a render gpu

2015-09-10 Thread Gerd Hoffmann
Hi, > > Dave? Looking at the ioctls they are all fine for render nodes, there > > isn't anything modesetting related in the device-specific ioctls. > > > > Correct? > > > Unless I've overdone the coffee this time - modesetting is done via > the card# node, while render via either card# or rende

Re: [PATCH 5/5] virtgpu: mark as a render gpu

2015-09-11 Thread Gerd Hoffmann
On Fr, 2015-09-11 at 16:32 +1000, Dave Airlie wrote: > doh, yes we need to add DRM_RENDER_ALLOW to the ioctls, can you do > that? Done. cheers, Gerd ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundat

[PATCH v2 1/6] virtio-gpu: add virtio_gpu_queue_ctrl_buffer_locked

2015-09-21 Thread Gerd Hoffmann
Add virtio_gpu_queue_ctrl_buffer_locked function, which does the same as virtio_gpu_queue_ctrl_buffer but does not take the virtqueue lock. The caller must hold the lock instead. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_vq.c | 17 + 1 file changed, 13

[PATCH v2 3/6] virtio-gpu: wait for cursor updates finish

2015-09-21 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_display.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index 4e160ef..97e5274 100644 --- a/drivers/gpu/drm/virtio/virtgpu_display.c +++ b

[PATCH v2 6/6] virtio-gpu: mark as a render gpu

2015-09-21 Thread Gerd Hoffmann
From: Dave Airlie Also add DRM_RENDER_ALLOW to the ioctls. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 18 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/virtio

[PATCH v2 4/6] virtio-gpu: add 3d/virgl support

2015-09-21 Thread Gerd Hoffmann
Add the bits needed for opengl rendering support: query capabilities, new virtio commands, drm ioctls. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/Makefile| 3 +- drivers/gpu/drm/virtio/virtgpu_drv.c | 10 + drivers/gpu/drm/virtio

[PATCH v2 2/6] virtio-gpu: add & use virtio_gpu_queue_fenced_ctrl_buffer

2015-09-21 Thread Gerd Hoffmann
Add helper function to handle the submission of fenced control requests. Make sure we initialize the fence while holding the virtqueue lock, so requests can't be reordered. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +- drivers/gpu/drm/virtio/virtgpu

[PATCH v2 5/6] virtio-gpu: add basic prime support

2015-09-21 Thread Gerd Hoffmann
From: Dave Airlie This is enough to enable DRI3. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/Makefile| 2 +- drivers/gpu/drm/virtio/virtgpu_drv.c | 13 +- drivers/gpu/drm/virtio/virtgpu_drv.h | 12 ++ drivers/gpu/drm/virtio

Re: [PATCH v2 4/6] virtio-gpu: add 3d/virgl support

2015-09-22 Thread Gerd Hoffmann
Hi, > > static unsigned int features[] = { > > +#ifdef __LITTLE_ENDIAN > > + VIRTIO_GPU_FEATURE_VIRGL, > > +#endif > > }; > > Why is virgl LE specific? Just curious. gallium command stream is native endian, and we only support little endian guests on little endian hosts for that reason. S

Re: [PATCH v2 5/6] virtio-gpu: add basic prime support

2015-09-22 Thread Gerd Hoffmann
> > +int virtgpu_gem_prime_mmap(struct drm_gem_object *obj, > > + struct vm_area_struct *area) > > +{ > > + WARN_ONCE(1, "not implemented"); > > + return ENOSYS; > > This can get called by userspace, so please don't WARN here. Also missing > negate sign: > > return -ENO

[PATCH v3 6/7] virtio-gpu: mark as a render gpu

2015-10-02 Thread Gerd Hoffmann
From: Dave Airlie Also add DRM_RENDER_ALLOW to the ioctls. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 18 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/virtio

[PATCH v3 3/7] virtio-gpu: wait for cursor updates finish

2015-10-02 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_display.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index 4e160ef..c9c1427 100644 --- a/drivers/gpu/drm/virtio/virtgpu_display.c

[PATCH v3 2/7] virtio-gpu: add & use virtio_gpu_queue_fenced_ctrl_buffer

2015-10-02 Thread Gerd Hoffmann
Add helper function to handle the submission of fenced control requests. Make sure we initialize the fence while holding the virtqueue lock, so requests can't be reordered. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +- drivers/gpu/drm/virtio/virtgpu

[PATCH v3 7/7] [wip] virtio-gpu: add page flip support

2015-10-02 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_display.c | 49 ++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index c9c1427..f545913 100644 --- a

[PATCH v3 1/7] virtio-gpu: add virtio_gpu_queue_ctrl_buffer_locked

2015-10-02 Thread Gerd Hoffmann
Add virtio_gpu_queue_ctrl_buffer_locked function, which does the same as virtio_gpu_queue_ctrl_buffer but does not take the virtqueue lock. The caller must hold the lock instead. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_vq.c | 17 + 1 file changed, 13

[PATCH v3 4/7] virtio-gpu: add 3d/virgl support

2015-10-02 Thread Gerd Hoffmann
Add the bits needed for opengl rendering support: query capabilities, new virtio commands, drm ioctls. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/Makefile| 3 +- drivers/gpu/drm/virtio/virtgpu_drv.c | 15 + drivers/gpu/drm/virtio

[PATCH v3 5/7] virtio-gpu: add basic prime support

2015-10-02 Thread Gerd Hoffmann
From: Dave Airlie This is enough to enable DRI3. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/Makefile| 2 +- drivers/gpu/drm/virtio/virtgpu_drv.c | 13 ++- drivers/gpu/drm/virtio/virtgpu_drv.h | 12 ++ drivers/gpu/drm/virtio

Re: [RFC] kvmtool: add support for modern virtio-pci

2015-11-18 Thread Gerd Hoffmann
On Mi, 2015-11-18 at 00:11 -0500, Sasha Levin wrote: > This is a first go at adding support for the modern (based on the 1.0 virtio > spec) virtio-pci implementation. > To sum it up: this is a lightly tested version for feedback about the design > and to weed out major bugs people notice. Feedback

Re: [RFC] kvmtool: add support for modern virtio-pci

2015-11-18 Thread Gerd Hoffmann
Hi, > Thanks for testing! I didn't even thing about seabios as a testing target. Not surprising, support isn't upstream, ran into a bunch of issues[1][2] last time I tried to combine the two, ran into some issues and nobody seemed to care, so the seabios patches where just sitting in a branch i

Re: [RFC] kvmtool: add support for modern virtio-pci

2015-11-18 Thread Gerd Hoffmann
On Mi, 2015-11-18 at 23:01 -0500, Sasha Levin wrote: > On 11/18/2015 11:00 PM, Sasha Levin wrote: > > Anyways, I debugged it for a bit a found that seabios attempts to write to > > the notification BAR, I look further tomorrow to narrow it down and fix it. > > Err, *read*, obviously. > > I've nev

Re: [RFC] kvmtool: add support for modern virtio-pci

2015-11-19 Thread Gerd Hoffmann
Hi, > That was indeed the ISR field. Fixing that makes seabios reach the same point > as > legacy virtio before failing. > > I don't see the original correspondence about seabios failures you've > reported, if > you want to forward them over we can look at it further. It was a few months bac

Re: [PATCH v3 7/7] [wip] virtio-gpu: add page flip support

2016-05-27 Thread Gerd Hoffmann
On Mi, 2016-05-25 at 18:37 +0200, Daniel Vetter wrote: > On Fri, Oct 2, 2015 at 1:58 PM, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > > So I entirely missed this, but this isn't really how to implement > page_flip for an atomic driver. Working on some stu

Re: [PATCH] Add virtio gpu driver.

2016-05-27 Thread Gerd Hoffmann
red that one for the most part, see attached draft. The only thing I'm wondering is how the hotspot is handled. drm_mode_cursor_universal doesn't even look at req->hot_{x,y}. /me looks confused. cheers, Gerd From fb1d0700a46d850ec9f931304a9e99854a3ce5e9 Mon Sep 17 00:00:00 2001

[PATCH] virtio-gpu: fix output lookup

2016-05-30 Thread Gerd Hoffmann
Needed for multihead setups where we can have disabled outputs and therefore plane->crtc can be NULL. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_plane.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c

Re: [PATCH v3 7/7] [wip] virtio-gpu: add page flip support

2016-05-30 Thread Gerd Hoffmann
Hi, > > But I'll take you up on the implied offer to help out and test ;-) > > git://people.freedesktop.org/~danvet/drm stuff Tried that branch. > Would be really awesome if you could test this on virtio. Note that the > new nonblocking helpers require that your atomic backend gets the drm >

Re: [PATCH] Add virtio gpu driver.

2016-05-30 Thread Gerd Hoffmann
Hi, > - add a small core function to registerr HOT_X/HOT_Y for a (cursor) plane, > e.g. drm_plane_register_hotspot(). That should allocate the properties > (if they don't exist yet) and then attach those props to the cursor. We > don't want those props everywhere, but only on drivers that

Re: [PATCH v3 7/7] [wip] virtio-gpu: add page flip support

2016-05-30 Thread Gerd Hoffmann
Hi, > > https://lists.freedesktop.org/archives/dri-devel/2016-May/108772.html > > Hm, smells more like virtio isn't too happy with the default ordering of > the commit operation. The default is: > > - Disable any crtc/encoders that need to be disabled/change. > - Bash new plane setup into hw.

Re: [PATCH] Add virtio gpu driver.

2016-05-30 Thread Gerd Hoffmann
Hi, > > Why attach the hotspot to the plane? Wouldn't it make more sense to > > make it a framebuffer property? > > We don't have properties on the framebuffer. I guess you /could/ just add > it internally to struct drm_framebuffer, and not bother exposing to > userspace. I guess that would be

Re: [PATCH v3 7/7] [wip] virtio-gpu: add page flip support

2016-05-31 Thread Gerd Hoffmann
Hi, > > Right now the virtual outputs are linked to drm_crtc. To apply any > > changes I need to lookup the crtc to figure which virtual output should > > be updated. > > So, setting active_only should make sure I have a valid crtc pointer on > > plane updates, right? It probably also skips t

[PATCH 1/5] virtio-gpu: fix output lookup

2016-05-31 Thread Gerd Hoffmann
Needed for multihead setups where we can have disabled outputs and therefore plane->crtc can be NULL. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_plane.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c

[PATCH 2/5] virtio-gpu: add atomic_commit function

2016-05-31 Thread Gerd Hoffmann
Do modesets first, then call drm_atomic_helper_commit_planes with active_only = true. That way the outputs doesn't get disabled temporarly on atomic commits. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_display.c | 22 +- drivers/gpu/drm/v

[PATCH 3/5] virtio-gpu: switch to atomic cursor interfaces

2016-05-31 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_display.c | 102 -- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/virtio/virtgpu_plane.c | 105 --- 3 files changed, 109 insertions(+), 99 deletions

[PATCH 5/5] virtio-gpu: pick up hotspot from framebuffer

2016-05-31 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_plane.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index 4780354..b7778a7 100644 --- a/drivers/gpu/drm

[PATCH] virtio-gpu: use src not crtc

2016-05-31 Thread Gerd Hoffmann
Pick up the correct source rectangle from framebuffer. Without this multihead setups are not working correctly. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_plane.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/drivers

Re: [PATCH RESEND 06/14] drm/virtio: use drm_crtc_send_vblank_event()

2016-06-07 Thread Gerd Hoffmann
On Mo, 2016-06-06 at 11:41 -0300, Gustavo Padovan wrote: > From: Gustavo Padovan > > Replace the legacy drm_send_vblank_event() with the new helper function. > > Signed-off-by: Gustavo Padovan > --- > drivers/gpu/drm/virtio/virtgpu_display.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH] virtio-gpu: use src not crtc

2016-06-14 Thread Gerd Hoffmann
On Di, 2016-06-14 at 12:13 +0200, Marc-André Lureau wrote: > Hi > > On Tue, May 31, 2016 at 2:52 PM, Gerd Hoffmann wrote: > > Pick up the correct source rectangle from framebuffer. > > Without this multihead setups are not working correctly. > > > > Signed-off-by

[PATCH] virtio-gpu: fix vblank events

2016-10-13 Thread Gerd Hoffmann
virtio-gpu sends vblank events in virtio_gpu_crtc_atomic_flush, and because of that it must be called for disabled planes too. Ask drm_atomic_helper_commit_planes to do that. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1

<    4   5   6   7   8   9   10   11   12   >