mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
gpu-kms: assert on invalid flip attempts
drmModePageFlip() is guaranteed to fail for the invalid FB id 0. Therefore it never makes sense to call this function with such argument. Disabling a CRTC must be done with SetCrtc instead, for example. Trying to flip to FB 0 not only fails, but it also causes Mutter to never try page flip on this output again, using drmModeSetCrtc() instead.
This commit is contained in:
parent
85e9784a22
commit
4282067e24
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 Red Hat
|
* Copyright (C) 2017 Red Hat
|
||||||
|
* Copyright (c) 2018 DisplayLink (UK) Ltd.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
@ -257,6 +258,8 @@ meta_gpu_kms_flip_crtc (MetaGpuKms *gpu_kms,
|
|||||||
g_assert (n_connectors > 0);
|
g_assert (n_connectors > 0);
|
||||||
g_free (connectors);
|
g_free (connectors);
|
||||||
|
|
||||||
|
g_assert (fb_id != 0);
|
||||||
|
|
||||||
if (!gpu_kms->page_flips_not_supported)
|
if (!gpu_kms->page_flips_not_supported)
|
||||||
{
|
{
|
||||||
MetaGpuKmsFlipClosureContainer *closure_container;
|
MetaGpuKmsFlipClosureContainer *closure_container;
|
||||||
|
Loading…
Reference in New Issue
Block a user