[Intel-gfx] [Patch 7/7] DRM/I915: Add the brightness property for SDVO-LVDS

yakui.zhao at intel.com yakui.zhao at intel.com
Mon Aug 24 07:50:29 CEST 2009


From: Zhao Yakui <yakui.zhao at intel.com>

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: Zhao Yakui <yakui.zhao at intel.com>
---
 drivers/gpu/drm/i915/intel_sdvo.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

Index: linux-2.6/drivers/gpu/drm/i915/intel_sdvo.c
===================================================================
--- linux-2.6.orig/drivers/gpu/drm/i915/intel_sdvo.c	2009-08-24 13:27:38.000000000 +0800
+++ linux-2.6/drivers/gpu/drm/i915/intel_sdvo.c	2009-08-24 13:27:44.000000000 +0800
@@ -1827,7 +1827,7 @@
 		if (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)
 			drm_property_destroy(dev, sdvo_priv->brightness_property);
 	}
@@ -1892,7 +1892,7 @@
 		changed = true;
 	}
 
-	if (sdvo_priv->is_tv) {
+	if (sdvo_priv->is_tv || sdvo_priv->is_lvds) {
 		cmd = 0;
 		temp_value = val;
 		if (sdvo_priv->left_property == property) {
@@ -2569,7 +2569,7 @@
 					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) {
 			intel_sdvo_write_cmd(intel_output,
 				SDVO_CMD_GET_MAX_BRIGHTNESS, NULL, 0);
@@ -2686,10 +2686,12 @@
 	drm_encoder_helper_add(&intel_output->enc, &intel_sdvo_helper_funcs);
 
 	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);
+
+	if (sdvo_priv->is_tv || sdvo_priv->is_lvds)
 		intel_sdvo_create_enhance_property(connector);
-	}
+
 	drm_sysfs_connector_add(connector);
 
 	intel_sdvo_select_ddc_bus(sdvo_priv);



More information about the Intel-gfx mailing list