[Intel-gfx] [PATCH v4 1/5] drm/i915/bxt: Corrected the guid for bxt.

Animesh Manna animesh.manna at intel.com
Mon Jun 12 15:24:03 UTC 2017


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 <ananth.krishna.r at intel.com>
Signed-off-by: Bharath K Veera <bharath.k.veera at intel.com>
Signed-off-by: Animesh Manna <animesh.manna at intel.com>
---
 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 @@
 	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;
 }
 
-- 
1.9.1



More information about the Intel-gfx mailing list