From patchwork Tue Jan 18 18:41:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herton Ronaldo Krzesinski X-Patchwork-Id: 486761 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0IIeQf4011316 for ; Tue, 18 Jan 2011 18:40:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752740Ab1ARSkZ (ORCPT ); Tue, 18 Jan 2011 13:40:25 -0500 Received: from perninha.conectiva.com.br ([187.115.55.249]:55207 "EHLO perninha.conectiva.com.br" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752722Ab1ARSkY (ORCPT ); Tue, 18 Jan 2011 13:40:24 -0500 Received: from localhost (perninha.conectiva.com.br [127.0.0.1]) by perninha.conectiva.com.br (Postfix) with ESMTP id 0893B16703; Tue, 18 Jan 2011 16:40:08 -0200 (BRST) X-Virus-Scanned: amavisd-new at conectiva.com.br Received: from perninha.conectiva.com.br ([127.0.0.1]) by localhost (perninha.conectiva.com.br [127.0.0.1]) (amavisd-new, port 10025) with LMTP id T+kc3dSQmb8s; Tue, 18 Jan 2011 16:40:07 -0200 (BRST) Received: from fox.conectiva (firewall.conectiva [187.115.55.253]) by perninha.conectiva.com.br (Postfix) with ESMTP id 597B5162BF; Tue, 18 Jan 2011 16:40:07 -0200 (BRST) Received: from gotham.conectiva (gotham.conectiva [10.0.2.23]) by fox.conectiva (Postfix) with ESMTP id E6E352F1BA; Tue, 18 Jan 2011 16:40:43 -0200 (BRST) From: Herton Ronaldo Krzesinski To: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org, Matthew Garrett , Herton Ronaldo Krzesinski Subject: [PATCH 2/2] ACPI video: add initial blacklist to use vendor drivers for backlight Date: Tue, 18 Jan 2011 16:41:54 -0200 Message-Id: <1295376114-5685-2-git-send-email-herton@mandriva.com.br> X-Mailer: git-send-email 1.7.3.5 In-Reply-To: <1295376114-5685-1-git-send-email-herton@mandriva.com.br> References: <1295376114-5685-1-git-send-email-herton@mandriva.com.br> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 18 Jan 2011 18:40:26 +0000 (UTC) diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index b836761..39814d2 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -132,6 +132,45 @@ find_video(acpi_handle handle, u32 lvl, void *context, void **rv) return AE_OK; } +static struct dmi_system_id backlight_vendor_dmi_table[] = { + { + .ident = "Positivo M13", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "POSITIVO"), + DMI_MATCH(DMI_BOARD_NAME, "M13"), + }, + }, + { + .ident = "Positivo M14", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "POSITIVO"), + DMI_MATCH(DMI_BOARD_NAME, "M14"), + }, + }, + { + .ident = "Positivo A14IM01", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "POSITIVO"), + DMI_MATCH(DMI_BOARD_NAME, "A14IM01"), + }, + }, + { + .ident = "Positivo J14IM21", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "POSITIVO"), + DMI_MATCH(DMI_BOARD_NAME, "J14IM21"), + }, + }, + { + .ident = "Positivo SINM10BZ", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Positivo Informatica SA"), + DMI_MATCH(DMI_BOARD_NAME, "POS-SINM10BZ"), + }, + }, + {} +}; + /* * Returns the video capabilities of a specific ACPI graphics device * @@ -156,16 +195,13 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle) /* There might be boot param flags set already... */ acpi_video_support |= caps; acpi_video_caps_checked = 1; - /* Add blacklists here. Be careful to use the right *DMI* bits - * to still be able to override logic via boot params, e.g.: - * - * if (dmi_name_in_vendors("XY")) { - * acpi_video_support |= - * ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR; - * acpi_video_support |= - * ACPI_VIDEO_BACKLIGHT_DMI_VENDOR; - *} - */ + /* Add blacklists here (systems which don't work properly with + * acpi video and needs a special platform driver) */ + if (dmi_check_system(backlight_vendor_dmi_table)) + acpi_video_support |= ACPI_VIDEO_BACKLIGHT_DMI_VENDOR; + /*if (dmi_check_system(output_switching_vendor_dmi_table)) + acpi_video_support |= + ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR;*/ } else { status = acpi_bus_get_device(graphics_handle, &tmp_dev); if (ACPI_FAILURE(status)) {