From 1b27d537d13c25c622bf50b8b1670e5a40b944d1 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 3 Jun 2022 16:02:40 +0200 Subject: [PATCH] backend/drm: unconditionally set "content type" to graphics CTA-861-G says that "graphics" is used to indicate non-analog (ie, digital) content. With that bit set, the sink should turn off analog reconstruction and other related filtering. --- backend/drm/atomic.c | 4 ++++ backend/drm/properties.c | 1 + include/backend/drm/properties.h | 1 + 3 files changed, 6 insertions(+) diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c index 1d4f9df4..82ead96e 100644 --- a/backend/drm/atomic.c +++ b/backend/drm/atomic.c @@ -280,6 +280,10 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn, atomic_add(&atom, conn->id, conn->props.link_status, DRM_MODE_LINK_STATUS_GOOD); } + if (active && conn->props.content_type != 0) { + atomic_add(&atom, conn->id, conn->props.content_type, + DRM_MODE_CONTENT_TYPE_GRAPHICS); + } atomic_add(&atom, crtc->id, crtc->props.mode_id, mode_id); atomic_add(&atom, crtc->id, crtc->props.active, active); if (active) { diff --git a/backend/drm/properties.c b/backend/drm/properties.c index f2696593..51fbc80a 100644 --- a/backend/drm/properties.c +++ b/backend/drm/properties.c @@ -24,6 +24,7 @@ static const struct prop_info connector_info[] = { { "DPMS", INDEX(dpms) }, { "EDID", INDEX(edid) }, { "PATH", INDEX(path) }, + { "content type", INDEX(content_type) }, { "link-status", INDEX(link_status) }, { "non-desktop", INDEX(non_desktop) }, { "panel orientation", INDEX(panel_orientation) }, diff --git a/include/backend/drm/properties.h b/include/backend/drm/properties.h index 10c1ccd0..f6c6023a 100644 --- a/include/backend/drm/properties.h +++ b/include/backend/drm/properties.h @@ -20,6 +20,7 @@ union wlr_drm_connector_props { uint32_t subconnector; // not guaranteed to exist uint32_t non_desktop; uint32_t panel_orientation; // not guaranteed to exist + uint32_t content_type; // not guaranteed to exist // atomic-modesetting only