diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-03-09 18:15:57 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-03-09 18:29:06 +0900 |
commit | 40191d82370eb7e58bd34c44966cbf44c3703229 (patch) | |
tree | 9146fa3811f3ddebfd45b01f43279bf12ad2aadf /src/radeon_present.c | |
parent | 798c4fd16d339b1ad5fd729cc884be084c60e38b (diff) |
present: Clear drmmode->fb_id before calling set_mode_major for unflip
Without this, drmmode_set_mode_major may just re-set the FB for the
last flipped BO, in which case the display will probably freeze.
Reproduction recipe: Enable rotation while a fullscreen client is
flipping.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_present.c')
-rw-r--r-- | src/radeon_present.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/radeon_present.c b/src/radeon_present.c index 68be1c73..286b3f42 100644 --- a/src/radeon_present.c +++ b/src/radeon_present.c @@ -382,6 +382,12 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id) return; 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); + info->drmmode.fb_id = 0; + for (i = 0; i < config->num_crtc; i++) { xf86CrtcPtr crtc = config->crtc[i]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; |