From a62be1d5829436b6e2ed7ca9fc315c3c8d980b2b Mon Sep 17 00:00:00 2001 From: Leandro Ribeiro Date: Thu, 2 Apr 2026 20:41:28 -0300 Subject: [PATCH] backend-drm: allow offloading post-blend xform only if libdrm >= 2.4.130 In commit "backend-drm: introduce color pipelines" we've started adding support for KMS plane color pipelines, which require libdrm >= 2.4.130. The final goal is using color pipelines to offload pre-blend color transformations. Currently we support offloading post-blend color transformations even with older libdrm versions, but that is not very useful by itself. This patch makes offloading post-blend color transformations dependent on the libdrm version as well. This allows keeping the code to offload pipelines in a single file (which is built only if libdrm >= 2.4.130), avoiding lots of #ifdefs and making the code easier to follow. Signed-off-by: Leandro Ribeiro --- frontend/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/main.c b/frontend/main.c index 02c238485..730543748 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -4076,9 +4076,13 @@ load_drm_backend(struct weston_compositor *c, int *argc, char **argv, weston_config_section_get_bool(section, "offload-blend-to-output", &offload_blend_to_output, false); - if (!c->color_manager && offload_blend_to_output) + if (!c->color_manager) offload_blend_to_output = false; +#if !CAN_OFFLOAD_COLOR_PIPELINE + offload_blend_to_output = false; +#endif + config.offload_blend_to_output = offload_blend_to_output; weston_config_section_get_string(section,