|
|
3d8d92 |
From 5489029ff6508b37d71d47d905d744c436a49563 Mon Sep 17 00:00:00 2001
|
|
|
3d8d92 |
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
|
|
3d8d92 |
Date: Tue, 26 Nov 2019 17:17:12 +0100
|
|
|
3d8d92 |
Subject: [PATCH xserver 3/3] modesetting: Clear new screen pixmap storage on
|
|
|
3d8d92 |
RandR resize
|
|
|
3d8d92 |
MIME-Version: 1.0
|
|
|
3d8d92 |
Content-Type: text/plain; charset=UTF-8
|
|
|
3d8d92 |
Content-Transfer-Encoding: 8bit
|
|
|
3d8d92 |
|
|
|
3d8d92 |
Fixes random garbage being visible intermittently.
|
|
|
3d8d92 |
|
|
|
3d8d92 |
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
|
3d8d92 |
(Cherry picked from commit 9ba13bac9dd076f166ff0d063fc144b904a40d12)
|
|
|
3d8d92 |
|
|
|
3d8d92 |
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
|
|
|
3d8d92 |
---
|
|
|
3d8d92 |
hw/xfree86/drivers/modesetting/drmmode_display.c | 15 +++++++++++++++
|
|
|
3d8d92 |
1 file changed, 15 insertions(+)
|
|
|
3d8d92 |
|
|
|
3d8d92 |
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
|
|
|
3d8d92 |
index 8786d13a3..eca058258 100644
|
|
|
3d8d92 |
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
|
|
|
3d8d92 |
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
|
|
|
3d8d92 |
@@ -1795,6 +1795,19 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
|
|
|
3d8d92 |
&drmmode_crtc->prime_pixmap);
|
|
|
3d8d92 |
}
|
|
|
3d8d92 |
|
|
|
3d8d92 |
+static void
|
|
|
3d8d92 |
+drmmode_clear_pixmap(PixmapPtr pixmap)
|
|
|
3d8d92 |
+{
|
|
|
3d8d92 |
+ ScreenPtr screen = pixmap->drawable.pScreen;
|
|
|
3d8d92 |
+ GCPtr gc;
|
|
|
3d8d92 |
+
|
|
|
3d8d92 |
+ gc = GetScratchGC(pixmap->drawable.depth, screen);
|
|
|
3d8d92 |
+ if (gc) {
|
|
|
3d8d92 |
+ miClearDrawable(&pixmap->drawable, gc);
|
|
|
3d8d92 |
+ FreeScratchGC(gc);
|
|
|
3d8d92 |
+ }
|
|
|
3d8d92 |
+}
|
|
|
3d8d92 |
+
|
|
|
3d8d92 |
static void *
|
|
|
3d8d92 |
drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
|
|
|
3d8d92 |
{
|
|
|
3d8d92 |
@@ -3179,6 +3192,8 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
|
|
|
3d8d92 |
if (!drmmode_glamor_handle_new_screen_pixmap(drmmode))
|
|
|
3d8d92 |
goto fail;
|
|
|
3d8d92 |
|
|
|
3d8d92 |
+ drmmode_clear_pixmap(ppix);
|
|
|
3d8d92 |
+
|
|
|
3d8d92 |
for (i = 0; i < xf86_config->num_crtc; i++) {
|
|
|
3d8d92 |
xf86CrtcPtr crtc = xf86_config->crtc[i];
|
|
|
3d8d92 |
|
|
|
3d8d92 |
--
|
|
|
3d8d92 |
2.24.0
|
|
|
3d8d92 |
|