diff options
author | Jani Nikula <jani.nikula@intel.com> | 2015-12-14 12:50:46 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2015-12-16 11:21:02 +0200 |
commit | b30581a4d64f226a064132d09364b51e82a01dde (patch) | |
tree | dc5514189ae4ce5d76566e3d392b5ba89aa6d026 /drivers/gpu/drm/i915/intel_bios.c | |
parent | b3cbd98b2572ada8df1f183190bd867183369df7 (diff) | |
download | lwn-b30581a4d64f226a064132d09364b51e82a01dde.tar.gz lwn-b30581a4d64f226a064132d09364b51e82a01dde.zip |
drm/i915: move "no VBT in opregion" quirk to intel_opregion_setup()
Check the quirk in intel_opregion_setup(), and don't initialize
opregion->vbt at all if the quirk says it's not present, hiding the
quirk from the rest of the driver.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/7cdc86eb441f8b7075142445a800b07ecf8c76cb.1450089383.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_bios.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_bios.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 070470fe9a91..401e1141f55f 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -24,7 +24,7 @@ * Eric Anholt <eric@anholt.net> * */ -#include <linux/dmi.h> + #include <drm/drm_dp_helper.h> #include <drm/drmP.h> #include <drm/i915_drm.h> @@ -1214,26 +1214,6 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) } } -static int 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"), - }, - }, - { } -}; - static const struct bdb_header *validate_vbt(const void *base, size_t size, const void *_vbt, @@ -1317,7 +1297,7 @@ intel_parse_bios(struct drm_device *dev) init_vbt_defaults(dev_priv); /* XXX Should this validation be moved to intel_opregion.c? */ - if (!dmi_check_system(intel_no_opregion_vbt) && dev_priv->opregion.vbt) + if (dev_priv->opregion.vbt) bdb = validate_vbt(dev_priv->opregion.header, OPREGION_SIZE, dev_priv->opregion.vbt, "OpRegion"); |