diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2017-02-07 18:43:56 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2017-02-08 16:02:56 +0900 |
commit | 1351e48efe7a2c28eab447e16f36a00fbd02ae48 (patch) | |
tree | cfc2daff7f9fbb74ccfc536f56f6dc72e6e6ea9a | |
parent | 481394e3c9f9f7d88bb66fe9ae8834c87952a8ab (diff) |
Don't destroy current FB if drmModeAddFB fails
It would probably result in a black screen.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | src/drmmode_display.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 9f787203..2258e7a6 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -2895,7 +2895,8 @@ flip_error: strerror(errno)); error: - if (flipdata && flipdata->flip_count <= 1) { + if (flipdata && flipdata->flip_count <= 1 && + drmmode->fb_id != flipdata->old_fb_id) { drmModeRmFB(drmmode->fd, drmmode->fb_id); drmmode->fb_id = flipdata->old_fb_id; } |