summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drmmode_display.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 26ba9b16..cdfbbe5e 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -781,7 +781,6 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
fb_id = drmmode_crtc->rotate.fb_id;
x = y = 0;
- drmmode_crtc_scanout_free(drmmode_crtc);
} else if (
#ifdef RADEON_PIXMAP_SHARING
!pScreen->isGPU &&
@@ -909,9 +908,13 @@ done:
crtc->y = saved_y;
crtc->rotation = saved_rotation;
crtc->mode = saved_mode;
- } else
+ } else {
crtc->active = TRUE;
+ if (fb_id != drmmode_crtc->scanout[0].fb_id)
+ drmmode_crtc_scanout_free(drmmode_crtc);
+ }
+
free(output_ids);
return ret;