From patchwork Mon Feb 8 13:35:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, Yakui" X-Patchwork-Id: 77737 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o18DbWXo013517 for ; Mon, 8 Feb 2010 13:38:09 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 35B2A9ED52; Mon, 8 Feb 2010 05:37:31 -0800 (PST) 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 5E1D09ED30 for ; Mon, 8 Feb 2010 05:37:29 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 08 Feb 2010 05:35:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.49,429,1262592000"; d="scan'208";a="538775566" Received: from yakui_zhao.sh.intel.com (HELO [10.239.13.128]) ([10.239.13.128]) by fmsmga002.fm.intel.com with ESMTP; 08 Feb 2010 05:36:57 -0800 From: ykzhao To: eric@anholt.net In-Reply-To: <4B678B32.4020901@linux.intel.com> References: <1264581166-15906-1-git-send-email-yakui.zhao@intel.com> <87k4v0fsu7.fsf@pollan.anholt.net> <4B638D88.5070105@linux.intel.com> <20100201013424.GI17870@zhen-devel.sh.intel.com> <4B676F94.4030901@linux.intel.com> <20100202015533.GD25628@zhen-devel.sh.intel.com> <4B678B32.4020901@linux.intel.com> Organization: Intel Open Source Technology Center Date: Mon, 08 Feb 2010 21:35:12 +0800 Message-Id: <1265636112.4169.106.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) Cc: "intel-gfx@lists.freedesktop.org" Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Detect SDVO-RGB before SDVO TV 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: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 08 Feb 2010 13:38:09 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 82678d3..fe85dd8 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -35,6 +35,7 @@ #include "i915_drm.h" #include "i915_drv.h" #include "intel_sdvo_regs.h" +#include static char *tv_format_names[] = { "NTSC_M" , "NTSC_J" , "NTSC_443", @@ -2283,6 +2284,25 @@ intel_sdvo_get_slave_addr(struct drm_device *dev, int output_device) return 0x72; } +static int intel_sdvo_is_vga(const struct dmi_system_id *id) +{ + DRM_DEBUG_KMS("SDVO is initialized as SDVO-VGA for %s\n", id->ident); + return 1; +} + +static struct dmi_system_id intel_sdvo_bad_tv[] = { + { + .callback = intel_sdvo_is_vga, + .ident = "IntelG45/ICH10R/DME1737", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "IBM CORPORATION"), + DMI_MATCH(DMI_PRODUCT_NAME, "4800784"), + }, + }, + + { } /* terminating entry */ +}; + static bool intel_sdvo_output_setup(struct intel_output *intel_output, uint16_t flags) { @@ -2323,7 +2343,8 @@ intel_sdvo_output_setup(struct intel_output *intel_output, uint16_t flags) (1 << INTEL_SDVO_NON_TV_CLONE_BIT) | (1 << INTEL_ANALOG_CLONE_BIT); } - } else if (flags & SDVO_OUTPUT_SVID0) { + } else if ((flags & SDVO_OUTPUT_SVID0) && + !dmi_check_system(intel_sdvo_bad_tv)) { sdvo_priv->controlled_output = SDVO_OUTPUT_SVID0; encoder->encoder_type = DRM_MODE_ENCODER_TVDAC;