Files
xorg-x11-server/0013-modesetting-property-use-fb_id-of-front_bo-for-rever.patch
Han Gao af9a893565 Upgrade to 21.1.15
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2025-11-17 19:04:47 +08:00

37 lines
1.2 KiB
Diff

From 9c050e62763a890daa004e472848b668d2608286 Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <uwu@icenowy.me>
Date: Wed, 17 Sep 2025 20:10:45 +0800
Subject: [PATCH 13/14] modesetting: property use fb_id of front_bo for reverse
PRIME CRTC
When doing reverse PRIME, the buffer being scaned out is still the front
BO.
Properly reuse its fb_id, to prevent adding a FB for the front_bo each
time the fb_id is requested.
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 4d046169ab21..81fd200c7cb7 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -642,8 +642,10 @@ drmmode_crtc_get_fb_id(xf86CrtcPtr crtc, uint32_t *fb_id, int *x, int *y)
msGetPixmapPriv(drmmode, drmmode_crtc->prime_pixmap);
*fb_id = ppriv->fb_id;
*x = 0;
- } else
+ } else {
+ *fb_id = drmmode->fb_id;
*x = drmmode_crtc->prime_pixmap_x;
+ }
*y = 0;
}
else if (drmmode_crtc->rotate_fb_id) {
--
2.47.3