import xorg-x11-server-1.20.8-6.el8
This commit is contained in:
parent
cb0bc223b9
commit
92a7b2d132
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/xorg-server-1.20.6.tar.bz2
|
||||
SOURCES/xorg-server-1.20.8.tar.bz2
|
||||
|
@ -1 +1 @@
|
||||
59473e72136113f3a35b1ab5a5cfcbcad955b660 SOURCES/xorg-server-1.20.6.tar.bz2
|
||||
077d081f912faf11c87ea1c9d0e29490961b0cd4 SOURCES/xorg-server-1.20.8.tar.bz2
|
||||
|
@ -0,0 +1,56 @@
|
||||
From 85d9f7932353b6e0986796dbb09b7f778f9cc9aa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
||||
Date: Fri, 24 Jul 2020 18:21:05 +0200
|
||||
Subject: [PATCH xserver] glamor: Fix glamor_poly_fill_rect_gl
|
||||
xRectangle::width/height handling
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
(Using GLSL 1.30 or newer)
|
||||
|
||||
The width/height members of xRectangle are unsigned, but they were
|
||||
being interpreted as signed when converting to floating point for the
|
||||
vertex shader, producing incorrect drawing for values > 32767.
|
||||
|
||||
Solve this by passing through the values as integers, and masking off
|
||||
the upper 16 bits in the vertex shader (which could be 1 due to sign
|
||||
extension).
|
||||
|
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
---
|
||||
glamor/glamor_rects.c | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/glamor/glamor_rects.c b/glamor/glamor_rects.c
|
||||
index 6cbb040c1..5cac40d49 100644
|
||||
--- a/glamor/glamor_rects.c
|
||||
+++ b/glamor/glamor_rects.c
|
||||
@@ -27,9 +27,10 @@
|
||||
static const glamor_facet glamor_facet_polyfillrect_130 = {
|
||||
.name = "poly_fill_rect",
|
||||
.version = 130,
|
||||
- .vs_vars = "attribute vec4 primitive;\n",
|
||||
- .vs_exec = (" vec2 pos = primitive.zw * vec2(gl_VertexID&1, (gl_VertexID&2)>>1);\n"
|
||||
- GLAMOR_POS(gl_Position, (primitive.xy + pos))),
|
||||
+ .vs_vars = "attribute ivec4 primitive;\n",
|
||||
+ .vs_exec = (" vec2 pos = vec2(primitive.zw & ivec2(0xffff));\n"
|
||||
+ " pos *= vec2(gl_VertexID&1, (gl_VertexID&2)>>1);\n"
|
||||
+ GLAMOR_POS(gl_Position, (vec2(primitive.xy) + pos))),
|
||||
};
|
||||
|
||||
static const glamor_facet glamor_facet_polyfillrect_120 = {
|
||||
@@ -81,8 +82,8 @@ glamor_poly_fill_rect_gl(DrawablePtr drawable,
|
||||
|
||||
glEnableVertexAttribArray(GLAMOR_VERTEX_POS);
|
||||
glVertexAttribDivisor(GLAMOR_VERTEX_POS, 1);
|
||||
- glVertexAttribPointer(GLAMOR_VERTEX_POS, 4, GL_SHORT, GL_FALSE,
|
||||
- 4 * sizeof (short), vbo_offset);
|
||||
+ glVertexAttribIPointer(GLAMOR_VERTEX_POS, 4, GL_SHORT,
|
||||
+ 4 * sizeof (short), vbo_offset);
|
||||
|
||||
memcpy(v, prect, nrect * sizeof (xRectangle));
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 58d357db299116657b468db9565c0e431bb7ea29 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
||||
Date: Tue, 26 Nov 2019 17:14:46 +0100
|
||||
Subject: [PATCH xserver 1/3] modesetting: Call glamor_finish from
|
||||
drmmode_crtc_set_mode
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This makes sure any pending drawing to a new scanout buffer will be
|
||||
visible from the start.
|
||||
|
||||
This makes the finish call in drmmode_copy_fb superfluous, so remove it.
|
||||
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
(Cherry picked from commit c66c548eabf06835cb0cb906598fb87c7bb30cf4)
|
||||
|
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
---
|
||||
hw/xfree86/drivers/modesetting/drmmode_display.c | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
|
||||
index 336f7686e..8786d13a3 100644
|
||||
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
|
||||
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
|
||||
@@ -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)
|
||||
--
|
||||
2.24.0
|
||||
|
@ -1,52 +0,0 @@
|
||||
From a22a81a0de76b96b01f32f59fd2a4b4af675d9b1 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Fri, 5 Oct 2018 15:12:18 -0400
|
||||
Subject: [PATCH] modesetting: Hide atomic behind Option "Atomic" "[boolean]"
|
||||
|
||||
You can turn it on if the kernel driver supports it and you ask for it
|
||||
explicitly, but right now it's too fragile.
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
hw/xfree86/drivers/modesetting/driver.c | 5 ++++-
|
||||
hw/xfree86/drivers/modesetting/driver.h | 1 +
|
||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
|
||||
index 24311c1..4fc62e4 100644
|
||||
--- a/hw/xfree86/drivers/modesetting/driver.c
|
||||
+++ b/hw/xfree86/drivers/modesetting/driver.c
|
||||
@@ -131,6 +131,7 @@ static const OptionInfoRec Options[] = {
|
||||
{OPTION_PAGEFLIP, "PageFlip", OPTV_BOOLEAN, {0}, FALSE},
|
||||
{OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE},
|
||||
{OPTION_DOUBLE_SHADOW, "DoubleShadow", OPTV_BOOLEAN, {0}, FALSE},
|
||||
+ {OPTION_ATOMIC, "Atomic", OPTV_BOOLEAN, {0}, FALSE},
|
||||
{-1, NULL, OPTV_NONE, {0}, FALSE}
|
||||
};
|
||||
|
||||
@@ -1061,7 +1062,9 @@ PreInit(ScrnInfoPtr pScrn, int flags)
|
||||
}
|
||||
|
||||
ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1);
|
||||
- ms->atomic_modeset = (ret == 0);
|
||||
+ if ((ms->atomic_modeset = (ret == 0)))
|
||||
+ ms->atomic_modeset = xf86ReturnOptValBool(ms->drmmode.Options,
|
||||
+ OPTION_ATOMIC, FALSE);
|
||||
|
||||
ms->kms_has_modifiers = FALSE;
|
||||
ret = drmGetCap(ms->fd, DRM_CAP_ADDFB2_MODIFIERS, &value);
|
||||
diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h
|
||||
index c8db4b8..46ba78a 100644
|
||||
--- a/hw/xfree86/drivers/modesetting/driver.h
|
||||
+++ b/hw/xfree86/drivers/modesetting/driver.h
|
||||
@@ -51,6 +51,7 @@ typedef enum {
|
||||
OPTION_PAGEFLIP,
|
||||
OPTION_ZAPHOD_HEADS,
|
||||
OPTION_DOUBLE_SHADOW,
|
||||
+ OPTION_ATOMIC,
|
||||
} modesettingOpts;
|
||||
|
||||
typedef struct
|
||||
--
|
||||
2.19.0
|
||||
|
@ -0,0 +1,37 @@
|
||||
From 41e265988a0b6ec456ddd562253e0f82a7c2ede2 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Fri, 27 Sep 2019 11:43:52 -0400
|
||||
Subject: [PATCH xserver] modesetting: Reduce "glamor initialization failed"
|
||||
message to X_INFO
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This might be an error or not, for example refusing to work on llvmpipe
|
||||
is normal and expected. glamor_egl_init() will print X_ERROR messages if
|
||||
appropriate, so we don't need to here.
|
||||
|
||||
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
|
||||
(cherry picked from commit cbdde938cbaf604741cd057fac743859ada342ec)
|
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
---
|
||||
hw/xfree86/drivers/modesetting/driver.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
|
||||
index 2aaea5f7d..783d53eaa 100644
|
||||
--- a/hw/xfree86/drivers/modesetting/driver.c
|
||||
+++ b/hw/xfree86/drivers/modesetting/driver.c
|
||||
@@ -772,7 +772,7 @@ try_enable_glamor(ScrnInfoPtr pScrn)
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "glamor initialized\n");
|
||||
ms->drmmode.glamor = TRUE;
|
||||
} else {
|
||||
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||
"glamor initialization failed\n");
|
||||
}
|
||||
} else {
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,37 @@
|
||||
From f32c851a0ba41f5d8d0f8c869bc394858de721df Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
||||
Date: Thu, 25 Jun 2020 18:09:27 +0200
|
||||
Subject: [PATCH xserver 1/4] present/wnmd: Keep pixmap pointer in
|
||||
present_wnmd_clear_window_flip
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The comment was incorrect: Any reference held by the window (see
|
||||
present_wnmd_execute) is in addition to the one in struct present_vblank
|
||||
(see present_vblank_create). So if we don't drop the latter, the pixmap
|
||||
will be leaked.
|
||||
|
||||
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
||||
(cherry picked from commit bc9dd1c71c3722284ffaa7183f4119151b25a44f)
|
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
---
|
||||
present/present_screen.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/present/present_screen.c b/present/present_screen.c
|
||||
index c7e37c5fd..c435f55f4 100644
|
||||
--- a/present/present_screen.c
|
||||
+++ b/present/present_screen.c
|
||||
@@ -122,8 +122,6 @@ present_wnmd_clear_window_flip(WindowPtr window)
|
||||
|
||||
xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->idle_queue, event_queue) {
|
||||
present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence);
|
||||
- /* The pixmap will be destroyed by freeing the window resources. */
|
||||
- vblank->pixmap = NULL;
|
||||
present_vblank_destroy(vblank);
|
||||
}
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,136 @@
|
||||
From ff91c696ff8f5f56da40e107cb5c321539758a81 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Srb <msrb@suse.com>
|
||||
Date: Tue, 16 Oct 2018 09:32:13 +0200
|
||||
Subject: [PATCH xserver] xfree86: Only switch to original VT if it is active.
|
||||
|
||||
If the X server is terminated while its VT is not active, it should
|
||||
not change the current VT.
|
||||
|
||||
v2: Query current state in xf86CloseConsole using VT_GETSTATE instead of
|
||||
keeping track in xf86VTEnter/xf86VTLeave/etc.
|
||||
---
|
||||
hw/xfree86/os-support/linux/lnx_init.c | 16 +++++++++++++---
|
||||
1 file changed, 13 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
|
||||
index 039dc4a4d..358d89f0f 100644
|
||||
--- a/hw/xfree86/os-support/linux/lnx_init.c
|
||||
+++ b/hw/xfree86/os-support/linux/lnx_init.c
|
||||
@@ -272,101 +272,111 @@ xf86OpenConsole(void)
|
||||
xf86SetConsoleHandler(drain_console, NULL);
|
||||
}
|
||||
|
||||
nTty = tty_attr;
|
||||
nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
|
||||
nTty.c_oflag = 0;
|
||||
nTty.c_cflag = CREAD | CS8;
|
||||
nTty.c_lflag = 0;
|
||||
nTty.c_cc[VTIME] = 0;
|
||||
nTty.c_cc[VMIN] = 1;
|
||||
cfsetispeed(&nTty, 9600);
|
||||
cfsetospeed(&nTty, 9600);
|
||||
tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty);
|
||||
}
|
||||
}
|
||||
else { /* serverGeneration != 1 */
|
||||
if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch) {
|
||||
/* now get the VT */
|
||||
if (!switch_to(xf86Info.vtno, "xf86OpenConsole"))
|
||||
FatalError("xf86OpenConsole: Switching VT failed\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
void
|
||||
xf86CloseConsole(void)
|
||||
{
|
||||
struct vt_mode VT;
|
||||
+ struct vt_stat vts;
|
||||
int ret;
|
||||
|
||||
if (xf86Info.ShareVTs) {
|
||||
close(xf86Info.consoleFd);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* unregister the drain_console handler
|
||||
* - what to do if someone else changed it in the meantime?
|
||||
*/
|
||||
xf86SetConsoleHandler(NULL, NULL);
|
||||
|
||||
/* Back to text mode ... */
|
||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT));
|
||||
if (ret < 0)
|
||||
xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n",
|
||||
strerror(errno));
|
||||
|
||||
SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode));
|
||||
tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
|
||||
|
||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
|
||||
if (ret < 0)
|
||||
xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s\n",
|
||||
strerror(errno));
|
||||
else {
|
||||
/* set dflt vt handling */
|
||||
VT.mode = VT_AUTO;
|
||||
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT));
|
||||
if (ret < 0)
|
||||
xf86Msg(X_WARNING, "xf86CloseConsole: VT_SETMODE failed: %s\n",
|
||||
strerror(errno));
|
||||
}
|
||||
|
||||
if (xf86Info.autoVTSwitch) {
|
||||
/*
|
||||
- * Perform a switch back to the active VT when we were started
|
||||
- */
|
||||
+ * Perform a switch back to the active VT when we were started if our
|
||||
+ * vt is active now.
|
||||
+ */
|
||||
if (activeVT >= 0) {
|
||||
- switch_to(activeVT, "xf86CloseConsole");
|
||||
+ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts));
|
||||
+ if (ret < 0) {
|
||||
+ xf86Msg(X_WARNING, "xf86OpenConsole: VT_GETSTATE failed: %s\n",
|
||||
+ strerror(errno));
|
||||
+ } else {
|
||||
+ if (vts.v_active == xf86Info.vtno) {
|
||||
+ switch_to(activeVT, "xf86CloseConsole");
|
||||
+ }
|
||||
+ }
|
||||
activeVT = -1;
|
||||
}
|
||||
}
|
||||
close(xf86Info.consoleFd); /* make the vt-manager happy */
|
||||
}
|
||||
|
||||
#define CHECK_FOR_REQUIRED_ARGUMENT() \
|
||||
if (((i + 1) >= argc) || (!argv[i + 1])) { \
|
||||
ErrorF("Required argument to %s not specified\n", argv[i]); \
|
||||
UseMsg(); \
|
||||
FatalError("Required argument to %s not specified\n", argv[i]); \
|
||||
}
|
||||
|
||||
int
|
||||
xf86ProcessArgument(int argc, char *argv[], int i)
|
||||
{
|
||||
/*
|
||||
* Keep server from detaching from controlling tty. This is useful
|
||||
* when debugging (so the server can receive keyboard signals.
|
||||
*/
|
||||
if (!strcmp(argv[i], "-keeptty")) {
|
||||
KeepTty = TRUE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((argv[i][0] == 'v') && (argv[i][1] == 't')) {
|
||||
if (sscanf(argv[i], "vt%2d", &xf86Info.vtno) == 0) {
|
||||
UseMsg();
|
||||
xf86Info.vtno = -1;
|
||||
return 0;
|
||||
--
|
||||
2.18.4
|
||||
|
173
SOURCES/0001-xfree86-add-drm-modes-on-non-GTF-panels.patch
Normal file
173
SOURCES/0001-xfree86-add-drm-modes-on-non-GTF-panels.patch
Normal file
@ -0,0 +1,173 @@
|
||||
From 139868f3e82a3e7b7b17f3a5a2e07c4b04d81728 Mon Sep 17 00:00:00 2001
|
||||
From: Aaron Ma <aaron.ma@canonical.com>
|
||||
Date: Thu, 30 Jul 2020 11:02:39 +0200
|
||||
Subject: [PATCH xserver] xfree86: add drm modes on non-GTF panels
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
EDID1.4 replaced GTF Bit with Continuous or Non-Continuous Frequency Display.
|
||||
|
||||
Check the "Display Range Limits Descriptor" for GTF support.
|
||||
If panel doesn't support GTF, then add gtf modes.
|
||||
|
||||
Otherwise X will only show the modes in "Detailed Timing Descriptor".
|
||||
|
||||
V2: Coding style changes.
|
||||
V3: Coding style changes, remove unused variate.
|
||||
V4: remove unused variate.
|
||||
|
||||
BugLink: https://gitlab.freedesktop.org/drm/intel/issues/313
|
||||
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
(cherry picked from commit 6a79a737e2c0bc730ee693b4ea4a1530c108be4e)
|
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
---
|
||||
hw/xfree86/ddc/edid.h | 17 +++++++++++-
|
||||
hw/xfree86/ddc/interpret_edid.c | 27 +++++++++++++++++++
|
||||
hw/xfree86/ddc/xf86DDC.h | 3 +++
|
||||
.../drivers/modesetting/drmmode_display.c | 2 +-
|
||||
hw/xfree86/modes/xf86Crtc.c | 3 +--
|
||||
5 files changed, 48 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h
|
||||
index 750e4270b..b884d8212 100644
|
||||
--- a/hw/xfree86/ddc/edid.h
|
||||
+++ b/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/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
|
||||
index 17a8f81c0..19630471c 100644
|
||||
--- a/hw/xfree86/ddc/interpret_edid.c
|
||||
+++ b/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/hw/xfree86/ddc/xf86DDC.h b/hw/xfree86/ddc/xf86DDC.h
|
||||
index 7d81ab911..6eb2f0ba2 100644
|
||||
--- a/hw/xfree86/ddc/xf86DDC.h
|
||||
+++ b/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/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
|
||||
index 59abb6cc7..9dd8c5573 100644
|
||||
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
|
||||
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
|
||||
@@ -2439,7 +2439,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))
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||
index 37a45bb3a..17d4ef103 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||
+++ b/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;
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 6a5e47c57d16de8b6a6a2636f3cbad1aebec32e2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
||||
Date: Mon, 27 Jan 2020 17:47:10 +0100
|
||||
Subject: [PATCH xserver] xfree86/modes: Bail from xf86RotateRedisplay if
|
||||
pScreen->root is NULL
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Avoids a crash in xf86RotatePrepare -> DamageRegister during
|
||||
CreateScreenResources if rotation or another transform is configured for
|
||||
any connected RandR output in xorg.conf. The generic rotation/transform
|
||||
code generally can't work without the root window currently.
|
||||
|
||||
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/969
|
||||
Fixes: 094f42cdfe5d "xfree86/modes: Call xf86RotateRedisplay from
|
||||
xf86CrtcRotate"
|
||||
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
---
|
||||
hw/xfree86/modes/xf86Rotate.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
|
||||
index 05944cfcb..5415ed97c 100644
|
||||
--- a/hw/xfree86/modes/xf86Rotate.c
|
||||
+++ b/hw/xfree86/modes/xf86Rotate.c
|
||||
@@ -176,7 +176,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
|
||||
DamagePtr damage = xf86_config->rotation_damage;
|
||||
RegionPtr region;
|
||||
|
||||
- if (!damage)
|
||||
+ if (!damage || !pScreen->root)
|
||||
return FALSE;
|
||||
xf86RotatePrepare(pScreen);
|
||||
region = DamageRegion(damage);
|
||||
--
|
||||
2.24.1
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 6d0aaa3279d4671c4c17fdf9c049fc03b8ba273d Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Fourdan <ofourdan@redhat.com>
|
||||
Date: Thu, 11 Oct 2018 15:48:17 +0200
|
||||
Subject: [PATCH xserver] xwayland: Disable Present support
|
||||
|
||||
The addition of Present support in xserver-1.20.x introduced some
|
||||
instability and hard to reproduce bugs which can cause Xwayland to crash
|
||||
and take the entire user session with it.
|
||||
|
||||
Disable Present in support until it's stabilized.
|
||||
|
||||
This patch is a temporary workaround, it is not meant to be submitted
|
||||
upstream.
|
||||
|
||||
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||
---
|
||||
hw/xwayland/xwayland.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
|
||||
index 605c9f56b..cb29ce81c 100644
|
||||
--- a/hw/xwayland/xwayland.c
|
||||
+++ b/hw/xwayland/xwayland.c
|
||||
@@ -1071,9 +1071,10 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
||||
xwl_screen->glamor = 0;
|
||||
}
|
||||
}
|
||||
-
|
||||
+#if 0 /* Disable Present support in Xwayland for now */
|
||||
if (xwl_screen->glamor && xwl_screen->rootless)
|
||||
xwl_screen->present = xwl_present_init(pScreen);
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
if (!xwl_screen->glamor) {
|
||||
--
|
||||
2.19.1
|
||||
|
@ -0,0 +1,84 @@
|
||||
From 23c55ec32973e0a75d723e3f37769dd711c9c59c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
||||
Date: Wed, 22 Jul 2020 18:20:14 +0200
|
||||
Subject: [PATCH xserver] xwayland: Hold a pixmap reference in struct
|
||||
xwl_present_event
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In the log of the commit below, I claimed this wasn't necessary on the
|
||||
1.20 branch, but this turned out to be wrong: It meant that
|
||||
event->buffer could already be destroyed in xwl_present_free_event,
|
||||
resulting in use-after-free and likely a crash.
|
||||
|
||||
Fixes: 22c0808ac88f "xwayland: Free all remaining events in
|
||||
xwl_present_cleanup"
|
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
---
|
||||
hw/xwayland/xwayland-present.c | 17 +++++++++++++----
|
||||
hw/xwayland/xwayland.h | 2 +-
|
||||
2 files changed, 14 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
|
||||
index 2cec63f59..f003170a9 100644
|
||||
--- a/hw/xwayland/xwayland-present.c
|
||||
+++ b/hw/xwayland/xwayland-present.c
|
||||
@@ -117,8 +117,16 @@ xwl_present_free_event(struct xwl_present_event *event)
|
||||
if (!event)
|
||||
return;
|
||||
|
||||
- if (event->buffer)
|
||||
- wl_buffer_set_user_data(event->buffer, NULL);
|
||||
+ if (event->pixmap) {
|
||||
+ if (!event->buffer_released) {
|
||||
+ struct wl_buffer *buffer =
|
||||
+ xwl_glamor_pixmap_get_wl_buffer(event->pixmap, NULL);
|
||||
+
|
||||
+ wl_buffer_set_user_data(buffer, NULL);
|
||||
+ }
|
||||
+
|
||||
+ dixDestroyPixmap(event->pixmap, event->pixmap->drawable.id);
|
||||
+ }
|
||||
|
||||
xorg_list_del(&event->list);
|
||||
free(event);
|
||||
@@ -348,7 +356,7 @@ xwl_present_queue_vblank(WindowPtr present_window,
|
||||
return BadAlloc;
|
||||
|
||||
event->event_id = event_id;
|
||||
- event->buffer = NULL;
|
||||
+ event->pixmap = NULL;
|
||||
event->xwl_present_window = xwl_present_window;
|
||||
event->target_msc = msc;
|
||||
|
||||
@@ -453,11 +461,12 @@ xwl_present_flip(WindowPtr present_window,
|
||||
if (!event)
|
||||
return FALSE;
|
||||
|
||||
+ pixmap->refcnt++;
|
||||
buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap, &buffer_created);
|
||||
|
||||
event->event_id = event_id;
|
||||
event->xwl_present_window = xwl_present_window;
|
||||
- event->buffer = buffer;
|
||||
+ event->pixmap = pixmap;
|
||||
event->target_msc = target_msc;
|
||||
event->pending = TRUE;
|
||||
event->abort = FALSE;
|
||||
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
|
||||
index bc5836ec4..b9495b313 100644
|
||||
--- a/hw/xwayland/xwayland.h
|
||||
+++ b/hw/xwayland/xwayland.h
|
||||
@@ -215,7 +215,7 @@ struct xwl_present_event {
|
||||
Bool buffer_released;
|
||||
|
||||
struct xwl_present_window *xwl_present_window;
|
||||
- struct wl_buffer *buffer;
|
||||
+ PixmapPtr pixmap;
|
||||
|
||||
struct xorg_list list;
|
||||
};
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,45 @@
|
||||
From 732507ed3255dff3970c5f92bd6ea13bf877e637 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
||||
Date: Thu, 25 Jun 2020 18:11:31 +0200
|
||||
Subject: [PATCH xserver 2/4] present/wnmd: Free flip_queue entries in
|
||||
present_wnmd_clear_window_flip
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When present_wnmd_clear_window_flip is done, present_destroy_window
|
||||
frees struct present_window_priv, and the events in the flip queue
|
||||
become unreachable. So if we don't free them first, they're leaked.
|
||||
|
||||
Also drop the call to present_wnmd_set_abort_flip, which just sets a
|
||||
flag in struct present_window_priv and thus can't have any observable
|
||||
effect after present_destroy_window.
|
||||
|
||||
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1042
|
||||
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
||||
(cherry picked from commit 1bdedc8dbb9d035b85444c2558a137470ff52113)
|
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
---
|
||||
present/present_screen.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/present/present_screen.c b/present/present_screen.c
|
||||
index c435f55f4..bfd30b8ba 100644
|
||||
--- a/present/present_screen.c
|
||||
+++ b/present/present_screen.c
|
||||
@@ -115,9 +115,9 @@ present_wnmd_clear_window_flip(WindowPtr window)
|
||||
present_window_priv_ptr window_priv = present_window_priv(window);
|
||||
present_vblank_ptr vblank, tmp;
|
||||
|
||||
- if (window_priv->flip_pending) {
|
||||
- present_wnmd_set_abort_flip(window);
|
||||
- window_priv->flip_pending->window = NULL;
|
||||
+ xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->flip_queue, event_queue) {
|
||||
+ present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence);
|
||||
+ present_vblank_destroy(vblank);
|
||||
}
|
||||
|
||||
xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->idle_queue, event_queue) {
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 532f1618a0600e8601fd42f40eb628e4794300b2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
||||
Date: Tue, 26 Nov 2019 17:16:37 +0100
|
||||
Subject: [PATCH xserver 2/3] xfree86/modes: Call xf86RotateRedisplay from
|
||||
xf86CrtcRotate
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
If a new rotate buffer was allocated. This makes sure the new buffer
|
||||
has valid transformed contents when it starts being displayed.
|
||||
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
(Cherry picked from commit 327df450ffcf5bda5b4254db0208d355860d1010)
|
||||
|
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
---
|
||||
hw/xfree86/modes/xf86Rotate.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
|
||||
index a8f1e615c..05944cfcb 100644
|
||||
--- a/hw/xfree86/modes/xf86Rotate.c
|
||||
+++ b/hw/xfree86/modes/xf86Rotate.c
|
||||
@@ -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;
|
||||
--
|
||||
2.24.0
|
||||
|
@ -1,55 +0,0 @@
|
||||
From 5489029ff6508b37d71d47d905d744c436a49563 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
||||
Date: Tue, 26 Nov 2019 17:17:12 +0100
|
||||
Subject: [PATCH xserver 3/3] modesetting: Clear new screen pixmap storage on
|
||||
RandR resize
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fixes random garbage being visible intermittently.
|
||||
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
(Cherry picked from commit 9ba13bac9dd076f166ff0d063fc144b904a40d12)
|
||||
|
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
---
|
||||
hw/xfree86/drivers/modesetting/drmmode_display.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
|
||||
index 8786d13a3..eca058258 100644
|
||||
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
|
||||
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
|
||||
@@ -1795,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)
|
||||
{
|
||||
@@ -3179,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];
|
||||
|
||||
--
|
||||
2.24.0
|
||||
|
@ -0,0 +1,94 @@
|
||||
From 99e9854c5fab7114b26c272088d9202548da55bf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
||||
Date: Fri, 19 Jun 2020 18:14:35 +0200
|
||||
Subject: [PATCH xserver 3/4] xwayland: Always use xwl_present_free_event for
|
||||
freeing Present events
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Minor cleanup, and will make the next change simpler. No functional
|
||||
change intended.
|
||||
|
||||
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
||||
(cherry picked from commit 1beffba699e2cc3f23039d2177c025bc127966de)
|
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
---
|
||||
hw/xwayland/xwayland-present.c | 27 ++++++++++++---------------
|
||||
1 file changed, 12 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
|
||||
index 5ba7dce08..492e4a876 100644
|
||||
--- a/hw/xwayland/xwayland-present.c
|
||||
+++ b/hw/xwayland/xwayland-present.c
|
||||
@@ -111,6 +111,13 @@ xwl_present_reset_timer(struct xwl_present_window *xwl_present_window)
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+xwl_present_free_event(struct xwl_present_event *event)
|
||||
+{
|
||||
+ xorg_list_del(&event->list);
|
||||
+ free(event);
|
||||
+}
|
||||
+
|
||||
void
|
||||
xwl_present_cleanup(WindowPtr window)
|
||||
{
|
||||
@@ -128,17 +135,15 @@ xwl_present_cleanup(WindowPtr window)
|
||||
}
|
||||
|
||||
/* Clear remaining events */
|
||||
- xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list) {
|
||||
- xorg_list_del(&event->list);
|
||||
- free(event);
|
||||
- }
|
||||
+ xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list)
|
||||
+ xwl_present_free_event(event);
|
||||
|
||||
/* Clear remaining buffer releases and inform Present about free ressources */
|
||||
event = xwl_present_window->sync_flip;
|
||||
xwl_present_window->sync_flip = NULL;
|
||||
if (event) {
|
||||
if (event->buffer_released) {
|
||||
- free(event);
|
||||
+ xwl_present_free_event(event);
|
||||
} else {
|
||||
event->pending = FALSE;
|
||||
event->abort = TRUE;
|
||||
@@ -160,13 +165,6 @@ xwl_present_cleanup(WindowPtr window)
|
||||
free(xwl_present_window);
|
||||
}
|
||||
|
||||
-static void
|
||||
-xwl_present_free_event(struct xwl_present_event *event)
|
||||
-{
|
||||
- xorg_list_del(&event->list);
|
||||
- free(event);
|
||||
-}
|
||||
-
|
||||
static void
|
||||
xwl_present_buffer_release(void *data, struct wl_buffer *buffer)
|
||||
{
|
||||
@@ -216,7 +214,7 @@ xwl_present_msc_bump(struct xwl_present_window *xwl_present_window)
|
||||
/* If the buffer was already released, clean up now */
|
||||
present_wnmd_event_notify(xwl_present_window->window, event->event_id,
|
||||
xwl_present_window->ust, msc);
|
||||
- free(event);
|
||||
+ xwl_present_free_event(event);
|
||||
} else {
|
||||
xorg_list_add(&event->list, &xwl_present_window->release_queue);
|
||||
}
|
||||
@@ -392,8 +390,7 @@ xwl_present_abort_vblank(WindowPtr present_window,
|
||||
|
||||
xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list) {
|
||||
if (event->event_id == event_id) {
|
||||
- xorg_list_del(&event->list);
|
||||
- free(event);
|
||||
+ xwl_present_free_event(event);
|
||||
return;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,77 @@
|
||||
From 1466a4fdfa8156dd4fd8b6ee6acd1b44f72ee3b1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
||||
Date: Fri, 19 Jun 2020 18:10:18 +0200
|
||||
Subject: [PATCH xserver 4/4] xwayland: Free all remaining events in
|
||||
xwl_present_cleanup
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
At the end of xwl_present_cleanup, these events aren't reachable
|
||||
anymore, so if we don't free them first, they're leaked.
|
||||
|
||||
(cherry picked from commit 64565ea344fef0171497952ef75f019cb420fe3b)
|
||||
|
||||
v2:
|
||||
* Simpler backport, no need to keep a reference to the pixmap on the
|
||||
1.20 branch.
|
||||
|
||||
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
||||
---
|
||||
hw/xwayland/xwayland-present.c | 26 +++++++++++---------------
|
||||
1 file changed, 11 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
|
||||
index 492e4a876..2cec63f59 100644
|
||||
--- a/hw/xwayland/xwayland-present.c
|
||||
+++ b/hw/xwayland/xwayland-present.c
|
||||
@@ -114,6 +114,12 @@ xwl_present_reset_timer(struct xwl_present_window *xwl_present_window)
|
||||
static void
|
||||
xwl_present_free_event(struct xwl_present_event *event)
|
||||
{
|
||||
+ if (!event)
|
||||
+ return;
|
||||
+
|
||||
+ if (event->buffer)
|
||||
+ wl_buffer_set_user_data(event->buffer, NULL);
|
||||
+
|
||||
xorg_list_del(&event->list);
|
||||
free(event);
|
||||
}
|
||||
@@ -138,21 +144,10 @@ xwl_present_cleanup(WindowPtr window)
|
||||
xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list)
|
||||
xwl_present_free_event(event);
|
||||
|
||||
- /* Clear remaining buffer releases and inform Present about free ressources */
|
||||
- event = xwl_present_window->sync_flip;
|
||||
- xwl_present_window->sync_flip = NULL;
|
||||
- if (event) {
|
||||
- if (event->buffer_released) {
|
||||
- xwl_present_free_event(event);
|
||||
- } else {
|
||||
- event->pending = FALSE;
|
||||
- event->abort = TRUE;
|
||||
- }
|
||||
- }
|
||||
- xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->release_queue, list) {
|
||||
- xorg_list_del(&event->list);
|
||||
- event->abort = TRUE;
|
||||
- }
|
||||
+ xwl_present_free_event(xwl_present_window->sync_flip);
|
||||
+
|
||||
+ xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->release_queue, list)
|
||||
+ xwl_present_free_event(event);
|
||||
|
||||
/* Clear timer */
|
||||
xwl_present_free_timer(xwl_present_window);
|
||||
@@ -353,6 +348,7 @@ xwl_present_queue_vblank(WindowPtr present_window,
|
||||
return BadAlloc;
|
||||
|
||||
event->event_id = event_id;
|
||||
+ event->buffer = NULL;
|
||||
event->xwl_present_window = xwl_present_window;
|
||||
event->target_msc = msc;
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -21,7 +21,7 @@
|
||||
%global ansic_major 0
|
||||
%global ansic_minor 4
|
||||
%global videodrv_major 24
|
||||
%global videodrv_minor 0
|
||||
%global videodrv_minor 1
|
||||
%global xinput_major 24
|
||||
%global xinput_minor 1
|
||||
%global extension_major 10
|
||||
@ -45,8 +45,8 @@
|
||||
|
||||
Summary: X.Org X11 X server
|
||||
Name: xorg-x11-server
|
||||
Version: 1.20.6
|
||||
Release: 3%{?gitdate:.%{gitdate}}%{?dist}
|
||||
Version: 1.20.8
|
||||
Release: 6%{?gitdate:.%{gitdate}}%{?dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT
|
||||
Group: User Interface/X
|
||||
@ -94,13 +94,18 @@ Patch10: 0001-mustard-Don-t-probe-for-drivers-not-shipped-in-RHEL8.patch
|
||||
Patch11: 0001-mustard-Add-DRI2-fallback-driver-mappings-for-i965-a.patch
|
||||
#Patch11: 0001-Enable-PAM-support.patch
|
||||
Patch12: 0001-link-with-z-now.patch
|
||||
Patch13: 0001-modesetting-Hide-atomic-behind-Option-Atomic-boolean.patch
|
||||
Patch14: 0001-xfree86-Don-t-autoconfigure-vesa-or-fbdev.patch
|
||||
Patch15: 0001-xfree86-LeaveVT-from-xf86CrtcCloseScreen.patch
|
||||
Patch16: 0001-xfree86-try-harder-to-span-on-multihead.patch
|
||||
Patch17: 0001-xwayland-Disable-Present-support.patch
|
||||
Patch18: 0001-mustard-Work-around-broken-fbdev-headers.patch
|
||||
|
||||
# Xwayland / Present leak fixes from
|
||||
# https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/459
|
||||
Patch20: 0001-present-wnmd-Keep-pixmap-pointer-in-present_wnmd_cle.patch
|
||||
Patch21: 0002-present-wnmd-Free-flip_queue-entries-in-present_wnmd.patch
|
||||
Patch22: 0003-xwayland-Always-use-xwl_present_free_event-for-freei.patch
|
||||
Patch23: 0004-xwayland-Free-all-remaining-events-in-xwl_present_cl.patch
|
||||
|
||||
# fix to be upstreamed
|
||||
Patch100: 0001-linux-Make-platform-device-probe-less-fragile.patch
|
||||
Patch102: 0001-xfree86-ensure-the-readlink-buffer-is-null-terminate.patch
|
||||
@ -108,14 +113,11 @@ Patch102: 0001-xfree86-ensure-the-readlink-buffer-is-null-terminate.patch
|
||||
# fix already upstream
|
||||
Patch200: 0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch
|
||||
Patch201: 0001-linux-Fix-platform-device-PCI-detection-for-complex-.patch
|
||||
|
||||
# 1738670 - Graphical artifacts when modesetting
|
||||
Patch300: 0001-modesetting-Call-glamor_finish-from-drmmode_crtc_set.patch
|
||||
Patch301: 0002-xfree86-modes-Call-xf86RotateRedisplay-from-xf86Crtc.patch
|
||||
Patch302: 0003-modesetting-Clear-new-screen-pixmap-storage-on-RandR.patch
|
||||
|
||||
# 1795328 - Crash in xf86CrtcRotate with Option "Rotate" in xorg.conf
|
||||
Patch400: 0001-xfree86-modes-Bail-from-xf86RotateRedisplay-if-pScre.patch
|
||||
Patch202: 0001-modesetting-Reduce-glamor-initialization-failed-mess.patch
|
||||
Patch203: 0001-xfree86-Only-switch-to-original-VT-if-it-is-active.patch
|
||||
Patch204: 0001-xwayland-Hold-a-pixmap-reference-in-struct-xwl_prese.patch
|
||||
Patch205: 0001-glamor-Fix-glamor_poly_fill_rect_gl-xRectangle-width.patch
|
||||
Patch206: 0001-xfree86-add-drm-modes-on-non-GTF-panels.patch
|
||||
|
||||
BuildRequires: systemtap-sdt-devel
|
||||
BuildRequires: git
|
||||
@ -559,6 +561,33 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Aug 20 2020 Michel Dänzer <mdaenzer@redhat.com> - 1.20.8-6
|
||||
- xfree86: add drm modes on non-GTF panels
|
||||
Resolves: #1823461
|
||||
|
||||
* Tue Aug 4 2020 Michel Dänzer <mdaenzer@redhat.com> - 1.20.8-5
|
||||
- xwayland: Hold a pixmap reference in struct xwl_present_event
|
||||
Related: #1728684
|
||||
- glamor: Fix glamor_poly_fill_rect_gl xRectangle::width/height handling
|
||||
Resolves: #1740250
|
||||
|
||||
* Fri Jul 10 2020 Ray Strode <rstrode@redhat.com> - 1.20.8-4
|
||||
- Don't switch VTs in the exit path, if killed on inactive VT
|
||||
Related: #1618481
|
||||
|
||||
* Fri Jun 26 2020 Michel Dänzer <mdaenzer@redhat.com> - 1.20.8-3
|
||||
- Downgrade modesetting "glamor initialization failed" X_ERROR → X_INFO
|
||||
Resolves: #1724573
|
||||
- Xwayland / Present leak fixes for #1728684
|
||||
|
||||
* Wed Jun 10 2020 Michel Dänzer <mdaenzer@redhat.com> - 1.20.8-2
|
||||
- Re-enable Xwayland Present support
|
||||
Resolves: #1728684, #1715676
|
||||
- Remove unused patch
|
||||
|
||||
* Tue May 26 2020 Adam Jackson <ajax@redhat.com> - 1.20.8-1
|
||||
- xserver 1.20.8
|
||||
|
||||
* Tue Feb 11 2020 Michel Dänzer <mdaenzer@redhat.com> - 1.20.6-3
|
||||
- Add fix for crash with Option "Rotate" in xorg.conf
|
||||
Resolves: #1795328
|
||||
|
Loading…
Reference in New Issue
Block a user