[PATCH xf86-video-ati 2/2] Don't destroy current FB if drmModeAddFB fails

Deucher, Alexander Alexander.Deucher at amd.com
Tue Feb 7 16:20:50 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Tuesday, February 07, 2017 4:48 AM
> To: amd-gfx at lists.freedesktop.org
> Subject: [PATCH xf86-video-ati 2/2] Don't destroy current FB if
> drmModeAddFB fails
> 
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> It would probably result in a black screen.
> 
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/drmmode_display.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index b64be462d..c39b32558 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -2949,7 +2949,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;
>  	}
> --
> 2.11.0
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list