Patch "qxl: alloc & use shadow for dumb buffers" has been added to the 4.14-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
qxl: alloc & use shadow for dumb buffers
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
qxl-alloc-use-shadow-for-dumb-buffers.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
62676d10b483a2ff6e8b08c5e7c7d63a831343f5Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <[email protected]>
Date: Thu, 19 Oct 2017 08:21:50 +0200
Subject: qxl: alloc & use shadow for dumb buffers
From: Gerd Hoffmann <[email protected]>
commit 62676d10b483a2ff6e8b08c5e7c7d63a831343f5 upstream.
This patch changes the way the primary surface is used for dumb framebuffers. Instead of configuring the bo itself as primary surface a shadow bo is created and used instead. Framebuffers can share the shadow bo in case they have the same format and resolution.
On atomic plane updates we don't have to update the primary surface in case we pageflip from one framebuffer to another framebuffer which shares the same shadow. This in turn avoids the flicker caused by the primary-destroy + primary-create cycle, which is very annonying when running wayland on qxl.
The qxl driver never actually writes to the shadow bo. It sends qxl blit commands which update it though, and the spice server might actually execute them (and thereby write to the shadow) in case the local rendering is kicked for some reason. This happens for example in case qemu is asked to write out a dump of the guest display (screendump monitor command).
--- drivers/gpu/drm/qxl/qxl_cmd.c | 6 +++- drivers/gpu/drm/qxl/qxl_display.c | 49 +++++++++++++++++++++++++++++++++++--- drivers/gpu/drm/qxl/qxl_drv.h | 2 + drivers/gpu/drm/qxl/qxl_dumb.c | 1 4 files changed, 54 insertions(+), 4 deletions(-)
drivers/gpu/drm/qxl/qxl_cmd.c +5 -1
@@ -388,7 +388,11 @@ void qxl_io_create_primary(struct qxl_de create->width = bo->surf.width; create->height = bo->surf.height; create->stride = bo->surf.stride; - create->mem =qxl_bo_physical_address (qdev, bo, offset); +if (bo->shadow) { + create->mem =qxl_bo_physical_address (qdev, bo->shadow, offset); + }else { + create->mem =qxl_bo_physical_address (qdev, bo, offset); + }QXL_INFO (qdev,"%s: mem = %llx, from %p\n" , __func__, create->mem, bo->kptr);
drivers/gpu/drm/qxl/qxl_display.c +46 -3
94 lines not on this page · raw message
drivers/gpu/drm/qxl/qxl_drv.h +2 -0
@@ -113,6 +113,8 @@ struct qxl_bo {/* Constant after initialization */ struct drm_gem_object gem_base;bool is_primary;/* is this now a primary surface */ +bool is_dumb; +struct qxl_bo *shadow;bool hw_surf_alloc;struct qxl_surface surf;uint32_t surface_id;
drivers/gpu/drm/qxl/qxl_dumb.c +1 -0
@@ -63,6 +63,7 @@ int qxl_mode_dumb_create(struct drm_file &handle);if (r)return r; + qobj->is_dumb = true; args->pitch = pitch; args->handle = handle;return 0 ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/drm-qxl-reapply-cursor-after-resetting-primary.patch queue-4.14/qxl-alloc-use-shadow-for-dumb-buffers.patch