2010-07-13 07:55:10

by Lee, Chun-Yi

[permalink] [raw]
Subject: [PATCH] Support MSI Poulsbo netbook U110/U115

The MSI U110/U115's DSDT have opregion declare, but i915 drm driver
does not support Poulsbo ship. It causes the acpi backlight control
interface not generate by i915 drm driver.
But, we are sure the MSI Poulsbo netbook U110/U115 have workable
_BCM,_BQC implementation in DSDT and it control brightness by using
EC but not opregion.

So, put a dmi detection in msi-laptop driver and also add wlan/bluetooth
rfkill support on U110/U115.

Signed-off-by: Lee, Chun-Yi <[email protected]>
---
drivers/platform/x86/msi-laptop.c | 41 +++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c
index afd762b..5f62ad8 100644
--- a/drivers/platform/x86/msi-laptop.c
+++ b/drivers/platform/x86/msi-laptop.c
@@ -60,6 +60,7 @@
#include <linux/platform_device.h>
#include <linux/rfkill.h>
#include <linux/i8042.h>
+#include <acpi/video.h>

#define MSI_DRIVER_VERSION "0.5"

@@ -524,6 +525,42 @@ static struct dmi_system_id __initdata msi_load_scm_models_dmi_table[] = {
},
.callback = dmi_check_cb
},
+ {
+ .ident = "MSI U110",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "U110"),
+ },
+ .callback = dmi_check_cb
+ },
+ {
+ .ident = "MSI U115",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "U115"),
+ },
+ .callback = dmi_check_cb
+ },
+ { }
+};
+
+static struct dmi_system_id __initdata msi_poulsbo_dmi_table[] = {
+ {
+ .ident = "MSI U110",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "U110"),
+ },
+ .callback = dmi_check_cb
+ },
+ {
+ .ident = "MSI U115",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "U115"),
+ },
+ .callback = dmi_check_cb
+ },
{ }
};

@@ -801,6 +838,8 @@ static int __init msi_init(void)
if (acpi_video_backlight_support()) {
printk(KERN_INFO "MSI: Brightness ignored, must be controlled "
"by ACPI video driver\n");
+ if (dmi_check_system(msi_poulsbo_dmi_table))
+ acpi_video_register();
} else {
struct backlight_properties props;
memset(&props, 0, sizeof(struct backlight_properties));
@@ -919,3 +958,5 @@ MODULE_ALIAS("dmi:*:svnMICRO-STARINTERNATIONAL*:pnMS-N034:*");
MODULE_ALIAS("dmi:*:svnMICRO-STARINTERNATIONAL*:pnMS-N051:*");
MODULE_ALIAS("dmi:*:svnMICRO-STARINTERNATIONAL*:pnMS-N014:*");
MODULE_ALIAS("dmi:*:svnMicro-StarInternational*:pnCR620:*");
+MODULE_ALIAS("dmi:*:svnMicro-StarInternational*:pnU110:*");
+MODULE_ALIAS("dmi:*:svnMicro-StarInternational*:pnU115:*");
--
1.6.0.2


2010-08-13 09:06:04

by Joey Lee

[permalink] [raw]
Subject: Re: [PATCH] Support MSI Poulsbo netbook U110/U115

Hi Matthew,

Dennis help me to ported this patch to 2.6.35, and it works as expected.
Could you please give me any suggestions for this patch?


Thank's a lot!
Joey Lee

於 二,2010-07-13 於 15:54 +0800,Lee, Chun-Yi 提到:
> The MSI U110/U115's DSDT have opregion declare, but i915 drm driver
> does not support Poulsbo ship. It causes the acpi backlight control
> interface not generate by i915 drm driver.
> But, we are sure the MSI Poulsbo netbook U110/U115 have workable
> _BCM,_BQC implementation in DSDT and it control brightness by using
> EC but not opregion.
>
> So, put a dmi detection in msi-laptop driver and also add wlan/bluetooth
> rfkill support on U110/U115.
>
> Signed-off-by: Lee, Chun-Yi <[email protected]>
> ---
> drivers/platform/x86/msi-laptop.c | 41 +++++++++++++++++++++++++++++++++++++
> 1 files changed, 41 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c
> index afd762b..5f62ad8 100644
> --- a/drivers/platform/x86/msi-laptop.c
> +++ b/drivers/platform/x86/msi-laptop.c
> @@ -60,6 +60,7 @@
> #include <linux/platform_device.h>
> #include <linux/rfkill.h>
> #include <linux/i8042.h>
> +#include <acpi/video.h>
>
> #define MSI_DRIVER_VERSION "0.5"
>
> @@ -524,6 +525,42 @@ static struct dmi_system_id __initdata msi_load_scm_models_dmi_table[] = {
> },
> .callback = dmi_check_cb
> },
> + {
> + .ident = "MSI U110",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "U110"),
> + },
> + .callback = dmi_check_cb
> + },
> + {
> + .ident = "MSI U115",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "U115"),
> + },
> + .callback = dmi_check_cb
> + },
> + { }
> +};
> +
> +static struct dmi_system_id __initdata msi_poulsbo_dmi_table[] = {
> + {
> + .ident = "MSI U110",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "U110"),
> + },
> + .callback = dmi_check_cb
> + },
> + {
> + .ident = "MSI U115",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "U115"),
> + },
> + .callback = dmi_check_cb
> + },
> { }
> };
>
> @@ -801,6 +838,8 @@ static int __init msi_init(void)
> if (acpi_video_backlight_support()) {
> printk(KERN_INFO "MSI: Brightness ignored, must be controlled "
> "by ACPI video driver\n");
> + if (dmi_check_system(msi_poulsbo_dmi_table))
> + acpi_video_register();
> } else {
> struct backlight_properties props;
> memset(&props, 0, sizeof(struct backlight_properties));
> @@ -919,3 +958,5 @@ MODULE_ALIAS("dmi:*:svnMICRO-STARINTERNATIONAL*:pnMS-N034:*");
> MODULE_ALIAS("dmi:*:svnMICRO-STARINTERNATIONAL*:pnMS-N051:*");
> MODULE_ALIAS("dmi:*:svnMICRO-STARINTERNATIONAL*:pnMS-N014:*");
> MODULE_ALIAS("dmi:*:svnMicro-StarInternational*:pnCR620:*");
> +MODULE_ALIAS("dmi:*:svnMicro-StarInternational*:pnU110:*");
> +MODULE_ALIAS("dmi:*:svnMicro-StarInternational*:pnU115:*");

2010-08-16 15:56:37

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH] Support MSI Poulsbo netbook U110/U115

On Fri, Aug 13, 2010 at 03:05:58AM -0600, Joey Lee wrote:
> Hi Matthew,
>
> Dennis help me to ported this patch to 2.6.35, and it works as expected.
> Could you please give me any suggestions for this patch?

I've thought about this a bit more and now lean towards thinking that
putting the PCI IDs in the ACPI video driver is the best way to go. The
alternative is to only fix it for MSI, which isn't the best option. On
the other hand, I looked at adding support to the Poulsbo driver and it
actually seems pretty easy, so to be honest I'd prefer it if that got
done instead.

--
Matthew Garrett | [email protected]

2010-08-17 14:56:33

by Joey Lee

[permalink] [raw]
Subject: Re: [PATCH] Support MSI Poulsbo netbook U110/U115

Hi Matthew,

First, thank's for your kindy suggestion, it's good to us.

於 一,2010-08-16 於 16:56 +0100,Matthew Garrett 提到:
> On Fri, Aug 13, 2010 at 03:05:58AM -0600, Joey Lee wrote:
> > Hi Matthew,
> >
> > Dennis help me to ported this patch to 2.6.35, and it works as expected.
> > Could you please give me any suggestions for this patch?
>
> I've thought about this a bit more and now lean towards thinking that
> putting the PCI IDs in the ACPI video driver is the best way to go. The
> alternative is to only fix it for MSI, which isn't the best option. On

OK! Got it!
I will try to put the PCI IDs in ACPI video driver then send out the
patch for review ASAP.

> the other hand, I looked at adding support to the Poulsbo driver and it
> actually seems pretty easy, so to be honest I'd prefer it if that got
> done instead.
>

I am not good for video driver, but will also try to look at it.


Thank's a lot!
Joey Lee

2010-08-23 11:54:50

by Joey Lee

[permalink] [raw]
Subject: Re: [PATCH] Support MSI Poulsbo netbook U110/U115

Hi Matthew,

於 二,2010-08-17 於 08:56 -0600,Joey Lee 提到:
> > I've thought about this a bit more and now lean towards thinking that
> > putting the PCI IDs in the ACPI video driver is the best way to go. The
> > alternative is to only fix it for MSI, which isn't the best option. On
>
> OK! Got it!
> I will try to put the PCI IDs in ACPI video driver then send out the
> patch for review ASAP.
>

I just sand the "Add intel drm blacklist to intel_opregion_present
detect" patch to you and I put all Poulsbo/Morrestown PCI IDs in
blacklist in the patch.

> > the other hand, I looked at adding support to the Poulsbo driver and it
> > actually seems pretty easy, so to be honest I'd prefer it if that got
> > done instead.
> >
>
> I am not good for video driver, but will also try to look at it.
>

I readed the following mail loop for Poulsbo drm driver:

http://sourceforge.net/mailarchive/message.php?msg_name=49C3CB88.2000202%40shipmail.org

Looks like GregKH is working on extract 2D video driver for
Poulsbo/Morrestown. We will need the 2D driver then add the opregion
support in Poulsbo 2D dirver like the Ironlake.


Thank's a lot!
Joey Lee

2010-08-23 15:40:18

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] Support MSI Poulsbo netbook U110/U115

On Mon, Aug 23, 2010 at 05:54:45AM -0600, Joey Lee wrote:
> I readed the following mail loop for Poulsbo drm driver:
>
> http://sourceforge.net/mailarchive/message.php?msg_name=49C3CB88.2000202%40shipmail.org
>
> Looks like GregKH is working on extract 2D video driver for
> Poulsbo/Morrestown. We will need the 2D driver then add the opregion
> support in Poulsbo 2D dirver like the Ironlake.

That was over a year ago and I quickly gave up on this effort as Intel
was not going to support it at all, sorry.

greg k -h