diff mbox

[2/2] ACPI video: add initial blacklist to use vendor drivers for backlight

Message ID 1295376114-5685-2-git-send-email-herton@mandriva.com.br (mailing list archive)
State New, archived
Headers show

Commit Message

Herton Ronaldo Krzesinski Jan. 18, 2011, 6:41 p.m. UTC
None

Comments

Anisse Astier April 7, 2011, 8:36 a.m. UTC | #1
Hi Matthew,

On Tue, 18 Jan 2011 19:44:42 +0000, Matthew Garrett <mjg59@srcf.ucam.org> wrote :

> On Tue, Jan 18, 2011 at 05:37:18PM -0200, Herton Ronaldo Krzesinski wrote:
> > On Tue, 18 Jan 2011 19:30:51 +0000
> > Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> > 
> > > Ugh. Ok, how does this work on Windows?
> > 
> > On a provided by vendor windows image, the default brightness slider in windows
> > didn't worked too... only a vendor supplied utility is able to change the
> > brightness.
> 
> Awesome. Any chance you can provide the acpidump output for one of these 
> machines? I'd prefer to find a more elegant solution.
> 

I just encountered the same problem while debugging a machine using msi-wmi:
 - msi-wmi driver relied on the fact that there wouldn't be an acpi_video
   backlight device to load backlight support, therefore backlight
   buttons don't work by default.
 - On windows, it needs the vendor supplied driver to be installed before
   backlight buttons are supported (installed after first boot on the OEM
   image) 


Please find the DSDT of this computer attached.

Regards,

Anisse
Len Brown April 12, 2011, 3:40 a.m. UTC | #2
> +		/*if (dmi_check_system(output_switching_vendor_dmi_table))
> +			acpi_video_support |=
> +				ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR;*/

please exclude this comment.

thanks,
-Len



--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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)) {