drm: Fix pageflip counter crash when using multiple backends

We need to skip non-drm backends in the output list to avoid a NULL pointer
dereference.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2025-06-20 14:05:08 -05:00
parent 3dce9e8c24
commit 37bf61c68c

View file

@ -201,6 +201,10 @@ pageflip_timer_counter_handler(void *data)
struct drm_output *output = to_drm_output(output_base);
char desc[1024];
/* Skip outputs on other backends */
if (!output)
continue;
output->page_flips_per_timer_interval =
(float) (output->page_flips_counted /
b->perf_page_flips_stats.frame_counter_interval);