diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2017-02-09 18:50:40 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2017-02-22 18:29:53 +0900 |
commit | 3ff29e5a14451916bc66b4e0028e9a317f0723f8 (patch) | |
tree | a1c779e5e8b1557311a60ca96b91120cb81b7a6c | |
parent | 0c29deb5a97d9a57e994cc0053c49ddf7aca6ecb (diff) |
present: Only call drmModeRmFB after setting modes for unflip
Fixes display intermittently blanking when a modeset is used for unflip.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | src/radeon_present.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/radeon_present.c b/src/radeon_present.c index 29800fec..b36e29b1 100644 --- a/src/radeon_present.c +++ b/src/radeon_present.c @@ -371,6 +371,7 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id) struct radeon_present_vblank_event *event; PixmapPtr pixmap = screen->GetScreenPixmap(screen); uint32_t handle; + int old_fb_id; int i; if (!radeon_present_check_unflip(scrn)) @@ -400,7 +401,7 @@ modeset: /* info->drmmode.fb_id still points to the FB for the last flipped BO. * Clear it, drmmode_set_mode_major will re-create it */ - drmModeRmFB(info->drmmode.fd, info->drmmode.fb_id); + old_fb_id = info->drmmode.fb_id; info->drmmode.fb_id = 0; for (i = 0; i < config->num_crtc; i++) { @@ -417,6 +418,7 @@ modeset: drmmode_crtc->need_modeset = TRUE; } + drmModeRmFB(info->drmmode.fd, old_fb_id); present_event_notify(event_id, 0, 0); info->drmmode.present_flipping = FALSE; |