From 163e91ad63eeab205a6884e50f3a3f1c9ee2fc97 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 9 May 2011 19:01:53 +0100 Subject: [PATCH] drm/i915: Report failure when query ACI _MUX Reported-by: Vivek.Periaraj@gmail.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37029 Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_acpi.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_acpi.c b/drivers/gpu/drm/i915/intel_acpi.c index 2cb8e0b..bfa7aa2 100644 --- a/drivers/gpu/drm/i915/intel_acpi.c +++ b/drivers/gpu/drm/i915/intel_acpi.c @@ -133,13 +133,14 @@ static char *intel_dsm_mux_type(u8 type) } } -static void intel_dsm_platform_mux_info(void) +static bool intel_dsm_platform_mux_info(void) { struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; struct acpi_object_list input; union acpi_object params[4]; union acpi_object *pkg; - int i, ret; + bool ret = false; + int i; input.count = 4; input.pointer = params; @@ -153,9 +154,8 @@ static void intel_dsm_platform_mux_info(void) params[3].type = ACPI_TYPE_INTEGER; params[3].integer.value = 0; - ret = acpi_evaluate_object(intel_dsm_priv.dhandle, "_DSM", &input, - &output); - if (ret) { + if (acpi_evaluate_object(intel_dsm_priv.dhandle, "_DSM", &input, + &output)) { DRM_DEBUG_DRIVER("failed to evaluate _DSM: %d\n", ret); goto out; } @@ -182,12 +182,14 @@ static void intel_dsm_platform_mux_info(void) DRM_DEBUG_DRIVER(" hpd mux info: %s\n", intel_dsm_mux_type(info->buffer.pointer[3])); } + ret = true; } else { DRM_ERROR("MUX INFO call failed\n"); } out: kfree(output.pointer); + return ret; } static bool intel_dsm_pci_probe(struct pci_dev *pdev) @@ -214,8 +216,7 @@ static bool intel_dsm_pci_probe(struct pci_dev *pdev) intel_dsm_priv.dhandle = dhandle; - intel_dsm_platform_mux_info(); - return true; + return intel_dsm_platform_mux_info(); } static bool intel_dsm_detect(void) -- 1.7.5.1