[PATCH v4 09/16] drm/bochs: atomic: set DRIVER_ATOMIC

2019-01-16 Thread Gerd Hoffmann
Conversion to atomic modesetting, final step. Set the DRIVER_ATOMIC flag. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bochs

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

2019-01-16 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 Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_fbdev.c | 29

[PATCH v4 10/16] drm/bochs: remove old bochs_crtc_* functions

2019-01-16 Thread Gerd Hoffmann
Remove the old, now unused crtc callbacks. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 81 --- 1 file changed, 81 deletions(-) diff --git a/drivers/gpu/drm/bochs

[PATCH v4 08/16] drm/bochs: atomic: use suspend/resume helpers

2019-01-16 Thread Gerd Hoffmann
Switch to atomic helpers: drm_mode_config_helper_suspend/resume(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_drv.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index

[PATCH v4 15/16] drm/bochs: drop old fbdev emulation code

2019-01-16 Thread Gerd Hoffmann
Not needed any more, bochs uses the generic emulation now. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs.h | 9 --- drivers/gpu/drm/bochs/bochs_fbdev.c | 129 2 files

[PATCH 1/3] drm/qxl: add mode/framebuffer check functions

2019-01-16 Thread Gerd Hoffmann
-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 37 +++-- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 1f8fddcc34..07a37d52c4 100644 --- a/drivers/gpu/drm/qxl

[PATCH 3/3] drm/qxl: use kernel mode db

2019-01-16 Thread Gerd Hoffmann
Add all standard modes from the kernel's video mode data base. Keep a few non-standard modes in the qxl mode list. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 27 +++ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm

Re: [Spice-devel] [PATCH 1/3] drm/qxl: add mode/framebuffer check functions

2019-01-16 Thread Gerd Hoffmann
> > +static int qxl_check_mode(struct qxl_device *qdev, > > + unsigned int width, > > + unsigned int height) > > +{ > > + if (width * height * 4 > qdev->vram_size) > > Is someone checking for integer overflows already? Need to have a look. This is just

[PATCH 2/3] drm/qxl: add qxl_add_mode helper function

2019-01-16 Thread Gerd Hoffmann
Add a helper function to add custom video modes to a connector. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 84 +++ 1 file changed, 49 insertions(+), 35 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm

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

2019-01-16 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_drv.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index a3f4e21078..cea42ac64d 100644 --- a/drivers

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

2019-01-16 Thread Gerd Hoffmann
Conversion to atomic modesetting, step two. Add mode_set_nofb crtc helper callback. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v4 13/16] drm/bochs: add basic prime support

2019-01-16 Thread Gerd Hoffmann
Just enough to make the generic framebuffer emulation happy. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs.h | 7 ++ drivers/gpu/drm/bochs/bochs_drv.c | 11 - drivers/gpu/drm/bochs/bochs_mm.c | 49

[PATCH v4 02/16] drm/bochs: split bochs_hw_setmode

2019-01-16 Thread Gerd Hoffmann
Create a separate bochs_hw_setformat function to configure the framebuffer format (actually just the byteorder). Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs.h | 5 +++-- drivers/gpu/drm/bochs/bochs_hw.c | 19

[PATCH v4 01/16] drm/bochs: encoder cleanup

2019-01-16 Thread Gerd Hoffmann
Most unused callbacks can be NULL pointers these days. Drop a bunch of empty encoder callbacks. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 26 -- 1 file changed, 26 deletions

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

2019-01-16 Thread Gerd Hoffmann
Conversion to atomic modesetting, step five. Use atomic page_flip helper for crtc. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions

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

2019-01-16 Thread Gerd Hoffmann
Conversion to atomic modesetting, step four. Use atomic set_config helper for crtc. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

Re: [PATCH] drm/cirrus: fix connector leak at unload

2019-01-16 Thread Gerd Hoffmann
On Fri, Jan 11, 2019 at 11:16:38PM +0100, Daniel Vetter wrote: > On Fri, Jan 11, 2019 at 11:06:20PM +0100, Daniel Vetter wrote: > > On Fri, Jan 11, 2019 at 09:02:34AM -0500, Rob Clark wrote: > > > This fixes an '*ERROR* connector VGA-2 leaked!' splat at driver unload. > > > > > > Signed-off-by:

[PATCH v3 03/23] drm/qxl: simplify slot management

2019-01-18 Thread Gerd Hoffmann
Drop pointless indirection, remove the mem_slots array and index variables, drop dynamic allocation. Store memslots in qxl_device instead. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 15 + drivers/gpu/drm/qxl/qxl_kms.c | 72

[PATCH v3 06/23] drm/qxl: use separate offset spaces for the two slots / ttm memory types.

2019-01-18 Thread Gerd Hoffmann
Without that ttm offsets are not unique, they can refer to objects in both VRAM and PRIV memory (aka main and surfaces slot). One of those "why things didn't blow up without this" moments. Probably offset conflicts are rare enough by pure luck. Signed-off-by: Gerd Hoffmann --- drive

[PATCH v3 09/23] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for dumb gem objects

2019-01-18 Thread Gerd Hoffmann
dumb buffers are used as qxl surfaces, so allocate them as QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in PRIV ttm domain then, so this reduces VRAM memory pressure. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_dumb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v3 10/23] drm/qxl: move qxl_primary_apply_cursor to correct place

2019-01-18 Thread Gerd Hoffmann
The cursor must be set again after creating the primary surface. Also drop the error message. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm

[PATCH v3 05/23] drm/qxl: drop unused fields from struct qxl_device

2019-01-18 Thread Gerd Hoffmann
slot_id_bits and slot_gen_bits can be read directly from qxlrom instead. va_slot_mask is never used anywhere. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 3 --- drivers/gpu/drm/qxl/qxl_kms.c | 10 ++ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git

[PATCH v3 12/23] drm/qxl: track primary bo

2019-01-18 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/gpu/drm/qxl

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

2019-01-18 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 v3 17/23] drm/qxl: use generic fbdev emulation

2019-01-18 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 v3 23/23] drm/qxl: add overflow checks to qxl_mode_dumb_create()

2019-01-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_dumb.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_dumb.c b/drivers/gpu/drm/qxl/qxl_dumb.c index 272d19b677..bed6d06ee4 100644 --- a/drivers/gpu/drm/qxl/qxl_dumb.c +++ b/drivers

[PATCH v3 02/23] drm/qxl: drop unused qxl_fb_virtual_address

2019-01-18 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 v3 22/23] drm/qxl: use kernel mode db

2019-01-18 Thread Gerd Hoffmann
Add all standard modes from the kernel's video mode data base. Keep a few non-standard modes in the qxl mode list. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 27 +++ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v3 20/23] drm/qxl: add mode/framebuffer check functions

2019-01-18 Thread Gerd Hoffmann
-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 44 +++ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 9c751f01e3..fed2ea018d 100644 --- a/drivers/gpu/drm

[PATCH v3 01/23] drm/qxl: drop ttm_mem_reg arg from qxl_hw_surface_alloc()

2019-01-18 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 v3 07/23] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2019-01-18 Thread Gerd Hoffmann
qxl surfaces (used for framebuffers and gem objects) can live in both VRAM and PRIV ttm domains. Update placement setup to include both. Put PRIV first in the list so it is preferred, so VRAM will have more room for objects which must be allocated there. Signed-off-by: Gerd Hoffmann

[PATCH v3 08/23] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for shadow bo.

2019-01-18 Thread Gerd Hoffmann
The shadow bo is used as qxl surface, so allocate it as QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in PRIV ttm domain then, so this reduces VRAM memory pressure. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v3 21/23] drm/qxl: add qxl_add_mode helper function

2019-01-18 Thread Gerd Hoffmann
Add a helper function to add custom video modes to a connector. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 84 +++ 1 file changed, 49 insertions(+), 35 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm

[PATCH v3 16/23] drm/qxl: implement prime kmap/kunmap

2019-01-18 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/drm/qxl

[PATCH v3 04/23] drm/qxl: change the way slot is detected

2019-01-18 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 v3 11/23] drm/qxl: drop unused offset parameter from qxl_io_create_primary()

2019-01-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 1 - drivers/gpu/drm/qxl/qxl_cmd.c | 7 +++ drivers/gpu/drm/qxl/qxl_display.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index

[PATCH v3 15/23] drm/qxl: use qxl_num_crtc directly

2019-01-18 Thread Gerd Hoffmann
d 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/drm/qxl/qxl_

[PATCH v3 19/23] drm/qxl: implement qxl_gem_prime_(un)pin

2019-01-18 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_prime.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_prime.c b/drivers/gpu/drm/qxl/qxl_prime.c index 708378844c..22e1faf047 100644 --- a/drivers/gpu/drm/qxl/qxl_prime.c +++ b

[PATCH v3 13/23] drm/qxl: use shadow bo directly

2019-01-18 Thread Gerd Hoffmann
ing and the workflow in qxl_primary_atomic_update(). Signed-off-by: Gerd Hoffmann qxl_io_create/destroy_primary: primary_bo tracking [fixup] --- drivers/gpu/drm/qxl/qxl_cmd.c | 10 +- drivers/gpu/drm/qxl/qxl_display.c | 33 +++-- 2 files changed, 16 insertions(+),

[PATCH v3 14/23] drm/qxl: cover all crtcs in shadow bo.

2019-01-18 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 +- d

[PATCH v2 06/18] drm/qxl: use separate offset spaces for the two slots / ttm memory types.

2018-12-13 Thread Gerd Hoffmann
Without that ttm offsets are not unique, they can refer to objects in both VRAM and PRIV memory (aka main and surfaces slot). One of those "why things didn't blow up without this" moments. Probably offset conflicts are rare enough by pure luck. Signed-off-by: Gerd Hoffmann --- drive

[PATCH v2 08/18] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for shadow bo.

2018-12-13 Thread Gerd Hoffmann
The shadow bo is used as qxl surface, so allocate it as QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in PRIV ttm domain then, so this reduces VRAM memory pressure. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 05/18] drm/qxl: drop unused fields from struct qxl_device

2018-12-13 Thread Gerd Hoffmann
slot_id_bits and slot_gen_bits can be read directly from qxlrom instead. va_slot_mask is never used anywhere. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 3 --- drivers/gpu/drm/qxl/qxl_kms.c | 10 ++ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git

[PATCH v2 07/18] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2018-12-13 Thread Gerd Hoffmann
qxl surfaces (used for framebuffers and gem objects) can live in both VRAM and PRIV ttm domains. Update placement setup to include both. Put PRIV first in the list so it is preferred, so VRAM will have more room for objects which must be allocated there. Signed-off-by: Gerd Hoffmann

[PATCH v2 10/18] drm/qxl: move qxl_primary_apply_cursor to correct place

2018-12-13 Thread Gerd Hoffmann
The cursor must be set again after creating the primary surface. Also drop the error message. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm

[PATCH v2 09/18] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for dumb gem objects

2018-12-13 Thread Gerd Hoffmann
dumb buffers are used as qxl surfaces, so allocate them as QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in PRIV ttm domain then, so this reduces VRAM memory pressure. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_dumb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[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 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 13/18] drm/qxl: use shadow bo directly

2018-12-13 Thread Gerd Hoffmann
ing and 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 15/18] drm/qxl: use qxl_num_crtc directly

2018-12-14 Thread Gerd Hoffmann
d 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/drm/qxl/qxl_

[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 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/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 11/18] drm/qxl: drop unused offset parameter from qxl_io_create_primary()

2018-12-13 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 1 - drivers/gpu/drm/qxl/qxl_cmd.c | 7 +++ drivers/gpu/drm/qxl/qxl_display.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index

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

[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 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 v2 03/18] drm/qxl: simplify slot management

2018-12-13 Thread Gerd Hoffmann
Drop pointless indirection, remove the mem_slots array and index variables, drop dynamic allocation. Store memslots in qxl_device instead. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 15 + drivers/gpu/drm/qxl/qxl_kms.c | 72

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

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

[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/drm/qxl

[PATCH 6/6] drm/qxl: use qxl_num_crtc directly

2018-11-28 Thread Gerd Hoffmann
Skip the pointless and slightly confusing indirection via qdev->monitors_config->max_allowed. Just use qxl_num_crtc instead. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff

[PATCH 2/6] drm/qxl: drop unused offset parameter from qxl_io_create_primary()

2018-11-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 1 - drivers/gpu/drm/qxl/qxl_cmd.c | 7 +++ drivers/gpu/drm/qxl/qxl_display.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index

[PATCH 1/6] drm/qxl: move qxl_primary_apply_cursor to correct place

2018-11-28 Thread Gerd Hoffmann
The cursor must be set again after creating the primary surface. Also drop the error message. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm

[PATCH 3/6] drm/qxl: track primary bo

2018-11-28 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/gpu/drm/qxl

[PATCH 4/6] drm/qxl: use shadow bo directly

2018-11-28 Thread Gerd Hoffmann
ing and 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 | 29 - 2 files changed, 11 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/driv

[PATCH 5/6] drm/qxl: cover all crtcs in shadow bo.

2018-11-28 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 +- d

[PATCH 3/3] drm/virtio: drop virtio_gpu_fence_cleanup()

2018-12-05 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 1/3] drm/virtio: log error responses

2018-12-05 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 2/3] drm/virtio: fix pageflip flush

2018-12-05 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 3/3] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for dumb gem objects

2018-12-06 Thread Gerd Hoffmann
dumb buffers are used as qxl surfaces, so allocate them as QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in PRIV ttm domain then, so this reduces VRAM memory pressure. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_dumb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 2/3] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for shadow bo.

2018-12-06 Thread Gerd Hoffmann
The shadow bo is used as qxl surface, so allocate it as QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in PRIV ttm domain then, so this reduces VRAM memory pressure. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 1/3] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2018-12-06 Thread Gerd Hoffmann
qxl surfaces (used for framebuffers and gem objects) can live in both VRAM and PRIV ttm domains. Update placement setup to include both. Put PRIV first in the list so it is preferred, so VRAM will have more room for objects which must be allocated there. Signed-off-by: Gerd Hoffmann

[PATCH] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Gerd Hoffmann
Just use qxl_num_crtc directly everywhere instead of using qdev->monitors_config->max_allowed. Drops pointless indirection and also is less confusing. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 21 + 1 file changed, 9 insertions(+), 12 del

Re: [Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Gerd Hoffmann
On Thu, Dec 06, 2018 at 07:53:10AM -0500, Frediano Ziglio wrote: > > > > On Thu, Dec 06, 2018 at 05:59:25AM -0500, Frediano Ziglio wrote: > > > > > > > > Just use qxl_num_crtc directly everywhere instead of using > > > > qdev->monitors_config->max_allowed. Drops pointless indirection > > > >

Re: [Spice-devel] [PATCH 1/3] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2018-12-06 Thread Gerd Hoffmann
M will have more room > > for objects which must be allocated there. > > > > Signed-off-by: Gerd Hoffmann > > I remember these kind of changes in the past made migration > fails. I proposed similar patches years ago and they were rejected > for these reasons.

Re: [Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Gerd Hoffmann
On Thu, Dec 06, 2018 at 05:59:25AM -0500, Frediano Ziglio wrote: > > > > Just use qxl_num_crtc directly everywhere instead of using > > qdev->monitors_config->max_allowed. Drops pointless indirection > > and also is less confusing. > > > > To me is MORE confusing, why comparing number of

Re: [Spice-devel] [PATCH 1/3] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2018-12-07 Thread Gerd Hoffmann
ains. Update placement setup to include both. Put > > > > PRIV first in the list so it is preferred, so VRAM will have more room > > > > for objects which must be allocated there. > > > > > > > > Signed-off-by: Gerd Hoffmann > > > >

Re: [PATCH 5/7] drm/qxl: Don't set the dpms hook

2018-12-10 Thread Gerd Hoffmann
On Mon, Dec 10, 2018 at 11:03:57AM +0100, Daniel Vetter wrote: > Doesn't do anything with atomic. > > Signed-off-by: Daniel Vetter > Cc: Dave Airlie > Cc: Gerd Hoffmann > Cc: virtualization@lists.linux-foundation.org > Cc: spice-de...@lists.freedesktop.org > --

Re: [Spice-devel] [PATCH] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Gerd Hoffmann
> > qdev->monitors_config->max_allowed is effectively set by a module > > parameter. So using the module parameter variable qxl_num_crtc > > directly is better IMO. The kernel doesn't need to dereference pointers > > each time it needs the value, and when reading the code you don't have > > to

[PATCH v2] drm/qxl: use qxl_num_crtc directly

2018-12-06 Thread Gerd Hoffmann
d 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 | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.

Re: [PATCH -next] drm/cirrus: Remove set but not used variable 'bo'

2018-11-21 Thread Gerd Hoffmann
On Thu, Nov 15, 2018 at 12:10:36PM +, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/gpu/drm/cirrus/cirrus_fbdev.c: In function 'cirrusfb_create': > drivers/gpu/drm/cirrus/cirrus_fbdev.c:172:20: warning: > variable 'bo' set but not used

Re: [PATCH v4 2/2] drm/virtio: add edid support

2018-11-21 Thread Gerd Hoffmann
On Tue, Oct 30, 2018 at 10:38:04AM +0100, Daniel Vetter wrote: > On Tue, Oct 30, 2018 at 07:32:06AM +0100, Gerd Hoffmann wrote: > > linux guest driver implementation of the VIRTIO_GPU_F_EDID feature. > > > > Signed-off-by: Gerd Hoffmann > > Like with bochs, I t

[PATCH 1/2] drm/virtio: fence: pass plain pointer

2018-11-28 Thread Gerd Hoffmann
Since commit "9fdd90c0f4 drm/virtio: add virtio_gpu_alloc_fence()" fences are not allocated any more by virtio_gpu_fence_emit(). So there is no need to pass down a reference to the fence pointer, a plain pointer is enough now. Convert virtio_gpu_fence_emit() and callers. Signed-of

[PATCH 2/2] drm/virtio: virtio_gpu_cmd_resource_create_3d: drop unused fence arg

2018-11-28 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 3 +-- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 2 +- drivers/gpu/drm/virtio/virtgpu_vq.c| 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm

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

2019-01-08 Thread Gerd Hoffmann
It's always NULL, so just remove it. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko --- 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

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

2019-01-08 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 Reviewed-by: Oleksandr Andrushchenko --- drivers/gpu

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

2019-01-08 Thread Gerd Hoffmann
Not needed any more, bochs uses the generic emulation now. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko --- drivers/gpu/drm/bochs/bochs.h | 9 --- drivers/gpu/drm/bochs/bochs_drv.c | 6 -- drivers/gpu/drm/bochs/bochs_fbdev.c | 137

[PATCH v2 08/15] drm/bochs: atomic: set DRIVER_ATOMIC

2019-01-08 Thread Gerd Hoffmann
Conversion to atomic modesetting, final step. Set the DRIVER_ATOMIC flag. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko --- 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

[PATCH v2 02/15] drm/bochs: split bochs_hw_setmode

2019-01-08 Thread Gerd Hoffmann
Create a separate bochs_hw_setformat function to configure the framebuffer format (actually just the byteorder). Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko --- drivers/gpu/drm/bochs/bochs.h | 5 +++-- drivers/gpu/drm/bochs/bochs_hw.c | 19

[PATCH v2 01/15] drm/bochs: encoder cleanup

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

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

2019-01-08 Thread Gerd Hoffmann
Conversion to atomic modesetting, step four. Use atomic set_config helper for crtc. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko --- 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

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

2019-01-08 Thread Gerd Hoffmann
Generic framebuffer emulation needs this. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko --- drivers/gpu/drm/bochs/bochs.h | 11 +++ drivers/gpu/drm/bochs/bochs_drv.c | 15 +- drivers/gpu/drm/bochs/bochs_mm.c | 63 +++ 3

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

2019-01-08 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_drv.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index a9c7140e3b..350e34cf2c 100644 --- a/drivers/gpu/drm/bochs/bochs_drv.c +++ b

[PATCH v2 15/15] drm/bochs: reserve bo for pin/unpin

2019-01-08 Thread Gerd Hoffmann
The buffer object must be reserved before calling ttm_bo_validate for pinning/unpinning. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_mm.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c index

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

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

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

2019-01-08 Thread Gerd Hoffmann
Remove the old, now unused crtc callbacks. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko --- 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

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

2019-01-08 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 Reviewed-by: Oleksandr Andrushchenko --- drivers/gpu/drm/bochs/bochs_fbdev.c | 29 - drivers/gpu/drm

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

2019-01-08 Thread Gerd Hoffmann
Conversion to atomic modesetting, step two. Add mode_set_nofb crtc helper callback. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko --- 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

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

2019-01-10 Thread Gerd Hoffmann
Conversion to atomic modesetting, step four. Use atomic set_config helper for crtc. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH v3 01/15] drm/bochs: encoder cleanup

2019-01-10 Thread Gerd Hoffmann
Most unused callbacks can be NULL pointers these days. Drop a bunch of empty encoder callbacks. Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 26 -- 1 file changed, 26 deletions

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