summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 9996d2f..add8287 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -681,9 +681,7 @@ drmmode_crtc_prime_scanout_update(xf86CrtcPtr crtc, DisplayModePtr mode,
xorg_list_for_each_entry(dirty, &screen->pixmap_dirty_list,
ent) {
- if (dirty->src == crtc->randr_crtc->scanout_pixmap &&
- dirty->slave_dst ==
- drmmode_crtc->scanout[drmmode_crtc->scanout_id].pixmap) {
+ if (dirty->src == drmmode_crtc->prime_scanout_pixmap) {
dirty->slave_dst =
drmmode_crtc->scanout[scanout_id].pixmap;
break;
@@ -838,7 +836,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
fb_id = drmmode->fb_id;
#ifdef AMDGPU_PIXMAP_SHARING
- if (crtc->randr_crtc && crtc->randr_crtc->scanout_pixmap) {
+ if (drmmode_crtc->prime_scanout_pixmap) {
drmmode_crtc_prime_scanout_update(crtc, mode, scanout_id,
&fb_id, &x, &y);
} else
@@ -1242,14 +1240,15 @@ static Bool drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
PixmapDirtyUpdatePtr dirty;
xorg_list_for_each_entry(dirty, &screen->pixmap_dirty_list, ent) {
- if (dirty->slave_dst != drmmode_crtc->scanout[scanout_id].pixmap)
- continue;
-
- PixmapStopDirtyTracking(dirty->src, dirty->slave_dst);
- drmmode_crtc_scanout_free(drmmode_crtc);
- break;
+ if (dirty->src == drmmode_crtc->prime_scanout_pixmap) {
+ PixmapStopDirtyTracking(dirty->src, dirty->slave_dst);
+ break;
+ }
}
+ drmmode_crtc_scanout_free(drmmode_crtc);
+ drmmode_crtc->prime_scanout_pixmap = NULL;
+
if (!ppix)
return TRUE;
@@ -1266,6 +1265,8 @@ static Bool drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
return FALSE;
}
+ drmmode_crtc->prime_scanout_pixmap = ppix;
+
#ifdef HAS_DIRTYTRACKING_ROTATION
PixmapStartDirtyTracking(ppix, drmmode_crtc->scanout[scanout_id].pixmap,
0, 0, 0, 0, RR_Rotate_0);