[15/15] debug kludge

Submitted by Ville Syrjala on March 2, 2018, 3:15 p.m.

Details

Message ID 20180302151519.24531-15-ville.syrjala@linux.intel.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Intel GFX - Try Bot

Not browsing as part of any series.

Commit Message

Ville Syrjala March 2, 2018, 3:15 p.m.
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

---
 drivers/gpu/drm/i915/intel_drv.h | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index fd64016476a4..2194caa9c298 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1216,6 +1216,8 @@  vlv_pipe_to_channel(enum pipe pipe)
 static inline struct intel_crtc *
 intel_get_crtc_for_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
 {
+	if (WARN_ON(pipe == INVALID_PIPE))
+		return NULL;
 	return dev_priv->pipe_to_crtc_mapping[pipe];
 }