mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-18 06:47:31 -04:00
backend: drm: Implement "force color format" property
This commit is contained in:
parent
5cfcb0a490
commit
acebd78b5f
3 changed files with 6 additions and 0 deletions
|
|
@ -335,6 +335,10 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn,
|
||||||
if (modeset && active && conn->props.max_bpc != 0 && conn->max_bpc_bounds[1] != 0) {
|
if (modeset && active && conn->props.max_bpc != 0 && conn->max_bpc_bounds[1] != 0) {
|
||||||
atomic_add(&atom, conn->id, conn->props.max_bpc, pick_max_bpc(conn, state->primary_fb));
|
atomic_add(&atom, conn->id, conn->props.max_bpc, pick_max_bpc(conn, state->primary_fb));
|
||||||
}
|
}
|
||||||
|
if (modeset && active && conn->props.force_color_format && state->base->color_format) {
|
||||||
|
uint32_t format = 1 << (state->base->color_format - 1);
|
||||||
|
atomic_add(&atom, conn->id, conn->props.force_color_format, format);
|
||||||
|
}
|
||||||
atomic_add(&atom, crtc->id, crtc->props.mode_id, mode_id);
|
atomic_add(&atom, crtc->id, crtc->props.mode_id, mode_id);
|
||||||
atomic_add(&atom, crtc->id, crtc->props.active, active);
|
atomic_add(&atom, crtc->id, crtc->props.active, active);
|
||||||
if (active) {
|
if (active) {
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ static const struct prop_info connector_info[] = {
|
||||||
{ "EDID", INDEX(edid) },
|
{ "EDID", INDEX(edid) },
|
||||||
{ "PATH", INDEX(path) },
|
{ "PATH", INDEX(path) },
|
||||||
{ "content type", INDEX(content_type) },
|
{ "content type", INDEX(content_type) },
|
||||||
|
{ "force color format", INDEX(force_color_format) },
|
||||||
{ "link-status", INDEX(link_status) },
|
{ "link-status", INDEX(link_status) },
|
||||||
{ "max bpc", INDEX(max_bpc) },
|
{ "max bpc", INDEX(max_bpc) },
|
||||||
{ "non-desktop", INDEX(non_desktop) },
|
{ "non-desktop", INDEX(non_desktop) },
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ union wlr_drm_connector_props {
|
||||||
uint32_t panel_orientation; // not guaranteed to exist
|
uint32_t panel_orientation; // not guaranteed to exist
|
||||||
uint32_t content_type; // not guaranteed to exist
|
uint32_t content_type; // not guaranteed to exist
|
||||||
uint32_t max_bpc; // not guaranteed to exist
|
uint32_t max_bpc; // not guaranteed to exist
|
||||||
|
uint32_t force_color_format; // not guaranteed to exist
|
||||||
|
|
||||||
// atomic-modesetting only
|
// atomic-modesetting only
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue