Hi,
On 07-09-16 03:34, Michel Dänzer wrote:
On 06/09/16 08:31 PM, Hans De Goede wrote:
When a slave-output is rotated the transformation is done on the blit
from master to slave GPU, so crtc->transform_in_use is not set, but we
still need to adjust the mouse position for things to work.
[...]
+static void
+xf86_crtc_transform_gpu_cursor_position(xf86CrtcPtr crtc, int *x, int *y)
+{
+ ScrnInfoPtr scrn = crtc->scrn;
+ ScreenPtr screen = scrn->pScreen;
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
+ xf86CursorScreenPtr ScreenPriv =
+ (xf86CursorScreenPtr) dixLookupPrivate(&screen->devPrivates,
+ xf86CursorScreenKey);
+ int dx, dy;
+
+ *x = *x - crtc->x + ScreenPriv->HotX;
+ *y = *y - crtc->y + ScreenPriv->HotY;
+
+ xf86_crtc_rotate_coord_back(crtc->rotation, crtc->mode.HDisplay,
+ crtc->mode.VDisplay, *x, *y, x, y);
As discussed in the review of patch 5, I'm afraid you may not be able to
use xf86_crtc_rotate_coord_back here, though actually I'm not sure why
it wouldn't work as is? What's the problem?
The problem is that when rotating 90 / 270 degrees it gives
back the wrong coordinates, because xf86_crtc_rotate_coord_back
really does need patch 5 to do the right thing, see my
reply to patch 5.
Patches 1, 2, 4 & 7 are
Reviewed-by: Michel Dänzer <michel.daen...@amd.com>
Thank you for the review! I'll do a v6
addressing the issue you correctly pointed out in patch 3.
Regards,
Hans
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel