summaryrefslogtreecommitdiff
path: root/lib/igt_kms.h
diff options
context:
space:
mode:
authorLyude <lyude@redhat.com>2017-01-05 13:01:18 -0500
committerLyude <lyude@redhat.com>2017-01-26 11:22:51 -0500
commit3bd89da289fae2c98f0daaeba4d98ecf19289552 (patch)
tree9268eb437c59094247226d784d7672e14f27318f /lib/igt_kms.h
parent528cdaf063546d0a32cfad6d215db62111054619 (diff)
igt_kms: Add kmstest_set_connector_broadcast_rgb()
A simple helper that checks whether or not the given connector has the "Broadcast RGB" prop, and if so sets it to the given mode. Required for working with the Chamelium since the Chamelium EDIDs enable limited color ranges by default on i915 and break frame dump comparisons/CRCs. Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net> Signed-off-by: Lyude <lyude@redhat.com>
Diffstat (limited to 'lib/igt_kms.h')
-rw-r--r--lib/igt_kms.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index fd9ff87a..171df668 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -166,6 +166,20 @@ enum kmstest_force_connector_state {
FORCE_CONNECTOR_OFF
};
+/**
+ * kmstest_broadcast_rgb_mode:
+ * @BROADCAST_RGB_AUTO: Choose the color range to use automatically
+ * @BROADCAST_RGB_FULL: Force the connector to use full color range
+ * @BROADCAST_RGB_16_235: Force the connector to use a limited 16:235 color
+ * range
+ */
+enum kmstest_broadcast_rgb_mode {
+ BROADCAST_RGB_AUTO = 0,
+ BROADCAST_RGB_FULL,
+ BROADCAST_RGB_16_235
+};
+
+
bool kmstest_force_connector(int fd, drmModeConnector *connector,
enum kmstest_force_connector_state state);
void kmstest_edid_add_3d(const unsigned char *edid, size_t length, unsigned char *new_edid_ptr[], size_t *new_length);
@@ -183,6 +197,8 @@ bool kmstest_probe_connector_config(int drm_fd, uint32_t connector_id,
void kmstest_free_connector_config(struct kmstest_connector_config *config);
void kmstest_set_connector_dpms(int fd, drmModeConnector *connector, int mode);
+bool kmstest_set_connector_broadcast_rgb(int fd, drmModeConnector *connector,
+ enum kmstest_broadcast_rgb_mode mode);
bool kmstest_get_property(int drm_fd, uint32_t object_id, uint32_t object_type,
const char *name, uint32_t *prop_id, uint64_t *value,
drmModePropertyPtr *prop);