Commit 0b7029b7 authored by Mika Kahola's avatar Mika Kahola Committed by Jani Nikula

drm/i915: Check for fused or unused pipes

We may have fused or unused pipes in our system. Let's check that the pipe
in question is within limits of accessible pipes. In case, that we are not
able to access the pipe, we return early with a warning.

v2: Rephrasing of the commit message (Jani)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103206Reported-by: default avatarThomas Gleixner <tglx@linutronix.de>
Tested-by: default avatarJaswinder Singh Rajput <jaswinder@perfectintelligent.com>
Suggested-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarMika Kahola <mika.kahola@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1513584243-12607-1-git-send-email-mika.kahola@intel.com
parent 8a97bbcc
...@@ -779,7 +779,7 @@ static struct intel_encoder *get_saved_enc(struct drm_i915_private *dev_priv, ...@@ -779,7 +779,7 @@ static struct intel_encoder *get_saved_enc(struct drm_i915_private *dev_priv,
{ {
struct intel_encoder *encoder; struct intel_encoder *encoder;
if (WARN_ON(pipe >= INTEL_INFO(dev_priv)->num_pipes)) if (WARN_ON(pipe >= ARRAY_SIZE(dev_priv->av_enc_map)))
return NULL; return NULL;
/* MST */ /* MST */
......
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