kms/crtc: Conditionally return 0 in meta_kms_crtc_get_deadline_evasion
If both crtc->shortterm_max_dispatch_duration_us and crtc->deadline_evasion_us are 0, i.e. we're not using the deadline timer. v2: * Fix coding style. (Jonas Ådahl) Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3958> Signed-off-by: Mingi Sung <sungmg@saltyming.net>
This commit is contained in:
parent
0129d10266
commit
71c1bf4cd4
1 changed files with 9 additions and 2 deletions
|
@ -673,6 +673,13 @@ meta_kms_crtc_update_shortterm_max_dispatch_duration (MetaKmsCrtc *crtc,
|
|||
int64_t
|
||||
meta_kms_crtc_get_deadline_evasion (MetaKmsCrtc *crtc)
|
||||
{
|
||||
return MAX (crtc->shortterm_max_dispatch_duration_us,
|
||||
crtc->deadline_evasion_us) + DEADLINE_EVASION_CONSTANT_US;
|
||||
int64_t deadline_evasion_us;
|
||||
|
||||
deadline_evasion_us =
|
||||
MAX (crtc->shortterm_max_dispatch_duration_us, crtc->deadline_evasion_us);
|
||||
|
||||
if (!deadline_evasion_us)
|
||||
return 0;
|
||||
|
||||
return deadline_evasion_us + DEADLINE_EVASION_CONSTANT_US;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue