[PATCH] modesetting: [v2] Don't re-enable the cursor when loading the image
Michel Dänzer
michel at daenzer.net
Wed Dec 17 23:54:01 PST 2014
On 18.12.2014 02:26, Keith Packard wrote:
> Hidden cursors also have their image updated; re-enabling the cursor
> each time the image is set will cause it to re-appear.
>
> * Unifies the code that was in drmmode_load_cursor_argb and
> drm_mode_show_cursor and moves it to a new drmmode_set_cursor
>
> * Add a new boolean, 'cursor_up', to the per-crtc
> private data to track whether the cursor should be displayed.
>
> * Call drmmode_set_cursor from drm_mode_show_cursor and, if
> the cursor should be displayed, from drm_mode_load_cursor_argb.
>
> v2: Call drmModeSetCursor2 when loading a new cursor image if the
> cursor should be displayed.
>
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
> hw/xfree86/drivers/modesetting/drmmode_display.c | 76 +++++++++++++-----------
> hw/xfree86/drivers/modesetting/drmmode_display.h | 1 +
> 2 files changed, 41 insertions(+), 36 deletions(-)
>
> diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
> index 13a96dc..d4782ef 100644
> --- a/hw/xfree86/drivers/modesetting/drmmode_display.c
> +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
> @@ -394,25 +394,31 @@ drmmode_set_cursor_position(xf86CrtcPtr crtc, int x, int y)
> }
>
> static void
> -drmmode_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *image)
> -{
> - modesettingPtr ms = modesettingPTR(crtc->scrn);
> +drmmode_set_cursor(xf86CrtcPtr crtc) {
Opening curly brace goes on separate line.
With that fixed,
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the xorg-devel
mailing list