backend-drm: Fix count page flips on invalid outputs

Slight oversight of counting page flips from within the atomic commit
handler when we don't really have an output. Do that after *after*
checking for a valid output.

Fixes: cda8de1089, ("backend-drm: Count and display KMS page flips")

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2025-03-25 11:57:31 +02:00 committed by Derek Foreman
parent ae47d27f06
commit 9aa910c4d4

View file

@ -1906,7 +1906,6 @@ atomic_flip_handler(int fd, unsigned int frame, unsigned int sec,
assert(crtc);
output = crtc->output;
output->page_flips_counted++;
/* During the initial modeset, we can disable CRTCs which we don't
* actually handle during normal operation; this will give us events
@ -1914,6 +1913,8 @@ atomic_flip_handler(int fd, unsigned int frame, unsigned int sec,
if (!output || !output->base.enabled)
return;
output->page_flips_counted++;
drm_output_update_msc(output, frame);
if (output->state_cur->tear) {