mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-06-13 14:32:57 -04:00
backend/drm: read CURVE_1D_TYPE property enum values
This commit is contained in:
parent
83605d212d
commit
def08f373a
3 changed files with 19 additions and 0 deletions
|
|
@ -191,6 +191,12 @@ static bool init_color_pipeline(struct wlr_drm_backend *drm,
|
||||||
}
|
}
|
||||||
colorop->size = size;
|
colorop->size = size;
|
||||||
break;
|
break;
|
||||||
|
case DRM_COLOROP_1D_CURVE:
|
||||||
|
if (!introspect_drm_prop_enum(drm->fd, colorop->props.curve_1d_type,
|
||||||
|
&colorop->curve_1d_types)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
id = (uint32_t)next;
|
id = (uint32_t)next;
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ struct wlr_drm_colorop {
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
uint32_t type; // enum drm_colorop_type
|
uint32_t type; // enum drm_colorop_type
|
||||||
uint32_t size; // for 1D_LUT, 3D_LUT
|
uint32_t size; // for 1D_LUT, 3D_LUT
|
||||||
|
uint64_t curve_1d_types; // for 1D_CURVE, bitmask of 1 << WLR_DRM_COLOROP_1D_CURVE_*
|
||||||
|
|
||||||
struct wlr_drm_colorop_props props;
|
struct wlr_drm_colorop_props props;
|
||||||
struct wl_list link; // wlr_drm_plane.color_pipelines
|
struct wl_list link; // wlr_drm_plane.color_pipelines
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,18 @@ enum wlr_drm_color_range {
|
||||||
WLR_DRM_COLOR_YCBCR_LIMITED_RANGE,
|
WLR_DRM_COLOR_YCBCR_LIMITED_RANGE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Equivalent to drm_colorop_curve_1d_type defined in the kernel (but not exported)
|
||||||
|
enum wlr_drm_colorop_curve_1d_type {
|
||||||
|
WLR_DRM_COLOROP_1D_CURVE_SRGB_EOTF,
|
||||||
|
WLR_DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF,
|
||||||
|
WLR_DRM_COLOROP_1D_CURVE_PQ_125_EOTF,
|
||||||
|
WLR_DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF,
|
||||||
|
WLR_DRM_COLOROP_1D_CURVE_BT2020_INV_OETF,
|
||||||
|
WLR_DRM_COLOROP_1D_CURVE_BT2020_OETF,
|
||||||
|
WLR_DRM_COLOROP_1D_CURVE_GAMMA22,
|
||||||
|
WLR_DRM_COLOROP_1D_CURVE_GAMMA22_INV,
|
||||||
|
};
|
||||||
|
|
||||||
struct wlr_drm_colorop_props {
|
struct wlr_drm_colorop_props {
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
uint32_t next;
|
uint32_t next;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue