Commit 069e6ceb authored by Kenneth Graunke's avatar Kenneth Graunke
Browse files

Merge branch 'upstream-unstable' into debian-unstable

parents 7c456316 489f4191
Pipeline #96766 passed with stages
in 6 minutes and 30 seconds
......@@ -203,8 +203,14 @@ ProcXIPassiveGrabDevice(ClientPtr client)
&param, XI2, &mask);
break;
case XIGrabtypeKeycode:
status = GrabKey(client, dev, mod_dev, stuff->detail,
&param, XI2, &mask);
/* XI2 allows 32-bit keycodes but thanks to XKB we can never
* implement this. Just return an error for all keycodes that
* cannot work anyway */
if (stuff->detail > 255)
status = XIAlreadyGrabbed;
else
status = GrabKey(client, dev, mod_dev, stuff->detail,
&param, XI2, &mask);
break;
case XIGrabtypeEnter:
case XIGrabtypeFocusIn:
......
......@@ -26,9 +26,9 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.60)
AC_INIT([xorg-server], 1.20.6, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server)
RELEASE_DATE="2019-11-22"
RELEASE_NAME="Enchiladas de Queso"
AC_INIT([xorg-server], 1.20.7, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server)
RELEASE_DATE="2020-01-13"
RELEASE_NAME="Stuffed French Toast"
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
......
......@@ -624,6 +624,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
epoxy_gl_version() >= 30 ||
epoxy_has_gl_extension("GL_NV_pack_subimage");
glamor_priv->has_dual_blend =
glamor_priv->glsl_version >= 130 &&
epoxy_has_gl_extension("GL_ARB_blend_func_extended");
glamor_priv->can_copyplane = (gl_version >= 30);
......
......@@ -395,6 +395,8 @@ extern _X_EXPORT Bool
struct gbm_bo *bo,
Bool used_modifiers);
extern _X_EXPORT const char *glamor_egl_get_driver_name(ScreenPtr screen);
#endif
extern _X_EXPORT void glamor_egl_screen_init(ScreenPtr screen,
......
......@@ -688,6 +688,22 @@ glamor_get_modifiers(ScreenPtr screen, uint32_t format,
#endif
}
_X_EXPORT const char *
glamor_egl_get_driver_name(ScreenPtr screen)
{
#ifdef GLAMOR_HAS_EGL_QUERY_DRIVER
struct glamor_egl_screen_private *glamor_egl;
glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen));
if (epoxy_has_egl_extension(glamor_egl->display, "EGL_MESA_query_driver"))
return eglGetDisplayDriverName(glamor_egl->display);
#endif
return NULL;
}
static Bool
glamor_egl_destroy_pixmap(PixmapPtr pixmap)
{
......
......@@ -838,6 +838,15 @@ ddxGiveUp(enum ExitCode error)
AbortDDX(error);
}
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif
/** This function is called in Xserver/os/osinit.c from \a OsInit(). */
void
OsVendorInit(void)
......
......@@ -100,6 +100,15 @@ CloseInput(void)
KdCloseInput();
}
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif
#ifdef DDXBEFORERESET
void
ddxBeforeReset(void)
......
......@@ -232,6 +232,15 @@ ddxBeforeReset(void)
}
#endif
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
}
#endif
void
ddxUseMsg(void)
{
......
......@@ -1444,3 +1444,13 @@ ddxBeforeReset(void)
{
}
#endif
#if INPUTTHREAD
/** This function is called in Xserver/os/inputthread.c when starting
the input thread. */
void
ddxInputThreadInit(void)
{
xf86OSInputThreadInit();
}
#endif
......@@ -74,7 +74,7 @@
* mask is 0xFFFF0000.
*/
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(24, 0)
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(24, 1)
#define ABI_XINPUT_VERSION SET_ABI_VERSION(24, 1)
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(10, 0)
......
......@@ -1033,6 +1033,7 @@ ms_dri2_screen_init(ScreenPtr screen)
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
modesettingPtr ms = modesettingPTR(scrn);
DRI2InfoRec info;
const char *driver_names[2] = { NULL, NULL };
if (!glamor_supports_pixmap_import_export(screen)) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
......@@ -1071,9 +1072,30 @@ ms_dri2_screen_init(ScreenPtr screen)
info.DestroyBuffer2 = ms_dri2_destroy_buffer2;
info.CopyRegion2 = ms_dri2_copy_region2;
/* These two will be filled in by dri2.c */
info.numDrivers = 0;
info.driverNames = NULL;
/* Ask Glamor to obtain the DRI driver name via EGL_MESA_query_driver. */
driver_names[0] = glamor_egl_get_driver_name(screen);
if (driver_names[0]) {
/* There is no VDPAU driver for Intel, fallback to the generic
* OpenGL/VAAPI va_gl backend to emulate VDPAU. Otherwise,
* guess that the DRI and VDPAU drivers have the same name.
*/
if (strcmp(driver_names[0], "i965") == 0 ||
strcmp(driver_names[0], "iris") == 0) {
driver_names[1] = "va_gl";
} else {
driver_names[1] = driver_names[0];
}
info.numDrivers = 2;
info.driverNames = driver_names;
} else {
/* EGL_MESA_query_driver was unavailable; let dri2.c select the
* driver and fill in these fields for us.
*/
info.numDrivers = 0;
info.driverNames = NULL;
}
return DRI2ScreenInit(screen, &info);
}
......
......@@ -1332,7 +1332,6 @@ static Bool
CreateScreenResources(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
modesettingPtr ms = modesettingPTR(pScrn);
PixmapPtr rootPixmap;
Bool ret;
......@@ -1398,10 +1397,14 @@ CreateScreenResources(ScreenPtr pScreen)
}
}
pScrPriv->rrEnableSharedPixmapFlipping = msEnableSharedPixmapFlipping;
pScrPriv->rrDisableSharedPixmapFlipping = msDisableSharedPixmapFlipping;
if (dixPrivateKeyRegistered(rrPrivKey)) {
rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
pScrPriv->rrStartFlippingPixmapTracking = msStartFlippingPixmapTracking;
pScrPriv->rrEnableSharedPixmapFlipping = msEnableSharedPixmapFlipping;
pScrPriv->rrDisableSharedPixmapFlipping = msDisableSharedPixmapFlipping;
pScrPriv->rrStartFlippingPixmapTracking = msStartFlippingPixmapTracking;
}
return ret;
}
......
......@@ -754,6 +754,7 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode;
ScreenPtr screen = crtc->scrn->pScreen;
drmModeModeInfo kmode;
int output_count = 0;
uint32_t *output_ids = NULL;
......@@ -764,6 +765,12 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
if (!drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y))
return 1;
#ifdef GLAMOR_HAS_GBM
/* Make sure any pending drawing will be visible in a new scanout buffer */
if (drmmode->glamor)
glamor_finish(screen);
#endif
if (ms->atomic_modeset) {
drmModeAtomicReq *req = drmModeAtomicAlloc();
Bool active;
......@@ -1452,8 +1459,6 @@ drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
FreeScratchGC(gc);
glamor_finish(pScreen);
pScreen->canDoBGNoneRoot = TRUE;
if (drmmode->fbcon_pixmap)
......@@ -1790,6 +1795,19 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
&drmmode_crtc->prime_pixmap);
}
static void
drmmode_clear_pixmap(PixmapPtr pixmap)
{
ScreenPtr screen = pixmap->drawable.pScreen;
GCPtr gc;
gc = GetScratchGC(pixmap->drawable.depth, screen);
if (gc) {
miClearDrawable(&pixmap->drawable, gc);
FreeScratchGC(gc);
}
}
static void *
drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
{
......@@ -3174,6 +3192,8 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
if (!drmmode_glamor_handle_new_screen_pixmap(drmmode))
goto fail;
drmmode_clear_pixmap(ppix);
for (i = 0; i < xf86_config->num_crtc; i++) {
xf86CrtcPtr crtc = xf86_config->crtc[i];
......@@ -3206,13 +3226,19 @@ static void
drmmode_validate_leases(ScrnInfoPtr scrn)
{
ScreenPtr screen = scrn->pScreen;
rrScrPrivPtr scr_priv = rrGetScrPriv(screen);
rrScrPrivPtr scr_priv;
modesettingPtr ms = modesettingPTR(scrn);
drmmode_ptr drmmode = &ms->drmmode;
drmModeLesseeListPtr lessees;
RRLeasePtr lease, next;
int l;
/* Bail out if RandR wasn't initialized. */
if (!dixPrivateKeyRegistered(rrPrivKey))
return;
scr_priv = rrGetScrPriv(screen);
/* We can't talk to the kernel about leases when VT switched */
if (!scrn->vtSema)
return;
......
......@@ -220,7 +220,7 @@ static RRCrtcPtr
ms_covering_randr_crtc(ScreenPtr pScreen, BoxPtr box, Bool screen_is_ms)
{
ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
rrScrPrivPtr pScrPriv;
RRCrtcPtr crtc, best_crtc;
int coverage, best_coverage;
int c;
......@@ -230,6 +230,11 @@ ms_covering_randr_crtc(ScreenPtr pScreen, BoxPtr box, Bool screen_is_ms)
best_crtc = NULL;
best_coverage = 0;
if (!dixPrivateKeyRegistered(rrPrivKey))
return NULL;
pScrPriv = rrGetScrPriv(pScreen);
if (!pScrPriv)
return NULL;
......
......@@ -485,6 +485,9 @@ xf86CrtcRotate(xf86CrtcPtr crtc)
if (damage)
xf86CrtcDamageShadow(crtc);
else if (crtc->rotatedData && !crtc->rotatedPixmap)
/* Make sure the new rotate buffer has valid transformed contents */
xf86RotateRedisplay(pScreen);
/* All done */
return TRUE;
......
......@@ -661,3 +661,9 @@ xf86UseMsg()
ErrorF("don't detach controlling tty (for debugging only)\n");
return;
}
void
xf86OSInputThreadInit()
{
return;
}
......@@ -87,3 +87,9 @@ xf86CloseConsole()
close(xf86Info.consoleFd);
return;
}
void
xf86OSInputThreadInit()
{
return;
}
......@@ -397,3 +397,9 @@ xf86UseMsg(void)
ErrorF("don't detach controlling tty (for debugging only)\n");
ErrorF("-masterfd <fd> use the specified fd as the DRM master fd (not if setuid/gid)\n");
}
void
xf86OSInputThreadInit()
{
return;
}
......@@ -73,22 +73,24 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
/* I/O Permissions section */
/***************************************************************************/
#if defined(__i386__) || defined(__i386) || defined(__x86)
static Bool ExtendedEnabled = FALSE;
#endif
void
xf86OSInputThreadInit()
{
/*
* Need to enable in input thread as well, as Solaris kernel tracks
* IOPL per-thread and doesn't inherit when creating a new thread.
*/
xf86EnableIO();
}
Bool
xf86EnableIO(void)
{
#if defined(__i386__) || defined(__i386) || defined(__x86)
if (ExtendedEnabled)
return TRUE;
if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0) {
xf86Msg(X_WARNING, "xf86EnableIOPorts: Failed to set IOPL for I/O\n");
return FALSE;
}
ExtendedEnabled = TRUE;
#endif /* i386 */
return TRUE;
}
......@@ -97,11 +99,6 @@ void
xf86DisableIO(void)
{
#if defined(__i386__) || defined(__i386) || defined(__x86)
if (!ExtendedEnabled)
return;
sysi86(SI86V86, V86SC_IOPL, 0);
ExtendedEnabled = FALSE;
#endif /* i386 */
}
......@@ -136,6 +136,7 @@ extern _X_EXPORT int xf86GetSerialModemState(int fd);
extern _X_EXPORT int xf86SerialModemSetBits(int fd, int bits);
extern _X_EXPORT int xf86SerialModemClearBits(int fd, int bits);
extern _X_EXPORT int xf86LoadKernelModule(const char *pathname);
extern _X_EXPORT void xf86OSInputThreadInit(void);
/* AGP GART interface */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment