mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-17 05:34:14 -04:00
set "Broadcast RGB" = "Full" for all connections
This commit is contained in:
parent
4554f17377
commit
0096bf87b8
3 changed files with 11 additions and 0 deletions
|
|
@ -7,6 +7,11 @@
|
||||||
#include "backend/drm/iface.h"
|
#include "backend/drm/iface.h"
|
||||||
#include "backend/drm/util.h"
|
#include "backend/drm/util.h"
|
||||||
|
|
||||||
|
// connection property "Broadcast RGB" = "Full"
|
||||||
|
#ifndef DRM_MODE_COLOR_RANGE_FULL
|
||||||
|
#define DRM_MODE_COLOR_RANGE_FULL 1
|
||||||
|
#endif
|
||||||
|
|
||||||
struct atomic {
|
struct atomic {
|
||||||
drmModeAtomicReq *req;
|
drmModeAtomicReq *req;
|
||||||
bool failed;
|
bool failed;
|
||||||
|
|
@ -220,6 +225,10 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn,
|
||||||
|
|
||||||
struct atomic atom;
|
struct atomic atom;
|
||||||
atomic_begin(&atom);
|
atomic_begin(&atom);
|
||||||
|
if (conn->props.broadcast_rgb) {
|
||||||
|
atomic_add(&atom, conn->id, conn->props.broadcast_rgb,
|
||||||
|
DRM_MODE_COLOR_RANGE_FULL);
|
||||||
|
}
|
||||||
atomic_add(&atom, conn->id, conn->props.crtc_id, active ? crtc->id : 0);
|
atomic_add(&atom, conn->id, conn->props.crtc_id, active ? crtc->id : 0);
|
||||||
if (modeset && active && conn->props.link_status != 0) {
|
if (modeset && active && conn->props.link_status != 0) {
|
||||||
atomic_add(&atom, conn->id, conn->props.link_status,
|
atomic_add(&atom, conn->id, conn->props.link_status,
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ struct prop_info {
|
||||||
|
|
||||||
static const struct prop_info connector_info[] = {
|
static const struct prop_info connector_info[] = {
|
||||||
#define INDEX(name) (offsetof(union wlr_drm_connector_props, name) / sizeof(uint32_t))
|
#define INDEX(name) (offsetof(union wlr_drm_connector_props, name) / sizeof(uint32_t))
|
||||||
|
{ "Broadcast RGB", INDEX(broadcast_rgb) },
|
||||||
{ "CRTC_ID", INDEX(crtc_id) },
|
{ "CRTC_ID", INDEX(crtc_id) },
|
||||||
{ "DPMS", INDEX(dpms) },
|
{ "DPMS", INDEX(dpms) },
|
||||||
{ "EDID", INDEX(edid) },
|
{ "EDID", INDEX(edid) },
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ union wlr_drm_connector_props {
|
||||||
uint32_t link_status; // not guaranteed to exist
|
uint32_t link_status; // not guaranteed to exist
|
||||||
uint32_t path;
|
uint32_t path;
|
||||||
uint32_t vrr_capable; // not guaranteed to exist
|
uint32_t vrr_capable; // not guaranteed to exist
|
||||||
|
uint32_t broadcast_rgb; // not guaranteed to exist
|
||||||
uint32_t subconnector; // not guaranteed to exist
|
uint32_t subconnector; // not guaranteed to exist
|
||||||
|
|
||||||
// atomic-modesetting only
|
// atomic-modesetting only
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue