Commit 25e341cf authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: quirk away broken OpRegion VBT

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: default avatarMarkus Heinz <markus.heinz@uni-dortmund.de>
Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28812Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent aa464191
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* Eric Anholt <eric@anholt.net> * Eric Anholt <eric@anholt.net>
* *
*/ */
#include <linux/dmi.h>
#include <drm/drm_dp_helper.h> #include <drm/drm_dp_helper.h>
#include "drmP.h" #include "drmP.h"
#include "drm.h" #include "drm.h"
...@@ -621,6 +622,26 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) ...@@ -621,6 +622,26 @@ init_vbt_defaults(struct drm_i915_private *dev_priv)
dev_priv->edp.bpp = 18; 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 * intel_parse_bios - find VBT and initialize settings from the BIOS
* @dev: DRM device * @dev: DRM device
...@@ -641,7 +662,7 @@ intel_parse_bios(struct drm_device *dev) ...@@ -641,7 +662,7 @@ intel_parse_bios(struct drm_device *dev)
init_vbt_defaults(dev_priv); init_vbt_defaults(dev_priv);
/* XXX Should this validation be moved to intel_opregion.c? */ /* 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; struct vbt_header *vbt = dev_priv->opregion.vbt;
if (memcmp(vbt->signature, "$VBT", 4) == 0) { if (memcmp(vbt->signature, "$VBT", 4) == 0) {
DRM_DEBUG_KMS("Using VBT from OpRegion: %20s\n", DRM_DEBUG_KMS("Using VBT from OpRegion: %20s\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment