* [PATCH] DRM/i915: Add QUIRK_INVERT_BRIGHTNESS for NCR machines.
@ 2012-10-14 13:46 Egbert Eich
2012-10-16 7:35 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Egbert Eich @ 2012-10-14 13:46 UTC (permalink / raw)
To: intel-gfx; +Cc: Egbert Eich
NCR machines with LVDS panels using Intel chipsets need to have the
QUIRK_INVERT_BRIGHTNESS bit set.
Unfortunately NCR doesn't set a meaningful subvendor/subdevice ID,
therefore we add a DMI dependent quirk list.
Signed-off-by: Egbert Eich <eich@suse.de>
---
drivers/gpu/drm/i915/intel_display.c | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3511eff..e809fc5 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7892,6 +7892,34 @@ struct intel_quirk {
void (*hook)(struct drm_device *dev);
};
+/* For systems that don't have a meaningful PCI subdevice/subvendor ID */
+struct intel_dmi_quirk {
+ void (*hook)(struct drm_device *dev);
+ const struct dmi_system_id (*dmi_id_list)[];
+};
+
+static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
+{
+ DRM_INFO("Backlight polarity reversed on %s\n", id->ident);
+ return 1;
+}
+
+static const struct intel_dmi_quirk intel_dmi_quirks[] = {
+ {
+ .dmi_id_list = &(const struct dmi_system_id[]) {
+ {
+ .callback = intel_dmi_reverse_brightness,
+ .ident = "NCR Corporation",
+ .matches = {DMI_MATCH(DMI_SYS_VENDOR, "NCR Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, ""),
+ },
+ },
+ { } /* terminating entry */
+ },
+ .hook = quirk_invert_brightness,
+ },
+};
+
static struct intel_quirk intel_quirks[] = {
/* HP Mini needs pipe A force quirk (LP: #322104) */
{ 0x27ae, 0x103c, 0x361a, quirk_pipea_force },
@@ -7931,6 +7959,10 @@ static void intel_init_quirks(struct drm_device *dev)
q->subsystem_device == PCI_ANY_ID))
q->hook(dev);
}
+ for (i = 0; i < ARRAY_SIZE(intel_dmi_quirks); i++) {
+ if (dmi_check_system(*intel_dmi_quirks[i].dmi_id_list) != 0)
+ intel_dmi_quirks[i].hook(dev);
+ }
}
/* Disable the VGA plane that we never use */
--
1.7.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] DRM/i915: Add QUIRK_INVERT_BRIGHTNESS for NCR machines.
2012-10-14 13:46 [PATCH] DRM/i915: Add QUIRK_INVERT_BRIGHTNESS for NCR machines Egbert Eich
@ 2012-10-16 7:35 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2012-10-16 7:35 UTC (permalink / raw)
To: Egbert Eich; +Cc: intel-gfx
On Sun, Oct 14, 2012 at 03:46:38PM +0200, Egbert Eich wrote:
> NCR machines with LVDS panels using Intel chipsets need to have the
> QUIRK_INVERT_BRIGHTNESS bit set.
> Unfortunately NCR doesn't set a meaningful subvendor/subdevice ID,
> therefore we add a DMI dependent quirk list.
>
> Signed-off-by: Egbert Eich <eich@suse.de>
Meh, I've hoped that this invert-brightness quirk would just disappear.
Looks like it's here to stay. Thanks for the patch, applied to -fixes.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-16 7:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-14 13:46 [PATCH] DRM/i915: Add QUIRK_INVERT_BRIGHTNESS for NCR machines Egbert Eich
2012-10-16 7:35 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox