提交 d0cbde93 编写于 作者: Z Zhao Yakui 提交者: Eric Anholt

drm/i915: Add the brightness property for SDVO-LVDS

When the sdvo device is detected as SDVO-LVDS, we will check whether the
brightness is supported by issue SDVO enhancement command.
If it is supported, we will add the brightness property and then brightness
can be adjusted.
Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
Signed-off-by: NEric Anholt <eric@anholt.net>
上级 b9219c5e
...@@ -1872,7 +1872,7 @@ void intel_sdvo_destroy_enhance_property(struct drm_connector *connector) ...@@ -1872,7 +1872,7 @@ void intel_sdvo_destroy_enhance_property(struct drm_connector *connector)
if (sdvo_priv->hue_property) if (sdvo_priv->hue_property)
drm_property_destroy(dev, sdvo_priv->hue_property); drm_property_destroy(dev, sdvo_priv->hue_property);
} }
if (sdvo_priv->is_tv) { if (sdvo_priv->is_tv || sdvo_priv->is_lvds) {
if (sdvo_priv->brightness_property) if (sdvo_priv->brightness_property)
drm_property_destroy(dev, drm_property_destroy(dev,
sdvo_priv->brightness_property); sdvo_priv->brightness_property);
...@@ -1900,7 +1900,7 @@ static void intel_sdvo_destroy(struct drm_connector *connector) ...@@ -1900,7 +1900,7 @@ static void intel_sdvo_destroy(struct drm_connector *connector)
drm_property_destroy(connector->dev, drm_property_destroy(connector->dev,
sdvo_priv->tv_format_property); sdvo_priv->tv_format_property);
if (sdvo_priv->is_tv) if (sdvo_priv->is_tv || sdvo_priv->is_lvds)
intel_sdvo_destroy_enhance_property(connector); intel_sdvo_destroy_enhance_property(connector);
drm_sysfs_connector_remove(connector); drm_sysfs_connector_remove(connector);
...@@ -1940,7 +1940,7 @@ intel_sdvo_set_property(struct drm_connector *connector, ...@@ -1940,7 +1940,7 @@ intel_sdvo_set_property(struct drm_connector *connector,
changed = true; changed = true;
} }
if (sdvo_priv->is_tv) { if (sdvo_priv->is_tv || sdvo_priv->is_lvds) {
cmd = 0; cmd = 0;
temp_value = val; temp_value = val;
if (sdvo_priv->left_property == property) { if (sdvo_priv->left_property == property) {
...@@ -2627,7 +2627,7 @@ static void intel_sdvo_create_enhance_property(struct drm_connector *connector) ...@@ -2627,7 +2627,7 @@ static void intel_sdvo_create_enhance_property(struct drm_connector *connector)
data_value[0], data_value[1], response); data_value[0], data_value[1], response);
} }
} }
if (sdvo_priv->is_tv) { if (sdvo_priv->is_tv || sdvo_priv->is_lvds) {
if (sdvo_data.brightness) { if (sdvo_data.brightness) {
intel_sdvo_write_cmd(intel_output, intel_sdvo_write_cmd(intel_output,
SDVO_CMD_GET_MAX_BRIGHTNESS, NULL, 0); SDVO_CMD_GET_MAX_BRIGHTNESS, NULL, 0);
...@@ -2750,10 +2750,12 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device) ...@@ -2750,10 +2750,12 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
drm_encoder_helper_add(&intel_output->enc, &intel_sdvo_helper_funcs); drm_encoder_helper_add(&intel_output->enc, &intel_sdvo_helper_funcs);
drm_mode_connector_attach_encoder(&intel_output->base, &intel_output->enc); drm_mode_connector_attach_encoder(&intel_output->base, &intel_output->enc);
if (sdvo_priv->is_tv) { if (sdvo_priv->is_tv)
intel_sdvo_tv_create_property(connector); intel_sdvo_tv_create_property(connector);
if (sdvo_priv->is_tv || sdvo_priv->is_lvds)
intel_sdvo_create_enhance_property(connector); intel_sdvo_create_enhance_property(connector);
}
drm_sysfs_connector_add(connector); drm_sysfs_connector_add(connector);
intel_sdvo_select_ddc_bus(sdvo_priv); intel_sdvo_select_ddc_bus(sdvo_priv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册