Commit d04d6328 authored by Maarten Lankhorst's avatar Maarten Lankhorst

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: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarMika Kahola <mika.kahola@intel.com>
parent cca28775
......@@ -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"
};
/*
......@@ -1037,40 +1038,6 @@ void kmstest_set_connector_dpms(int fd, drmModeConnector *connector, int mode)
dpms, mode) == 0);
}
/**
* 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
......@@ -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,
......
......@@ -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);
......
......@@ -466,9 +466,6 @@ enable_output(data_t *data,
igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_GAMMA_LUT, NULL, 0);
igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_CTM, NULL, 0);
kmstest_set_connector_broadcast_rgb(display->drm_fd, connector,
BROADCAST_RGB_FULL);
igt_display_commit(display);
if (chamelium_port_get_type(port) == DRM_MODE_CONNECTOR_VGA)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment