Patch "drm/qxl: fix cursor position with non-zero hotspot" has been added to the 4.4-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
drm/qxl: fix cursor position with non-zero hotspot
to the 4.4-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:
drm-qxl-fix-cursor-position-with-non-zero-hotspot.patch
and it can be found in the queue-4.4 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
d59a1f71ff1aeda4b4630df92d3ad4e3b1dfc885Mon Sep 17 00:00:00 2001
From: John Keeping <[email protected]>
Date: Wed, 18 Nov 2015 11:17:25 +0000
Subject: drm/qxl: fix cursor position with non-zero hotspot
From: John Keeping <[email protected]>
commit d59a1f71ff1aeda4b4630df92d3ad4e3b1dfc885 upstream.
The SPICE protocol considers the position of a cursor to be the location of its active pixel on the display, so the cursor is drawn with its top-left corner at "(x - hot_spot_x, y - hot_spot_y)" but the DRM cursor position gives the location where the top-left corner should be drawn, with the hotspot being a hint for drivers that need it.
This fixes the location of the window resize cursors when using Fluxbox with the QXL DRM driver and both the QXL and modesetting X drivers.
--- drivers/gpu/drm/qxl/qxl_display.c | 13 +++++++++---- drivers/gpu/drm/qxl/qxl_drv.h | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-)
drivers/gpu/drm/qxl/qxl_display.c +9 -4
@@ -375,10 +375,15 @@ static int qxl_crtc_cursor_set2(struct dqxl_bo_kunmap (user_bo); + qcrtc->cur_x += qcrtc->hot_spot_x - hot_x; + qcrtc->cur_y += qcrtc->hot_spot_y - hot_y; + qcrtc->hot_spot_x = hot_x; + qcrtc->hot_spot_y = hot_y; + cmd = (struct qxl_cursor_cmd *)qxl_release_map (qdev, release); cmd->type =QXL_CURSOR_SET ; - cmd->u.set.position.x = qcrtc->cur_x; - cmd->u.set.position.y = qcrtc->cur_y; + cmd->u.set.position.x = qcrtc->cur_x + qcrtc->hot_spot_x; + cmd->u.set.position.y = qcrtc->cur_y + qcrtc->hot_spot_y; cmd->u.set.shape =qxl_bo_physical_address (qdev, cursor_bo,0 );
@@ -441,8 +446,8 @@ static int qxl_crtc_cursor_move(struct d cmd = (struct qxl_cursor_cmd *)qxl_release_map (qdev, release); cmd->type =QXL_CURSOR_MOVE ; - cmd->u.position.x = qcrtc->cur_x; - cmd->u.position.y = qcrtc->cur_y; + cmd->u.position.x = qcrtc->cur_x + qcrtc->hot_spot_x; + cmd->u.position.y = qcrtc->cur_y + qcrtc->hot_spot_y;qxl_release_unmap (qdev, release, &cmd->release_info);qxl_push_cursor_ring_release (qdev, release,QXL_CMD_CURSOR , false);
drivers/gpu/drm/qxl/qxl_drv.h +2 -0
@@ -135,6 +135,8 @@ struct qxl_crtc {int index;int cur_x;int cur_y; +int hot_spot_x; +int hot_spot_y; };struct qxl_output {
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/drm-qxl-fix-cursor-position-with-non-zero-hotspot.patch