Commit 69898171 authored by Jani Nikula's avatar Jani Nikula

drm/i915/opregion: handle SWSCI Mailbox #2 obsoletion

Opregion Mailbox #2 is obsolete for SWSCI usage in opregion v2.x, and
repurposed in opregion v3.x. Warn about obsole mailbox presence in v2.x,
and ignore with an error for v3.x.

v2: Demote drm_warn() to drm_dbg() on opregion v2.x

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220210161603.647254-1-jani.nikula@intel.com
parent 66b09ddd
...@@ -932,9 +932,17 @@ int intel_opregion_setup(struct drm_i915_private *dev_priv) ...@@ -932,9 +932,17 @@ int intel_opregion_setup(struct drm_i915_private *dev_priv)
} }
if (mboxes & MBOX_SWSCI) { if (mboxes & MBOX_SWSCI) {
drm_dbg(&dev_priv->drm, "SWSCI supported\n"); u8 major = opregion->header->over.major;
opregion->swsci = base + OPREGION_SWSCI_OFFSET;
swsci_setup(dev_priv); if (major >= 3) {
drm_err(&dev_priv->drm, "SWSCI Mailbox #2 present for opregion v3.x, ignoring\n");
} else {
if (major >= 2)
drm_dbg(&dev_priv->drm, "SWSCI Mailbox #2 present for opregion v2.x\n");
drm_dbg(&dev_priv->drm, "SWSCI supported\n");
opregion->swsci = base + OPREGION_SWSCI_OFFSET;
swsci_setup(dev_priv);
}
} }
if (mboxes & MBOX_ASLE) { if (mboxes & MBOX_ASLE) {
......
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