All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: quirk away broken OpRegion VBT
@ 2012-03-24 22:51 Daniel Vetter
  2012-03-24 23:03 ` Chris Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2012-03-24 22:51 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, stable

Somehow the BIOS manages to screw things up when copying the VBT
around, because the one we scrap from the VBIOS rom actually works.

Cc: stable@kernel.org
Tested-by: Markus Heinz <markus.heinz@uni-dortmund.de>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28812
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_bios.c |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index e4317da..d6ffdbd 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -24,6 +24,7 @@
  *    Eric Anholt <eric@anholt.net>
  *
  */
+#include <linux/dmi.h>
 #include <drm/drm_dp_helper.h>
 #include "drmP.h"
 #include "drm.h"
@@ -662,6 +663,26 @@ init_vbt_defaults(struct drm_i915_private *dev_priv)
 	dev_priv->edp.bpp = 18;
 }
 
+static int __init intel_no_opregion_vbt_callback(const struct dmi_system_id *id)
+{
+	DRM_DEBUG_KMS("Falling back to manually reading VBT from "
+		      "VBIOS ROM for %s\n",
+		      id->ident);
+	return 1;
+}
+
+static const struct dmi_system_id intel_no_opregion_vbt[] = {
+	{
+		.callback = intel_no_opregion_vbt_callback,
+		.ident = "ThinkCentre A57",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "97027RG"),
+		},
+	},
+	{ }
+};
+
 /**
  * intel_parse_bios - find VBT and initialize settings from the BIOS
  * @dev: DRM device
@@ -682,7 +703,7 @@ intel_parse_bios(struct drm_device *dev)
 	init_vbt_defaults(dev_priv);
 
 	/* XXX Should this validation be moved to intel_opregion.c? */
-	if (dev_priv->opregion.vbt) {
+	if (!dmi_check_system(intel_no_opregion_vbt) && dev_priv->opregion.vbt) {
 		struct vbt_header *vbt = dev_priv->opregion.vbt;
 		if (memcmp(vbt->signature, "$VBT", 4) == 0) {
 			DRM_DEBUG_KMS("Using VBT from OpRegion: %20s\n",
-- 
1.7.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: quirk away broken OpRegion VBT
  2012-03-24 22:51 [PATCH] drm/i915: quirk away broken OpRegion VBT Daniel Vetter
@ 2012-03-24 23:03 ` Chris Wilson
  2012-03-26 18:54   ` Rodrigo Vivi
  2012-03-28 19:35   ` Jesse Barnes
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2012-03-24 23:03 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, stable

On Sat, 24 Mar 2012 23:51:30 +0100, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Somehow the BIOS manages to screw things up when copying the VBT
> around, because the one we scrap from the VBIOS rom actually works.
> 
> Cc: stable@kernel.org
> Tested-by: Markus Heinz <markus.heinz@uni-dortmund.de>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28812
> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

That completely disproves my theory that the BIOS writers that went to
the extra trouble to implement the OpRegion specification would be more
likely to get it right and to make the information stored there accurate.

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: quirk away broken OpRegion VBT
  2012-03-24 23:03 ` Chris Wilson
@ 2012-03-26 18:54   ` Rodrigo Vivi
  2012-03-28 19:35   ` Jesse Barnes
  1 sibling, 0 replies; 4+ messages in thread
From: Rodrigo Vivi @ 2012-03-26 18:54 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Daniel Vetter, Intel Graphics Development, stable

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>

On Sat, Mar 24, 2012 at 8:03 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Sat, 24 Mar 2012 23:51:30 +0100, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>> Somehow the BIOS manages to screw things up when copying the VBT
>> around, because the one we scrap from the VBIOS rom actually works.
>>
>> Cc: stable@kernel.org
>> Tested-by: Markus Heinz <markus.heinz@uni-dortmund.de>
>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28812
>> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> That completely disproves my theory that the BIOS writers that went to
> the extra trouble to implement the OpRegion specification would be more
> likely to get it right and to make the information stored there accurate.
>
> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
GPG: 0x905BE242 @ wwwkeys.pgp.net

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: quirk away broken OpRegion VBT
  2012-03-24 23:03 ` Chris Wilson
  2012-03-26 18:54   ` Rodrigo Vivi
@ 2012-03-28 19:35   ` Jesse Barnes
  1 sibling, 0 replies; 4+ messages in thread
From: Jesse Barnes @ 2012-03-28 19:35 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Daniel Vetter, Intel Graphics Development, stable


[-- Attachment #1.1: Type: text/plain, Size: 1082 bytes --]

On Sat, 24 Mar 2012 23:03:08 +0000
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> On Sat, 24 Mar 2012 23:51:30 +0100, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > Somehow the BIOS manages to screw things up when copying the VBT
> > around, because the one we scrap from the VBIOS rom actually works.
> > 
> > Cc: stable@kernel.org
> > Tested-by: Markus Heinz <markus.heinz@uni-dortmund.de>
> > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28812
> > Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> That completely disproves my theory that the BIOS writers that went to
> the extra trouble to implement the OpRegion specification would be more
> likely to get it right and to make the information stored there accurate.
> 
> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>

On some platforms OpRegion is the *only* way to get the VBT
reasonably... but quirking around broken ones is fine (though I suspect
we're not doing something right; the OpRegion VBT ought to be fine).

-- 
Jesse Barnes, Intel Open Source Technology Center

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-28 19:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-24 22:51 [PATCH] drm/i915: quirk away broken OpRegion VBT Daniel Vetter
2012-03-24 23:03 ` Chris Wilson
2012-03-26 18:54   ` Rodrigo Vivi
2012-03-28 19:35   ` Jesse Barnes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.