From de1becf4e6fef4f4af7ddcce36b218eb8b97e953 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sat, 12 Dec 2020 09:31:01 +0000 Subject: Update X server to version 1.20.10. Tested by jsg@ and naddy@ --- xserver/hw/xfree86/Makefile.in | 1 + xserver/hw/xfree86/common/Makefile.in | 1 + xserver/hw/xfree86/ddc/Makefile.in | 1 + xserver/hw/xfree86/ddc/edid.h | 17 +- xserver/hw/xfree86/ddc/interpret_edid.c | 27 +++ xserver/hw/xfree86/ddc/xf86DDC.h | 3 + xserver/hw/xfree86/dixmods/Makefile.in | 1 + xserver/hw/xfree86/doc/Makefile.in | 1 + xserver/hw/xfree86/dri/Makefile.in | 1 + xserver/hw/xfree86/dri2/Makefile.in | 1 + xserver/hw/xfree86/dri2/pci_ids/Makefile.in | 1 + xserver/hw/xfree86/drivers/Makefile.in | 1 + xserver/hw/xfree86/drivers/modesetting/Makefile.in | 1 + xserver/hw/xfree86/drivers/modesetting/dri2.c | 1 + xserver/hw/xfree86/drivers/modesetting/driver.c | 49 ++++- xserver/hw/xfree86/drivers/modesetting/driver.h | 1 + .../xfree86/drivers/modesetting/drmmode_display.c | 225 ++++++++++++++------- .../xfree86/drivers/modesetting/drmmode_display.h | 16 +- xserver/hw/xfree86/drivers/modesetting/present.c | 33 ++- xserver/hw/xfree86/exa/Makefile.in | 1 + xserver/hw/xfree86/exa/man/Makefile.in | 1 + xserver/hw/xfree86/fbdevhw/Makefile.in | 1 + xserver/hw/xfree86/fbdevhw/man/Makefile.in | 1 + xserver/hw/xfree86/glamor_egl/Makefile.in | 1 + xserver/hw/xfree86/i2c/Makefile.in | 1 + xserver/hw/xfree86/int10/Makefile.in | 1 + xserver/hw/xfree86/loader/Makefile.in | 1 + xserver/hw/xfree86/man/Makefile.in | 1 + xserver/hw/xfree86/man/Xorg.man | 8 +- xserver/hw/xfree86/man/xorg.conf.man | 2 +- xserver/hw/xfree86/modes/Makefile.in | 1 + xserver/hw/xfree86/modes/xf86Crtc.c | 3 +- xserver/hw/xfree86/os-support/Makefile.in | 1 + xserver/hw/xfree86/os-support/bsd/Makefile.in | 1 + xserver/hw/xfree86/os-support/bus/Makefile.in | 1 + xserver/hw/xfree86/os-support/hurd/Makefile.in | 1 + xserver/hw/xfree86/os-support/linux/Makefile.in | 1 + xserver/hw/xfree86/os-support/misc/Makefile.in | 1 + xserver/hw/xfree86/os-support/solaris/Makefile.in | 1 + xserver/hw/xfree86/os-support/stub/Makefile.in | 1 + xserver/hw/xfree86/parser/Makefile.in | 1 + xserver/hw/xfree86/ramdac/Makefile.in | 1 + xserver/hw/xfree86/ramdac/xf86CursorRD.c | 6 +- xserver/hw/xfree86/shadowfb/Makefile.in | 1 + xserver/hw/xfree86/utils/Makefile.in | 1 + xserver/hw/xfree86/utils/cvt/Makefile.in | 1 + xserver/hw/xfree86/utils/gtf/Makefile.in | 1 + xserver/hw/xfree86/utils/man/Makefile.in | 1 + xserver/hw/xfree86/vbe/Makefile.in | 1 + xserver/hw/xfree86/vgahw/Makefile.in | 1 + xserver/hw/xfree86/x86emu/Makefile.in | 1 + xserver/hw/xfree86/xkb/Makefile.in | 1 + 52 files changed, 333 insertions(+), 97 deletions(-) (limited to 'xserver/hw/xfree86') diff --git a/xserver/hw/xfree86/Makefile.in b/xserver/hw/xfree86/Makefile.in index 2f9e20d7b..ac7e28c82 100644 --- a/xserver/hw/xfree86/Makefile.in +++ b/xserver/hw/xfree86/Makefile.in @@ -528,6 +528,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/common/Makefile.in b/xserver/hw/xfree86/common/Makefile.in index 08aeea9d0..b7ae230d6 100644 --- a/xserver/hw/xfree86/common/Makefile.in +++ b/xserver/hw/xfree86/common/Makefile.in @@ -535,6 +535,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/ddc/Makefile.in b/xserver/hw/xfree86/ddc/Makefile.in index 404505db4..0313080c4 100644 --- a/xserver/hw/xfree86/ddc/Makefile.in +++ b/xserver/hw/xfree86/ddc/Makefile.in @@ -502,6 +502,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/ddc/edid.h b/xserver/hw/xfree86/ddc/edid.h index 750e4270b..b884d8212 100644 --- a/xserver/hw/xfree86/ddc/edid.h +++ b/xserver/hw/xfree86/ddc/edid.h @@ -262,6 +262,10 @@ #define MAX_H (_MAX_H(c) + _MAX_H_OFFSET(c)) #define _MAX_CLOCK(x) x[9] #define MAX_CLOCK _MAX_CLOCK(c) +#define _DEFAULT_GTF(x) (x[10] == 0x00) +#define DEFAULT_GTF _DEFAULT_GTF(c) +#define _RANGE_LIMITS_ONLY(x) (x[10] == 0x01) +#define RANGE_LIMITS_ONLY _RANGE_LIMITS_ONLY(c) #define _HAVE_2ND_GTF(x) (x[10] == 0x02) #define HAVE_2ND_GTF _HAVE_2ND_GTF(c) #define _F_2ND_GTF(x) (x[12] * 2) @@ -477,6 +481,16 @@ struct detailed_timings { #define DS_VENDOR 0x101 #define DS_VENDOR_MAX 0x110 +/* + * Display range limit Descriptor of EDID version1, reversion 4 + */ +typedef enum { + DR_DEFAULT_GTF, + DR_LIMITS_ONLY, + DR_SECONDARY_GTF, + DR_CVT_SUPPORTED = 4, +} DR_timing_flags; + struct monitor_ranges { int min_v; int max_v; @@ -495,6 +509,7 @@ struct monitor_ranges { char supported_blanking; char supported_scaling; int preferred_refresh; /* in hz */ + DR_timing_flags display_range_timing_flags; }; struct whitePoints { @@ -524,7 +539,7 @@ struct detailed_monitor_section { Uchar serial[13]; Uchar ascii_data[13]; Uchar name[13]; - struct monitor_ranges ranges; /* 56 */ + struct monitor_ranges ranges; /* 60 */ struct std_timings std_t[5]; /* 80 */ struct whitePoints wp[2]; /* 32 */ /* color management data */ diff --git a/xserver/hw/xfree86/ddc/interpret_edid.c b/xserver/hw/xfree86/ddc/interpret_edid.c index 17a8f81c0..19630471c 100644 --- a/xserver/hw/xfree86/ddc/interpret_edid.c +++ b/xserver/hw/xfree86/ddc/interpret_edid.c @@ -672,6 +672,9 @@ get_monitor_ranges(Uchar * c, struct monitor_ranges *r) r->max_clock = 0; if (MAX_CLOCK != 0xff) /* is specified? */ r->max_clock = MAX_CLOCK * 10 + 5; + + r->display_range_timing_flags = c[10]; + if (HAVE_2ND_GTF) { r->gtf_2nd_f = F_2ND_GTF; r->gtf_2nd_c = C_2ND_GTF; @@ -751,6 +754,30 @@ validate_version(int scrnIndex, struct edid_version *r) return TRUE; } +Bool +gtf_supported(xf86MonPtr mon) +{ + int i; + + if (!mon) + return FALSE; + + if ((mon->ver.version == 1) && (mon->ver.revision < 4)) { + if (mon->features.msc & 0x1) + return TRUE; + } else { + for (i = 0; i < DET_TIMINGS; i++) { + struct detailed_monitor_section *det_timing_des = &(mon->det_mon[i]); + if (det_timing_des && (det_timing_des->type == DS_RANGES) && + (det_timing_des->section.ranges.display_range_timing_flags == DR_DEFAULT_GTF + || det_timing_des->section.ranges.display_range_timing_flags == DR_SECONDARY_GTF)) + return TRUE; + } + } + + return FALSE; +} + /* * Returns true if HDMI, false if definitely not or unknown. */ diff --git a/xserver/hw/xfree86/ddc/xf86DDC.h b/xserver/hw/xfree86/ddc/xf86DDC.h index 7d81ab911..6eb2f0ba2 100644 --- a/xserver/hw/xfree86/ddc/xf86DDC.h +++ b/xserver/hw/xfree86/ddc/xf86DDC.h @@ -48,6 +48,9 @@ extern _X_EXPORT Bool xf86SetDDCproperties(ScrnInfoPtr pScreen, xf86MonPtr DDC); extern _X_EXPORT Bool xf86MonitorIsHDMI(xf86MonPtr mon); +extern _X_EXPORT Bool +gtf_supported(xf86MonPtr mon); + extern _X_EXPORT DisplayModePtr FindDMTMode(int hsize, int vsize, int refresh, Bool rb); diff --git a/xserver/hw/xfree86/dixmods/Makefile.in b/xserver/hw/xfree86/dixmods/Makefile.in index 151dc7312..9c2f290aa 100644 --- a/xserver/hw/xfree86/dixmods/Makefile.in +++ b/xserver/hw/xfree86/dixmods/Makefile.in @@ -542,6 +542,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/doc/Makefile.in b/xserver/hw/xfree86/doc/Makefile.in index 9dd621cda..8a330179e 100644 --- a/xserver/hw/xfree86/doc/Makefile.in +++ b/xserver/hw/xfree86/doc/Makefile.in @@ -460,6 +460,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/dri/Makefile.in b/xserver/hw/xfree86/dri/Makefile.in index 4a1f66e84..f328e6871 100644 --- a/xserver/hw/xfree86/dri/Makefile.in +++ b/xserver/hw/xfree86/dri/Makefile.in @@ -501,6 +501,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/dri2/Makefile.in b/xserver/hw/xfree86/dri2/Makefile.in index 7c8052de3..34eedfcaa 100644 --- a/xserver/hw/xfree86/dri2/Makefile.in +++ b/xserver/hw/xfree86/dri2/Makefile.in @@ -539,6 +539,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/dri2/pci_ids/Makefile.in b/xserver/hw/xfree86/dri2/pci_ids/Makefile.in index 3e19f7a56..e4aa7ca71 100644 --- a/xserver/hw/xfree86/dri2/pci_ids/Makefile.in +++ b/xserver/hw/xfree86/dri2/pci_ids/Makefile.in @@ -437,6 +437,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/drivers/Makefile.in b/xserver/hw/xfree86/drivers/Makefile.in index 3bb4abea7..5070fce6e 100644 --- a/xserver/hw/xfree86/drivers/Makefile.in +++ b/xserver/hw/xfree86/drivers/Makefile.in @@ -478,6 +478,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/drivers/modesetting/Makefile.in b/xserver/hw/xfree86/drivers/modesetting/Makefile.in index 54f1779dc..aaa95a521 100644 --- a/xserver/hw/xfree86/drivers/modesetting/Makefile.in +++ b/xserver/hw/xfree86/drivers/modesetting/Makefile.in @@ -566,6 +566,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/drivers/modesetting/dri2.c b/xserver/hw/xfree86/drivers/modesetting/dri2.c index 167814015..c0799896c 100644 --- a/xserver/hw/xfree86/drivers/modesetting/dri2.c +++ b/xserver/hw/xfree86/drivers/modesetting/dri2.c @@ -586,6 +586,7 @@ can_flip(ScrnInfoPtr scrn, DrawablePtr draw, return draw->type == DRAWABLE_WINDOW && ms->drmmode.pageflip && + !ms->drmmode.sprites_visible && !ms->drmmode.present_flipping && scrn->vtSema && DRI2CanFlip(draw) && can_exchange(scrn, draw, front, back); diff --git a/xserver/hw/xfree86/drivers/modesetting/driver.c b/xserver/hw/xfree86/drivers/modesetting/driver.c index d37c0d282..f11f44d5e 100644 --- a/xserver/hw/xfree86/drivers/modesetting/driver.c +++ b/xserver/hw/xfree86/drivers/modesetting/driver.c @@ -41,6 +41,7 @@ #include "compiler.h" #include "xf86Pci.h" #include "mipointer.h" +#include "mipointrst.h" #include "micmap.h" #include #include "fb.h" @@ -710,7 +711,7 @@ msBlockHandler_oneshot(ScreenPtr pScreen, void *pTimeout) msBlockHandler(pScreen, pTimeout); - drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE); + drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE, FALSE); } static void @@ -1353,7 +1354,7 @@ CreateScreenResources(ScreenPtr pScreen) ret = pScreen->CreateScreenResources(pScreen); pScreen->CreateScreenResources = CreateScreenResources; - if (!drmmode_set_desired_modes(pScrn, &ms->drmmode, pScrn->is_gpu)) + if (!drmmode_set_desired_modes(pScrn, &ms->drmmode, pScrn->is_gpu, FALSE)) return FALSE; if (!drmmode_glamor_handle_new_screen_pixmap(&ms->drmmode)) @@ -1662,6 +1663,21 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv) xf86SetSilkenMouse(pScreen); miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); + /* If pageflip is enabled hook the screen's cursor-sprite (swcursor) funcs. + * So that we can disabe page-flipping on fallback to a swcursor. */ + if (ms->drmmode.pageflip) { + miPointerScreenPtr PointPriv = + dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); + + if (!dixRegisterScreenPrivateKey(&ms->drmmode.spritePrivateKeyRec, + pScreen, PRIVATE_DEVICE, + sizeof(msSpritePrivRec))) + return FALSE; + + ms->SpriteFuncs = PointPriv->spriteFuncs; + PointPriv->spriteFuncs = &drmmode_sprite_funcs; + } + /* Need to extend HWcursor support to handle mask interleave */ if (!ms->drmmode.sw_cursor) xf86_cursors_init(pScreen, ms->cursor_width, ms->cursor_height, @@ -1810,8 +1826,25 @@ EnterVT(ScrnInfoPtr pScrn) SetMaster(pScrn); - if (!drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE)) - return FALSE; + drmmode_update_kms_state(&ms->drmmode); + + /* allow not all modes to be set successfully since some events might have + * happened while not being master that could prevent the previous + * configuration from being re-applied. + */ + if (!drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE, TRUE)) { + xf86DisableUnusedFunctions(pScrn); + + /* TODO: check that at least one screen is on, to allow the user to fix + * their setup if all modeset failed... + */ + + /* Tell the desktop environment that something changed, so that they + * can hopefully correct the situation + */ + RRSetChanged(xf86ScrnToScreen(pScrn)); + RRTellChanged(xf86ScrnToScreen(pScrn)); + } return TRUE; } @@ -1858,6 +1891,14 @@ CloseScreen(ScreenPtr pScreen) drmmode_free_bos(pScrn, &ms->drmmode); + if (ms->drmmode.pageflip) { + miPointerScreenPtr PointPriv = + dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); + + if (PointPriv->spriteFuncs == &drmmode_sprite_funcs) + PointPriv->spriteFuncs = ms->SpriteFuncs; + } + if (pScrn->vtSema) { LeaveVT(pScrn); } diff --git a/xserver/hw/xfree86/drivers/modesetting/driver.h b/xserver/hw/xfree86/drivers/modesetting/driver.h index 8bfb2fc1a..f2e7889db 100644 --- a/xserver/hw/xfree86/drivers/modesetting/driver.h +++ b/xserver/hw/xfree86/drivers/modesetting/driver.h @@ -97,6 +97,7 @@ typedef struct _modesettingRec { CreateScreenResourcesProcPtr createScreenResources; ScreenBlockHandlerProcPtr BlockHandler; + miPointerSpriteFuncPtr SpriteFuncs; void *driver; drmmode_rec drmmode; diff --git a/xserver/hw/xfree86/drivers/modesetting/drmmode_display.c b/xserver/hw/xfree86/drivers/modesetting/drmmode_display.c index 9a960e3c6..492f2238d 100644 --- a/xserver/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/xserver/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -37,6 +37,7 @@ #endif #include #include "dumb_bo.h" +#include "inputstr.h" #include "xf86str.h" #include "X11/Xatom.h" #include "mi.h" @@ -2441,7 +2442,7 @@ drmmode_output_add_gtf_modes(xf86OutputPtr output, DisplayModePtr Modes) int max_x = 0, max_y = 0; float max_vrefresh = 0.0; - if (mon && GTF_SUPPORTED(mon->features.msc)) + if (mon && gtf_supported(mon)) return Modes; if (!has_panel_fitter(output)) @@ -2601,8 +2602,6 @@ drmmode_property_ignore(drmModePropertyPtr prop) return FALSE; } -static Atom backlight_atom; - static void drmmode_output_create_resources(xf86OutputPtr output) { @@ -2722,9 +2721,6 @@ drmmode_output_create_resources(xf86OutputPtr output) } } } - - backlight_atom = MakeAtom(RR_PROPERTY_BACKLIGHT, - strlen(RR_PROPERTY_BACKLIGHT), FALSE); } static Bool @@ -2784,48 +2780,7 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property, static Bool drmmode_output_get_property(xf86OutputPtr output, Atom property) { - drmmode_output_private_ptr drmmode_output = output->driver_private; - drmmode_ptr drmmode = drmmode_output->drmmode; - drmModeObjectPropertiesPtr props; - int i; - - if (property != backlight_atom) - return TRUE; - - props = drmModeObjectGetProperties(drmmode->fd, drmmode_output->output_id, - DRM_MODE_OBJECT_CONNECTOR); - if (!props) - return FALSE; - - for (i = 0; i < drmmode_output->num_props; i++) { - drmmode_prop_ptr p = &drmmode_output->props[i]; - int j; - - if (p->atoms[0] != property) - continue; - - for (j = 0; j < props->count_props; j++) { - if (props->props[j] == p->mode_prop->prop_id) { - INT32 value; - int err; - - value = p->value = props->prop_values[j]; - err = RRChangeOutputProperty(output->randr_output, p->atoms[0], - XA_INTEGER, 32, PropModeReplace, 1, - &value, FALSE, TRUE); - if (err != 0) { - xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, - "RRChangeOutputProperty error, %d\n", err); - } - - drmModeFreeObjectProperties(props); - return TRUE; - } - } - } - - drmModeFreeObjectProperties(props); - return FALSE; + return TRUE; } static const xf86OutputFuncsRec drmmode_output_funcs = { @@ -3254,10 +3209,10 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) crtc->rotation, crtc->x, crtc->y); } - if (old_fb_id) { + if (old_fb_id) drmModeRmFB(drmmode->fd, old_fb_id); - drmmode_bo_destroy(drmmode, &old_front); - } + + drmmode_bo_destroy(drmmode, &old_front); return TRUE; @@ -3505,9 +3460,11 @@ drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y) } Bool -drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, Bool set_hw) +drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, Bool set_hw, + Bool ign_err) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + Bool success = TRUE; int c; for (c = 0; c < config->num_crtc; c++) { @@ -3555,8 +3512,17 @@ drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, Bool set_hw) if (set_hw) { if (!crtc->funcs-> set_mode_major(crtc, &crtc->desiredMode, crtc->desiredRotation, - crtc->desiredX, crtc->desiredY)) - return FALSE; + crtc->desiredX, crtc->desiredY)) { + if (!ign_err) + return FALSE; + else { + success = FALSE; + crtc->enabled = FALSE; + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Failed to set the desired mode on connector %s\n", + output->name); + } + } } else { crtc->mode = crtc->desiredMode; crtc->rotation = crtc->desiredRotation; @@ -3570,7 +3536,7 @@ drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, Bool set_hw) /* Validate leases on VT re-entry */ drmmode_validate_leases(pScrn); - return TRUE; + return success; } static void @@ -3655,39 +3621,19 @@ drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn) return TRUE; } -#if defined(CONFIG_UDEV_KMS) || defined(CONFIG_KEVENT_KMS) - #define DRM_MODE_LINK_STATUS_GOOD 0 #define DRM_MODE_LINK_STATUS_BAD 1 -static void -drmmode_handle_uevents(int fd, void *closure) +void +drmmode_update_kms_state(drmmode_ptr drmmode) { - drmmode_ptr drmmode = closure; ScrnInfoPtr scrn = drmmode->scrn; -#ifdef CONFIG_UDEV_KMS - struct udev_device *dev; -#endif drmModeResPtr mode_res; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int i, j; Bool found = FALSE; Bool changed = FALSE; -#ifdef CONFIG_UDEV_KMS - while ((dev = udev_monitor_receive_device(drmmode->uevent_monitor))) { - udev_device_unref(dev); - found = TRUE; - } -#else - struct kevent ev; - if ((kevent(fd, NULL, 0, &ev, 1, NULL)) && ev.fflags & NOTE_CHANGE) - found = TRUE; -#endif - - if (!found) - return; - /* Try to re-set the mode on all the connectors with a BAD link-state: * This may happen if a link degrades and a new modeset is necessary, using * different link-training parameters. If the kernel found that the current @@ -3802,6 +3748,32 @@ out: #undef DRM_MODE_LINK_STATUS_BAD #undef DRM_MODE_LINK_STATUS_GOOD +#if defined(CONFIG_UDEV_KMS) || defined(CONFIG_KEVENT_KMS) + +static void +drmmode_handle_uevents(int fd, void *closure) +{ + drmmode_ptr drmmode = closure; + struct udev_device *dev; + Bool found = FALSE; + +#ifdef CONFIG_UDEV_KMS + while ((dev = udev_monitor_receive_device(drmmode->uevent_monitor))) { + udev_device_unref(dev); + found = TRUE; + } +#else + struct kevent ev; + if ((kevent(fd, NULL, 0, &ev, 1, NULL)) && ev.fflags & NOTE_CHANGE) + found = TRUE; +#endif + + if (!found) + return; + + drmmode_update_kms_state(drmmode); +} + #endif void @@ -4021,3 +3993,102 @@ drmmode_get_default_bpp(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int *depth, drmModeFreeResources(mode_res); return; } + +/* + * We hook the screen's cursor-sprite (swcursor) functions to see if a swcursor + * is active. When a swcursor is active we disabe page-flipping. + */ + +static void drmmode_sprite_do_set_cursor(msSpritePrivPtr sprite_priv, + ScrnInfoPtr scrn, int x, int y) +{ + modesettingPtr ms = modesettingPTR(scrn); + CursorPtr cursor = sprite_priv->cursor; + Bool sprite_visible = sprite_priv->sprite_visible; + + if (cursor) { + x -= cursor->bits->xhot; + y -= cursor->bits->yhot; + + sprite_priv->sprite_visible = + x < scrn->virtualX && y < scrn->virtualY && + (x + cursor->bits->width > 0) && + (y + cursor->bits->height > 0); + } else { + sprite_priv->sprite_visible = FALSE; + } + + ms->drmmode.sprites_visible += sprite_priv->sprite_visible - sprite_visible; +} + +static void drmmode_sprite_set_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor, int x, int y) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); + modesettingPtr ms = modesettingPTR(scrn); + msSpritePrivPtr sprite_priv = msGetSpritePriv(pDev, ms, pScreen); + + sprite_priv->cursor = pCursor; + drmmode_sprite_do_set_cursor(sprite_priv, scrn, x, y); + + ms->SpriteFuncs->SetCursor(pDev, pScreen, pCursor, x, y); +} + +static void drmmode_sprite_move_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); + modesettingPtr ms = modesettingPTR(scrn); + msSpritePrivPtr sprite_priv = msGetSpritePriv(pDev, ms, pScreen); + + drmmode_sprite_do_set_cursor(sprite_priv, scrn, x, y); + + ms->SpriteFuncs->MoveCursor(pDev, pScreen, x, y); +} + +static Bool drmmode_sprite_realize_realize_cursor(DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); + modesettingPtr ms = modesettingPTR(scrn); + + return ms->SpriteFuncs->RealizeCursor(pDev, pScreen, pCursor); +} + +static Bool drmmode_sprite_realize_unrealize_cursor(DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); + modesettingPtr ms = modesettingPTR(scrn); + + return ms->SpriteFuncs->UnrealizeCursor(pDev, pScreen, pCursor); +} + +static Bool drmmode_sprite_device_cursor_initialize(DeviceIntPtr pDev, + ScreenPtr pScreen) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); + modesettingPtr ms = modesettingPTR(scrn); + + return ms->SpriteFuncs->DeviceCursorInitialize(pDev, pScreen); +} + +static void drmmode_sprite_device_cursor_cleanup(DeviceIntPtr pDev, + ScreenPtr pScreen) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); + modesettingPtr ms = modesettingPTR(scrn); + + ms->SpriteFuncs->DeviceCursorCleanup(pDev, pScreen); +} + +miPointerSpriteFuncRec drmmode_sprite_funcs = { + .RealizeCursor = drmmode_sprite_realize_realize_cursor, + .UnrealizeCursor = drmmode_sprite_realize_unrealize_cursor, + .SetCursor = drmmode_sprite_set_cursor, + .MoveCursor = drmmode_sprite_move_cursor, + .DeviceCursorInitialize = drmmode_sprite_device_cursor_initialize, + .DeviceCursorCleanup = drmmode_sprite_device_cursor_cleanup, +}; diff --git a/xserver/hw/xfree86/drivers/modesetting/drmmode_display.h b/xserver/hw/xfree86/drivers/modesetting/drmmode_display.h index 7a5e98431..73d97193c 100644 --- a/xserver/hw/xfree86/drivers/modesetting/drmmode_display.h +++ b/xserver/hw/xfree86/drivers/modesetting/drmmode_display.h @@ -114,6 +114,9 @@ typedef struct { void *shadow_fb2; DevPrivateKeyRec pixmapPrivateKeyRec; + DevScreenPrivateKeyRec spritePrivateKeyRec; + /* Number of SW cursors currently visible on this screen */ + int sprites_visible; Bool reverse_prime_offload_mode; @@ -245,6 +248,15 @@ extern DevPrivateKeyRec msPixmapPrivateKeyRec; #define msGetPixmapPriv(drmmode, p) ((msPixmapPrivPtr)dixGetPrivateAddr(&(p)->devPrivates, &(drmmode)->pixmapPrivateKeyRec)) +typedef struct _msSpritePriv { + CursorPtr cursor; + Bool sprite_visible; +} msSpritePrivRec, *msSpritePrivPtr; + +#define msGetSpritePriv(dev, ms, screen) dixLookupScreenPrivate(&(dev)->devPrivates, &(ms)->drmmode.spritePrivateKeyRec, screen) + +extern miPointerSpriteFuncRec drmmode_sprite_funcs; + Bool drmmode_is_format_supported(ScrnInfoPtr scrn, uint32_t format, uint64_t modifier); int drmmode_bo_import(drmmode_ptr drmmode, drmmode_bo *bo, @@ -269,9 +281,11 @@ void drmmode_DisableSharedPixmapFlipping(xf86CrtcPtr crtc, drmmode_ptr drmmode); extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp); extern Bool drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode); void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y); -extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, Bool set_hw); +extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, + Bool set_hw, Bool ign_err); extern Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn); +extern void drmmode_update_kms_state(drmmode_ptr drmmode); extern void drmmode_uevent_init(ScrnInfoPtr scrn, drmmode_ptr drmmode); extern void drmmode_uevent_fini(ScrnInfoPtr scrn, drmmode_ptr drmmode); diff --git a/xserver/hw/xfree86/drivers/modesetting/present.c b/xserver/hw/xfree86/drivers/modesetting/present.c index ab79fe778..009a0790c 100644 --- a/xserver/hw/xfree86/drivers/modesetting/present.c +++ b/xserver/hw/xfree86/drivers/modesetting/present.c @@ -208,13 +208,17 @@ ms_present_flip_abort(modesettingPtr ms, void *data) /* * Test to see if page flipping is possible on the target crtc + * + * We ignore sw-cursors when *disabling* flipping, we may very well be + * returning to scanning out the normal framebuffer *because* we just + * switched to sw-cursor mode and check_flip just failed because of that. */ static Bool -ms_present_check_flip(RRCrtcPtr crtc, - WindowPtr window, - PixmapPtr pixmap, - Bool sync_flip, - PresentFlipReason *reason) +ms_present_check_unflip(RRCrtcPtr crtc, + WindowPtr window, + PixmapPtr pixmap, + Bool sync_flip, + PresentFlipReason *reason) { ScreenPtr screen = window->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); @@ -281,6 +285,23 @@ ms_present_check_flip(RRCrtcPtr crtc, return TRUE; } +static Bool +ms_present_check_flip(RRCrtcPtr crtc, + WindowPtr window, + PixmapPtr pixmap, + Bool sync_flip, + PresentFlipReason *reason) +{ + ScreenPtr screen = window->drawable.pScreen; + ScrnInfoPtr scrn = xf86ScreenToScrn(screen); + modesettingPtr ms = modesettingPTR(scrn); + + if (ms->drmmode.sprites_visible > 0) + return FALSE; + + return ms_present_check_unflip(crtc, window, pixmap, sync_flip, reason); +} + /* * Queue a flip on 'crtc' to 'pixmap' at 'target_msc'. If 'sync_flip' is true, * then wait for vblank. Otherwise, flip immediately @@ -343,7 +364,7 @@ ms_present_unflip(ScreenPtr screen, uint64_t event_id) event->event_id = event_id; event->unflip = TRUE; - if (ms_present_check_flip(NULL, screen->root, pixmap, TRUE, NULL) && + if (ms_present_check_unflip(NULL, screen->root, pixmap, TRUE, NULL) && ms_do_pageflip(screen, pixmap, event, -1, FALSE, ms_present_flip_handler, ms_present_flip_abort)) { return; diff --git a/xserver/hw/xfree86/exa/Makefile.in b/xserver/hw/xfree86/exa/Makefile.in index b3ce5f0ad..4d193005a 100644 --- a/xserver/hw/xfree86/exa/Makefile.in +++ b/xserver/hw/xfree86/exa/Makefile.in @@ -541,6 +541,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/exa/man/Makefile.in b/xserver/hw/xfree86/exa/man/Makefile.in index de4f13fc7..17a157177 100644 --- a/xserver/hw/xfree86/exa/man/Makefile.in +++ b/xserver/hw/xfree86/exa/man/Makefile.in @@ -500,6 +500,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/fbdevhw/Makefile.in b/xserver/hw/xfree86/fbdevhw/Makefile.in index 8007e59dc..7bf93bcfd 100644 --- a/xserver/hw/xfree86/fbdevhw/Makefile.in +++ b/xserver/hw/xfree86/fbdevhw/Makefile.in @@ -544,6 +544,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/fbdevhw/man/Makefile.in b/xserver/hw/xfree86/fbdevhw/man/Makefile.in index ef00c72ff..477ebe4b9 100644 --- a/xserver/hw/xfree86/fbdevhw/man/Makefile.in +++ b/xserver/hw/xfree86/fbdevhw/man/Makefile.in @@ -500,6 +500,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/glamor_egl/Makefile.in b/xserver/hw/xfree86/glamor_egl/Makefile.in index 60e042a11..0970934e1 100644 --- a/xserver/hw/xfree86/glamor_egl/Makefile.in +++ b/xserver/hw/xfree86/glamor_egl/Makefile.in @@ -525,6 +525,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/i2c/Makefile.in b/xserver/hw/xfree86/i2c/Makefile.in index ac8d770d8..ae65037a6 100644 --- a/xserver/hw/xfree86/i2c/Makefile.in +++ b/xserver/hw/xfree86/i2c/Makefile.in @@ -501,6 +501,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/int10/Makefile.in b/xserver/hw/xfree86/int10/Makefile.in index 9c16c6e70..68510eb10 100644 --- a/xserver/hw/xfree86/int10/Makefile.in +++ b/xserver/hw/xfree86/int10/Makefile.in @@ -520,6 +520,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/loader/Makefile.in b/xserver/hw/xfree86/loader/Makefile.in index f572bb976..8e725fe46 100644 --- a/xserver/hw/xfree86/loader/Makefile.in +++ b/xserver/hw/xfree86/loader/Makefile.in @@ -472,6 +472,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/man/Makefile.in b/xserver/hw/xfree86/man/Makefile.in index a1876c2b4..3623d65ec 100644 --- a/xserver/hw/xfree86/man/Makefile.in +++ b/xserver/hw/xfree86/man/Makefile.in @@ -503,6 +503,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/man/Xorg.man b/xserver/hw/xfree86/man/Xorg.man index 4338a1fe2..48af2a5e2 100644 --- a/xserver/hw/xfree86/man/Xorg.man +++ b/xserver/hw/xfree86/man/Xorg.man @@ -555,7 +555,7 @@ vesa(@drivermansuffix@), vmware(@drivermansuffix@), .br Web site -.IR . +.IR . .SH AUTHORS Xorg has many contributors world wide. The names of most of them @@ -608,9 +608,9 @@ Orest Zborowski \fIorestz@eskimo.com\fP .PP Xorg source is available from the FTP server \fI\fP, and from the X.Org -server \fI\fP. Documentation and other +server \fI\fP. Documentation and other information can be found from the X.Org web site -\fI\fP. +\fI\fP. .SH LEGAL .PP @@ -620,7 +620,7 @@ and redistribution in source and binary form without fee. .B Xorg is copyright by numerous authors and contributors from around the world. Licensing information can be found at -.IR . +.IR . Refer to the source code for specific copyright notices. .PP .B XFree86(TM) diff --git a/xserver/hw/xfree86/man/xorg.conf.man b/xserver/hw/xfree86/man/xorg.conf.man index 958926243..80215ead6 100644 --- a/xserver/hw/xfree86/man/xorg.conf.man +++ b/xserver/hw/xfree86/man/xorg.conf.man @@ -2500,7 +2500,7 @@ section for a dual headed configuration with two mice: This optional section is used to provide some information for the Direct Rendering Infrastructure. Details about the format of this section can be found on-line at -.IR . +.IR . .SH "VENDOR SECTION" The optional .B Vendor diff --git a/xserver/hw/xfree86/modes/Makefile.in b/xserver/hw/xfree86/modes/Makefile.in index 82cea4400..8282cdb20 100644 --- a/xserver/hw/xfree86/modes/Makefile.in +++ b/xserver/hw/xfree86/modes/Makefile.in @@ -507,6 +507,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/modes/xf86Crtc.c b/xserver/hw/xfree86/modes/xf86Crtc.c index 37a45bb3a..17d4ef103 100644 --- a/xserver/hw/xfree86/modes/xf86Crtc.c +++ b/xserver/hw/xfree86/modes/xf86Crtc.c @@ -1719,11 +1719,10 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY) if (edid_monitor) { struct det_monrec_parameter p; - struct disp_features *features = &edid_monitor->features; struct cea_data_block *hdmi_db; /* if display is not continuous-frequency, don't add default modes */ - if (!GTF_SUPPORTED(features->msc)) + if (!gtf_supported(edid_monitor)) add_default_modes = FALSE; p.mon_rec = &mon_rec; diff --git a/xserver/hw/xfree86/os-support/Makefile.in b/xserver/hw/xfree86/os-support/Makefile.in index e7aa6817c..65e90e067 100644 --- a/xserver/hw/xfree86/os-support/Makefile.in +++ b/xserver/hw/xfree86/os-support/Makefile.in @@ -536,6 +536,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/os-support/bsd/Makefile.in b/xserver/hw/xfree86/os-support/bsd/Makefile.in index a99576633..f31d4eb11 100644 --- a/xserver/hw/xfree86/os-support/bsd/Makefile.in +++ b/xserver/hw/xfree86/os-support/bsd/Makefile.in @@ -506,6 +506,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/os-support/bus/Makefile.in b/xserver/hw/xfree86/os-support/bus/Makefile.in index a312795bf..e82015d0b 100644 --- a/xserver/hw/xfree86/os-support/bus/Makefile.in +++ b/xserver/hw/xfree86/os-support/bus/Makefile.in @@ -510,6 +510,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/os-support/hurd/Makefile.in b/xserver/hw/xfree86/os-support/hurd/Makefile.in index ecc3cc20d..c62726059 100644 --- a/xserver/hw/xfree86/os-support/hurd/Makefile.in +++ b/xserver/hw/xfree86/os-support/hurd/Makefile.in @@ -473,6 +473,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/os-support/linux/Makefile.in b/xserver/hw/xfree86/os-support/linux/Makefile.in index 623f93f5d..1ff27ce76 100644 --- a/xserver/hw/xfree86/os-support/linux/Makefile.in +++ b/xserver/hw/xfree86/os-support/linux/Makefile.in @@ -488,6 +488,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/os-support/misc/Makefile.in b/xserver/hw/xfree86/os-support/misc/Makefile.in index 0e5ee8f7b..df507bc42 100644 --- a/xserver/hw/xfree86/os-support/misc/Makefile.in +++ b/xserver/hw/xfree86/os-support/misc/Makefile.in @@ -471,6 +471,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/os-support/solaris/Makefile.in b/xserver/hw/xfree86/os-support/solaris/Makefile.in index 74ba8bf84..7c787b2f8 100644 --- a/xserver/hw/xfree86/os-support/solaris/Makefile.in +++ b/xserver/hw/xfree86/os-support/solaris/Makefile.in @@ -526,6 +526,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/os-support/stub/Makefile.in b/xserver/hw/xfree86/os-support/stub/Makefile.in index 04712aa08..3b9dbcf70 100644 --- a/xserver/hw/xfree86/os-support/stub/Makefile.in +++ b/xserver/hw/xfree86/os-support/stub/Makefile.in @@ -473,6 +473,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/parser/Makefile.in b/xserver/hw/xfree86/parser/Makefile.in index c65a84db3..6bfc9eda1 100644 --- a/xserver/hw/xfree86/parser/Makefile.in +++ b/xserver/hw/xfree86/parser/Makefile.in @@ -505,6 +505,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/ramdac/Makefile.in b/xserver/hw/xfree86/ramdac/Makefile.in index c54d3efcf..45e398df2 100644 --- a/xserver/hw/xfree86/ramdac/Makefile.in +++ b/xserver/hw/xfree86/ramdac/Makefile.in @@ -502,6 +502,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/ramdac/xf86CursorRD.c b/xserver/hw/xfree86/ramdac/xf86CursorRD.c index afcce5353..02dab36fe 100644 --- a/xserver/hw/xfree86/ramdac/xf86CursorRD.c +++ b/xserver/hw/xfree86/ramdac/xf86CursorRD.c @@ -212,7 +212,7 @@ xf86CursorEnableDisableFBAccess(ScrnInfoPtr pScrn, Bool enable) xf86CursorScreenKey); if (!enable && ScreenPriv->CurrentCursor != NullCursor) { - CursorPtr currentCursor = ScreenPriv->CurrentCursor; + CursorPtr currentCursor = RefCursor(ScreenPriv->CurrentCursor); xf86CursorSetCursor(pDev, pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y); @@ -231,6 +231,7 @@ xf86CursorEnableDisableFBAccess(ScrnInfoPtr pScrn, Bool enable) */ xf86CursorSetCursor(pDev, pScreen, ScreenPriv->SavedCursor, ScreenPriv->x, ScreenPriv->y); + UnrefCursor(ScreenPriv->SavedCursor); ScreenPriv->SavedCursor = NULL; } } @@ -333,6 +334,9 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, ScreenPriv->HotY = cursor->bits->yhot; if (!infoPtr->pScrn->vtSema) { + cursor = RefCursor(cursor); + if (ScreenPriv->SavedCursor) + FreeCursor(ScreenPriv->SavedCursor, None); ScreenPriv->SavedCursor = cursor; return; } diff --git a/xserver/hw/xfree86/shadowfb/Makefile.in b/xserver/hw/xfree86/shadowfb/Makefile.in index 5a51e4597..454f218aa 100644 --- a/xserver/hw/xfree86/shadowfb/Makefile.in +++ b/xserver/hw/xfree86/shadowfb/Makefile.in @@ -506,6 +506,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/utils/Makefile.in b/xserver/hw/xfree86/utils/Makefile.in index 6a4ca4194..af0017d37 100644 --- a/xserver/hw/xfree86/utils/Makefile.in +++ b/xserver/hw/xfree86/utils/Makefile.in @@ -477,6 +477,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/utils/cvt/Makefile.in b/xserver/hw/xfree86/utils/cvt/Makefile.in index feb22b1d9..11d5f4995 100644 --- a/xserver/hw/xfree86/utils/cvt/Makefile.in +++ b/xserver/hw/xfree86/utils/cvt/Makefile.in @@ -499,6 +499,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/utils/gtf/Makefile.in b/xserver/hw/xfree86/utils/gtf/Makefile.in index 1dd56a88b..4c4ef52f8 100644 --- a/xserver/hw/xfree86/utils/gtf/Makefile.in +++ b/xserver/hw/xfree86/utils/gtf/Makefile.in @@ -498,6 +498,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/utils/man/Makefile.in b/xserver/hw/xfree86/utils/man/Makefile.in index 5c22f4757..d909cdec0 100644 --- a/xserver/hw/xfree86/utils/man/Makefile.in +++ b/xserver/hw/xfree86/utils/man/Makefile.in @@ -500,6 +500,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/vbe/Makefile.in b/xserver/hw/xfree86/vbe/Makefile.in index b0cae486a..c925c038c 100644 --- a/xserver/hw/xfree86/vbe/Makefile.in +++ b/xserver/hw/xfree86/vbe/Makefile.in @@ -504,6 +504,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/vgahw/Makefile.in b/xserver/hw/xfree86/vgahw/Makefile.in index f8f06813c..e7d4c8d7e 100644 --- a/xserver/hw/xfree86/vgahw/Makefile.in +++ b/xserver/hw/xfree86/vgahw/Makefile.in @@ -505,6 +505,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/x86emu/Makefile.in b/xserver/hw/xfree86/x86emu/Makefile.in index b36a80ada..8e82d12fb 100644 --- a/xserver/hw/xfree86/x86emu/Makefile.in +++ b/xserver/hw/xfree86/x86emu/Makefile.in @@ -473,6 +473,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ diff --git a/xserver/hw/xfree86/xkb/Makefile.in b/xserver/hw/xfree86/xkb/Makefile.in index ba03bcb35..d38be2f5c 100644 --- a/xserver/hw/xfree86/xkb/Makefile.in +++ b/xserver/hw/xfree86/xkb/Makefile.in @@ -471,6 +471,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ -- cgit v1.2.3