From patchwork Mon Aug 31 02:57:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, Yakui" X-Patchwork-Id: 44790 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7V2vim9030353 for ; Mon, 31 Aug 2009 02:57:44 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A4F5B9E97A; Sun, 30 Aug 2009 19:57:43 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id D28FB9E772 for ; Sun, 30 Aug 2009 19:57:41 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 30 Aug 2009 19:54:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,302,1249282800"; d="scan'208";a="722405366" Received: from yakui_zhao.sh.intel.com (HELO localhost.localdomain) ([10.239.13.157]) by fmsmga001.fm.intel.com with ESMTP; 30 Aug 2009 20:00:44 -0700 From: yakui.zhao@intel.com To: eric@anholt.net Date: Mon, 31 Aug 2009 10:57:12 +0800 Message-Id: <1251687432-15345-2-git-send-email-yakui.zhao@intel.com> X-Mailer: git-send-email 1.5.4.5 In-Reply-To: <1251687432-15345-1-git-send-email-yakui.zhao@intel.com> References: <1251687432-15345-1-git-send-email-yakui.zhao@intel.com> Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [Patch 2/2] DRM/I915: Add the brightness property for SDVO-LVDS X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org From: Zhao Yakui 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 --- drivers/gpu/drm/i915/intel_sdvo.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 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-31 10:37:31.000000000 +0800 +++ linux-2.6/drivers/gpu/drm/i915/intel_sdvo.c 2009-08-31 10:39:58.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); } @@ -1852,7 +1852,7 @@ drm_property_destroy(connector->dev, 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); drm_sysfs_connector_remove(connector); @@ -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);