summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-10-03 14:35:02 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-10-20 11:43:42 +0200
commitd04d63287056646eb5dbb5c60dc7cd7c64a38df7 (patch)
tree1facf01390e08b0f4793ecf1217bc20d75a621f6 /lib
parentcca28775d231af94a1e823966238ca88f1e2f7fb (diff)
lib/igt_kms: Unexport broadcast rgb API.
Setting broadcast rgb was only used by chamelium, but is now handled in igt_display by default. This means that chamelium doesn't need to set it, and this can be hidden. The broadcast RGB property is intel connector specific, so rename the enum to intel_broadcast_rgb_mode. Keep the property and enum public in case someone wants to test the property later. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_kms.c44
-rw-r--r--lib/igt_kms.h7
2 files changed, 9 insertions, 42 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5f540213..ad0855d0 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -187,7 +187,8 @@ const char *igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
const char *igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
"scaling mode",
"CRTC_ID",
- "DPMS"
+ "DPMS",
+ "Broadcast RGB"
};
/*
@@ -1038,40 +1039,6 @@ void kmstest_set_connector_dpms(int fd, drmModeConnector *connector, int mode)
}
/**
- * kmstest_set_connector_broadcast_rgb:
- * @fd: DRM fd
- * @connector: libdrm connector
- * @mode: Broadcast RGB mode
- *
- * This function sets the Broadcast RGB prop of @connector to @mode, if there
- * is one.
- *
- * Returns: true if we found and set the Broadcast RGB prop, false otherwise
- */
-bool kmstest_set_connector_broadcast_rgb(int fd, drmModeConnector *connector,
- enum kmstest_broadcast_rgb_mode mode)
-{
- uint32_t prop_id;
- int ret;
-
- ret = kmstest_get_property(fd, connector->connector_id,
- DRM_MODE_OBJECT_CONNECTOR, "Broadcast RGB",
- &prop_id, NULL, NULL);
- if (!ret) {
- igt_debug("Broadcast RGB property not found on %d\n",
- connector->connector_id);
- return false;
- }
-
- igt_debug("Setting Broadcast RGB mode on connector %d to %d\n",
- connector->connector_id, mode);
- ret = drmModeConnectorSetProperty(fd, connector->connector_id, prop_id,
- mode);
-
- return ret == 0;
-}
-
-/**
* kmstest_get_property:
* @drm_fd: drm file descriptor
* @object_id: object whose properties we're going to get
@@ -1583,9 +1550,10 @@ static void igt_output_refresh(igt_output_t *output)
igt_atomic_fill_connector_props(display, output,
IGT_NUM_CONNECTOR_PROPS, igt_connector_prop_names);
- kmstest_set_connector_broadcast_rgb(display->drm_fd,
- output->config.connector,
- BROADCAST_RGB_FULL);
+ if (output->props[IGT_CONNECTOR_BROADCAST_RGB])
+ igt_output_set_prop_value(output,
+ IGT_CONNECTOR_BROADCAST_RGB,
+ BROADCAST_RGB_FULL);
}
LOG(display, "%s: Selecting pipe %s\n", output->name,
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 2e4c2343..b8a04af7 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -115,6 +115,7 @@ enum igt_atomic_connector_properties {
IGT_CONNECTOR_SCALING_MODE = 0,
IGT_CONNECTOR_CRTC_ID,
IGT_CONNECTOR_DPMS,
+ IGT_CONNECTOR_BROADCAST_RGB,
IGT_NUM_CONNECTOR_PROPS
};
@@ -171,13 +172,13 @@ enum kmstest_force_connector_state {
};
/**
- * kmstest_broadcast_rgb_mode:
+ * intel_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 {
+enum intel_broadcast_rgb_mode {
BROADCAST_RGB_AUTO = 0,
BROADCAST_RGB_FULL,
BROADCAST_RGB_16_235
@@ -203,8 +204,6 @@ 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);