Magellan Linux

Contents of /trunk/xorg-server/patches/xorg-server-1.17.1-modesetting-fix-software-cursor-fallback.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2576 - (show annotations) (download)
Mon Jun 15 13:02:17 2015 UTC (8 years, 11 months ago) by niro
File size: 1635 byte(s)
-fixed garbage patches
1 From 63e4f22d5fe3d4247cb48c969b5f7f2690665d78 Mon Sep 17 00:00:00 2001
2 From: Adel Gadllah <adel.gadllah@gmail.com>
3 Date: Fri, 1 May 2015 17:21:12 +0200
4 Subject: [PATCH] modesetting: Fix software cursor fallback
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 The code in drmmode_set_cursor does not properly handle the case where
10 drmModeSetCursor2 returns any other error than EINVAL and silently fails to set
11 a cursor.
12
13 So only return when the drmModeSetCursor2 succeeds (i.e returns 0) and disable
14 the cursor2 usage on EINVAL.
15
16 References: https://bugzilla.redhat.com/show_bug.cgi?id=1205725
17 Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
18 Reviewed-by: Michel Dänzer <michel@daenzer.net>
19 ---
20 hw/xfree86/drivers/modesetting/drmmode_display.c | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
22
23 diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
24 index 824500b..912abda 100644
25 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c
26 +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
27 @@ -396,10 +396,10 @@ drmmode_set_cursor(xf86CrtcPtr crtc)
28 drmModeSetCursor2(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
29 handle, ms->cursor_width, ms->cursor_height,
30 cursor->bits->xhot, cursor->bits->yhot);
31 + if (!ret)
32 + return;
33 if (ret == -EINVAL)
34 use_set_cursor2 = FALSE;
35 - else
36 - return;
37 }
38
39 ret = drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle,
40 --
41 2.1.0
42