diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 76decd758..cefc14a60 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -181,6 +181,18 @@ static bool init_color_pipeline(struct wlr_drm_backend *drm, } colorop->type = (uint32_t)type; + + switch (type) { + case DRM_COLOROP_1D_LUT: + case DRM_COLOROP_3D_LUT:; + uint64_t size = 0; + if (!get_drm_prop(drm->fd, id, colorop->props.size, &size)) { + return false; + } + colorop->size = size; + break; + } + id = (uint32_t)next; } diff --git a/include/backend/drm/drm.h b/include/backend/drm/drm.h index 05c065ced..22da263f6 100644 --- a/include/backend/drm/drm.h +++ b/include/backend/drm/drm.h @@ -23,6 +23,7 @@ struct wlr_drm_viewport { struct wlr_drm_colorop { uint32_t id; uint32_t type; // enum drm_colorop_type + uint32_t size; // for 1D_LUT, 3D_LUT struct wlr_drm_colorop_props props; struct wl_list link; // wlr_drm_plane.color_pipelines