Hi Greg, Andrew -
Patch 1 is for DMI, bugfixes in patches 2-3 for i915 and included for
completeness. After a tested-by they should be good for stable. I'll
leave it to Daniel to sort out how the last two get in.
BR,
Jani.
Chris Wilson (1):
drm/i915: Quirk away phantom LVDS on Intel's D510MO mainboard
Jani Nikula (2):
dmi: add support for exact DMI matches in addition to substring
matching
drm/i915: Quirk away phantom LVDS on Intel's D525MW mainboard
drivers/firmware/dmi_scan.c | 12 +++++++++---
drivers/gpu/drm/i915/intel_lvds.c | 16 ++++++++++++++++
include/linux/mod_devicetable.h | 6 ++++--
3 files changed, 29 insertions(+), 5 deletions(-)
--
1.7.9.5
From: Chris Wilson <[email protected]>
This replaceable mainboard only has a VGA-out, yet it claims to also
have a connected LVDS header.
Reported-by: [email protected]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63860
Signed-off-by: Chris Wilson <[email protected]>
[Jani: Use DMI_EXACT_MATCH for board name.]
Signed-off-by: Jani Nikula <[email protected]>
---
drivers/gpu/drm/i915/intel_lvds.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 10c3d56..76213e4 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -690,6 +690,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Q900"),
},
},
+ {
+ .callback = intel_no_lvds_dmi_callback,
+ .ident = "Intel D510MO",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "D510MO"),
+ },
+ },
{ } /* terminating entry */
};
--
1.7.9.5
dmi_match() considers a substring match to be a successful match. This
is not always sufficient to distinguish between DMI data for different
systems. Add support for exact string matching using strcmp() in
addition to the substring matching using strstr().
The specific use case in the i915 driver is to allow us to use an exact
match for D510MO, without also incorrectly matching D510MOV:
{
.ident = "Intel D510MO",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "D510MO"),
},
}
Signed-off-by: Jani Nikula <[email protected]>
---
drivers/firmware/dmi_scan.c | 12 +++++++++---
include/linux/mod_devicetable.h | 6 ++++--
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index b95159b..eb760a2 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -551,9 +551,15 @@ static bool dmi_matches(const struct dmi_system_id *dmi)
int s = dmi->matches[i].slot;
if (s == DMI_NONE)
break;
- if (dmi_ident[s]
- && strstr(dmi_ident[s], dmi->matches[i].substr))
- continue;
+ if (dmi_ident[s]) {
+ if (!dmi->matches[i].exact_match &&
+ strstr(dmi_ident[s], dmi->matches[i].substr))
+ continue;
+ else if (dmi->matches[i].exact_match &&
+ !strcmp(dmi_ident[s], dmi->matches[i].substr))
+ continue;
+ }
+
/* No match */
return false;
}
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index b508016..b3bd7e7 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -456,7 +456,8 @@ enum dmi_field {
};
struct dmi_strmatch {
- unsigned char slot;
+ unsigned char slot:7;
+ unsigned char exact_match:1;
char substr[79];
};
@@ -474,7 +475,8 @@ struct dmi_system_id {
*/
#define dmi_device_id dmi_system_id
-#define DMI_MATCH(a, b) { a, b }
+#define DMI_MATCH(a, b) { .slot = a, .substr = b }
+#define DMI_EXACT_MATCH(a, b) { .slot = a, .substr = b, .exact_match = 1 }
#define PLATFORM_NAME_SIZE 20
#define PLATFORM_MODULE_PREFIX "platform:"
--
1.7.9.5
This replaceable mainboard only has a VGA-out, yet it claims to also
have a connected LVDS header.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65256
Reported-by: Cornel Panceac <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
---
drivers/gpu/drm/i915/intel_lvds.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 76213e4..607c06e 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -698,6 +698,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
DMI_EXACT_MATCH(DMI_BOARD_NAME, "D510MO"),
},
},
+ {
+ .callback = intel_no_lvds_dmi_callback,
+ .ident = "Intel D525MW",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "D525MW"),
+ },
+ },
{ } /* terminating entry */
};
--
1.7.9.5
With Greg's address fixed. Please drop the old one from any
replies. Sorry for the noise.
On Thu, 06 Jun 2013, Jani Nikula <[email protected]> wrote:
> Hi Greg, Andrew -
>
> Patch 1 is for DMI, bugfixes in patches 2-3 for i915 and included for
> completeness. After a tested-by they should be good for stable. I'll
> leave it to Daniel to sort out how the last two get in.
>
> BR,
> Jani.
>
> Chris Wilson (1):
> drm/i915: Quirk away phantom LVDS on Intel's D510MO mainboard
>
> Jani Nikula (2):
> dmi: add support for exact DMI matches in addition to substring
> matching
> drm/i915: Quirk away phantom LVDS on Intel's D525MW mainboard
>
> drivers/firmware/dmi_scan.c | 12 +++++++++---
> drivers/gpu/drm/i915/intel_lvds.c | 16 ++++++++++++++++
> include/linux/mod_devicetable.h | 6 ++++--
> 3 files changed, 29 insertions(+), 5 deletions(-)
>
> --
> 1.7.9.5
>
--
Jani Nikula, Intel Open Source Technology Center
On Thu, Jun 06, 2013 at 04:53:01PM +0300, Jani Nikula wrote:
> Hi Greg, Andrew -
>
> Patch 1 is for DMI, bugfixes in patches 2-3 for i915 and included for
> completeness. After a tested-by they should be good for stable. I'll
> leave it to Daniel to sort out how the last two get in.
I'd prefer all to go through the same tree (to avoid tracking them), and
conflicts around lvds quirks will be trivial at most. So no problem for me
if this doesn't go in through drm-next. So
Acked-by: Daniel Vetter <[email protected]>
on the i915 patches for merging through whatever tree the drm stuff goes
through.
-Daniel
>
> BR,
> Jani.
>
> Chris Wilson (1):
> drm/i915: Quirk away phantom LVDS on Intel's D510MO mainboard
>
> Jani Nikula (2):
> dmi: add support for exact DMI matches in addition to substring
> matching
> drm/i915: Quirk away phantom LVDS on Intel's D525MW mainboard
>
> drivers/firmware/dmi_scan.c | 12 +++++++++---
> drivers/gpu/drm/i915/intel_lvds.c | 16 ++++++++++++++++
> include/linux/mod_devicetable.h | 6 ++++--
> 3 files changed, 29 insertions(+), 5 deletions(-)
>
> --
> 1.7.9.5
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
On Thu, Jun 06, 2013 at 04:59:26PM +0300, Jani Nikula wrote:
>
> With Greg's address fixed. Please drop the old one from any
> replies. Sorry for the noise.
Oops, replied with the old one still there.
Greg, Andrew: Imo it's best to merge all three patches through the same
tree, so:
Acked-by: Daniel Vetter <[email protected]>
on the i915 parts of it. If you want I can also slurp them in through the
intel tree, including the new dmi match code.
Thanks, Daniel
>
> On Thu, 06 Jun 2013, Jani Nikula <[email protected]> wrote:
> > Hi Greg, Andrew -
> >
> > Patch 1 is for DMI, bugfixes in patches 2-3 for i915 and included for
> > completeness. After a tested-by they should be good for stable. I'll
> > leave it to Daniel to sort out how the last two get in.
> >
> > BR,
> > Jani.
> >
> > Chris Wilson (1):
> > drm/i915: Quirk away phantom LVDS on Intel's D510MO mainboard
> >
> > Jani Nikula (2):
> > dmi: add support for exact DMI matches in addition to substring
> > matching
> > drm/i915: Quirk away phantom LVDS on Intel's D525MW mainboard
> >
> > drivers/firmware/dmi_scan.c | 12 +++++++++---
> > drivers/gpu/drm/i915/intel_lvds.c | 16 ++++++++++++++++
> > include/linux/mod_devicetable.h | 6 ++++--
> > 3 files changed, 29 insertions(+), 5 deletions(-)
> >
> > --
> > 1.7.9.5
> >
>
> --
> Jani Nikula, Intel Open Source Technology Center
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
On Thu, Jun 13, 2013 at 10:22:05AM +0200, Daniel Vetter wrote:
> On Thu, Jun 06, 2013 at 04:59:26PM +0300, Jani Nikula wrote:
> >
> > With Greg's address fixed. Please drop the old one from any
> > replies. Sorry for the noise.
>
> Oops, replied with the old one still there.
>
> Greg, Andrew: Imo it's best to merge all three patches through the same
> tree, so:
>
> Acked-by: Daniel Vetter <[email protected]>
>
> on the i915 parts of it. If you want I can also slurp them in through the
> intel tree, including the new dmi match code.
Please feel free to take them through your tree, I don't need to take
them.
thanks,
greg k-h
On Fri, Jun 14, 2013 at 6:23 PM, Greg Kroah-Hartman
<[email protected]> wrote:
> On Thu, Jun 13, 2013 at 10:22:05AM +0200, Daniel Vetter wrote:
>> On Thu, Jun 06, 2013 at 04:59:26PM +0300, Jani Nikula wrote:
>> >
>> > With Greg's address fixed. Please drop the old one from any
>> > replies. Sorry for the noise.
>>
>> Oops, replied with the old one still there.
>>
>> Greg, Andrew: Imo it's best to merge all three patches through the same
>> tree, so:
>>
>> Acked-by: Daniel Vetter <[email protected]>
>>
>> on the i915 parts of it. If you want I can also slurp them in through the
>> intel tree, including the new dmi match code.
>
> Please feel free to take them through your tree, I don't need to take
> them.
Andrew already merged them, so I think we're good.
Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch