From 7dc68e26755466f9056f8c72195ab8690660693d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 2 May 2017 11:47:58 +0900 Subject: Simplify tracking of PRIME scanout pixmap Remember the shared pixmap passed to drmmode_set_scanout_pixmap for each CRTC, and just compare against that. Fixes leaving stale entries in ScreenRec::pixmap_dirty_list under some circumstances, which would usually result in use-after-free and a crash down the line. Reviewed-by: Alex Deucher --- src/drmmode_display.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/drmmode_display.h') diff --git a/src/drmmode_display.h b/src/drmmode_display.h index 14d1cb03..df2c4b7b 100644 --- a/src/drmmode_display.h +++ b/src/drmmode_display.h @@ -92,6 +92,9 @@ typedef struct { unsigned scanout_id; Bool scanout_update_pending; Bool tear_free; + + PixmapPtr prime_scanout_pixmap; + int dpms_mode; /* For when a flip is pending when DPMS off requested */ int pending_dpms_mode; -- cgit v1.2.3