From patchwork Tue Dec 27 13:29:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manna, Animesh" X-Patchwork-Id: 9489227 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1B06460838 for ; Tue, 27 Dec 2016 13:17:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BFCA209CD for ; Tue, 27 Dec 2016 13:17:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00EE425F31; Tue, 27 Dec 2016 13:17:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B754C209CD for ; Tue, 27 Dec 2016 13:17:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 017E989AB2; Tue, 27 Dec 2016 13:17:00 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4020D89AC9 for ; Tue, 27 Dec 2016 13:16:22 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 27 Dec 2016 05:16:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.33,416,1477983600"; d="scan'208"; a="1076680294" Received: from dispdev.iind.intel.com ([10.223.25.80]) by orsmga001.jf.intel.com with ESMTP; 27 Dec 2016 05:16:20 -0800 From: Animesh Manna To: intel-gfx@lists.freedesktop.org Date: Tue, 27 Dec 2016 18:59:52 +0530 Message-Id: <1482845396-23408-2-git-send-email-animesh.manna@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482845396-23408-1-git-send-email-animesh.manna@intel.com> References: <1482845396-23408-1-git-send-email-animesh.manna@intel.com> Cc: Bharath K Veera , Ananth Krishna R Subject: [Intel-gfx] [PATCH v3 1/5] drm/i915/bxt: Corrected the guid for bxt. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Guid is changed for bxt platform, so corrected the guid for bxt. v1: Initial version as RFC. v2: Based on review comment from Jani and David, have kept guid as binary format. v3: Based on review comment from Chris and Jani, - kept the const for guid. - corrected the file permission. Signed-off-by: Ananth Krishna R Signed-off-by: Bharath K Veera Signed-off-by: Animesh Manna --- drivers/gpu/drm/i915/intel_acpi.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_acpi.c b/drivers/gpu/drm/i915/intel_acpi.c index eb638a1..5c49cef 100644 --- a/drivers/gpu/drm/i915/intel_acpi.c +++ b/drivers/gpu/drm/i915/intel_acpi.c @@ -23,6 +23,14 @@ static const u8 intel_dsm_guid[] = { 0x0f, 0x13, 0x17, 0xb0, 0x1c, 0x2c }; +static const u8 intel_dsm_guid_bxt[] = { + 0xc6, 0x41, 0x5b, 0x3e, + 0x1d, 0xeb, + 0x60, 0x42, + 0x9d, 0x15, + 0xc7, 0x1f, 0xba, 0xda, 0xe4, 0x14 +}; + static char *intel_dsm_port_name(u8 id) { switch (id) { @@ -113,20 +121,30 @@ static void intel_dsm_platform_mux_info(void) static bool intel_dsm_pci_probe(struct pci_dev *pdev) { acpi_handle dhandle; + struct drm_device *dev = pci_get_drvdata(pdev); + struct drm_i915_private *dev_priv = to_i915(dev); dhandle = ACPI_HANDLE(&pdev->dev); if (!dhandle) return false; - if (!acpi_check_dsm(dhandle, intel_dsm_guid, INTEL_DSM_REVISION_ID, - 1 << INTEL_DSM_FN_PLATFORM_MUX_INFO)) { - DRM_DEBUG_KMS("no _DSM method for intel device\n"); - return false; - } - intel_dsm_priv.dhandle = dhandle; - intel_dsm_platform_mux_info(); + if (IS_BROXTON(dev_priv)) { + union acpi_object *obj; + + obj = acpi_evaluate_dsm(dhandle, intel_dsm_guid_bxt, + INTEL_DSM_REVISION_ID, 0, NULL); + if (!obj) + return false; + } else { + if (acpi_check_dsm(dhandle, intel_dsm_guid, + INTEL_DSM_REVISION_ID, + 1 << INTEL_DSM_FN_PLATFORM_MUX_INFO)) + intel_dsm_platform_mux_info(); + else + return false; + } return true; }