Lines Matching +full:static +full:- +full:enable

58 static bool ivb_can_enable_err_int(struct drm_device *dev)  in ivb_can_enable_err_int()
64 lockdep_assert_held(&dev_priv->irq_lock); in ivb_can_enable_err_int()
69 if (crtc->cpu_fifo_underrun_disabled) in ivb_can_enable_err_int()
76 static bool cpt_can_enable_serr_int(struct drm_device *dev) in cpt_can_enable_serr_int()
82 lockdep_assert_held(&dev_priv->irq_lock); in cpt_can_enable_serr_int()
87 if (crtc->pch_fifo_underrun_disabled) in cpt_can_enable_serr_int()
94 static void i9xx_check_fifo_underruns(struct intel_crtc *crtc) in i9xx_check_fifo_underruns()
96 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in i9xx_check_fifo_underruns()
97 i915_reg_t reg = PIPESTAT(dev_priv, crtc->pipe); in i9xx_check_fifo_underruns()
100 lockdep_assert_held(&dev_priv->irq_lock); in i9xx_check_fifo_underruns()
105 enable_mask = i915_pipestat_enable_mask(dev_priv, crtc->pipe); in i9xx_check_fifo_underruns()
109 trace_intel_cpu_fifo_underrun(dev_priv, crtc->pipe); in i9xx_check_fifo_underruns()
110 drm_err(&dev_priv->drm, "pipe %c underrun\n", pipe_name(crtc->pipe)); in i9xx_check_fifo_underruns()
113 static void i9xx_set_fifo_underrun_reporting(struct drm_device *dev, in i9xx_set_fifo_underrun_reporting()
115 bool enable, bool old) in i9xx_set_fifo_underrun_reporting() argument
120 lockdep_assert_held(&dev_priv->irq_lock); in i9xx_set_fifo_underrun_reporting()
122 if (enable) { in i9xx_set_fifo_underrun_reporting()
130 drm_err(&dev_priv->drm, "pipe %c underrun\n", in i9xx_set_fifo_underrun_reporting()
135 static void ilk_set_fifo_underrun_reporting(struct drm_device *dev, in ilk_set_fifo_underrun_reporting()
136 enum pipe pipe, bool enable) in ilk_set_fifo_underrun_reporting() argument
142 if (enable) in ilk_set_fifo_underrun_reporting()
148 static void ivb_check_fifo_underruns(struct intel_crtc *crtc) in ivb_check_fifo_underruns()
150 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in ivb_check_fifo_underruns()
151 enum pipe pipe = crtc->pipe; in ivb_check_fifo_underruns()
154 lockdep_assert_held(&dev_priv->irq_lock); in ivb_check_fifo_underruns()
163 drm_err(&dev_priv->drm, "fifo underrun on pipe %c\n", pipe_name(pipe)); in ivb_check_fifo_underruns()
166 static void ivb_set_fifo_underrun_reporting(struct drm_device *dev, in ivb_set_fifo_underrun_reporting()
167 enum pipe pipe, bool enable, in ivb_set_fifo_underrun_reporting() argument
171 if (enable) { in ivb_set_fifo_underrun_reporting()
184 drm_err(&dev_priv->drm, in ivb_set_fifo_underrun_reporting()
191 static u32
204 static void bdw_set_fifo_underrun_reporting(struct drm_device *dev, in bdw_set_fifo_underrun_reporting()
205 enum pipe pipe, bool enable) in bdw_set_fifo_underrun_reporting() argument
210 if (enable) { in bdw_set_fifo_underrun_reporting()
222 static void ibx_set_fifo_underrun_reporting(struct drm_device *dev, in ibx_set_fifo_underrun_reporting()
224 bool enable) in ibx_set_fifo_underrun_reporting() argument
230 if (enable) in ibx_set_fifo_underrun_reporting()
236 static void cpt_check_pch_fifo_underruns(struct intel_crtc *crtc) in cpt_check_pch_fifo_underruns()
238 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); in cpt_check_pch_fifo_underruns()
239 enum pipe pch_transcoder = crtc->pipe; in cpt_check_pch_fifo_underruns()
242 lockdep_assert_held(&dev_priv->irq_lock); in cpt_check_pch_fifo_underruns()
252 drm_err(&dev_priv->drm, "pch fifo underrun on pch transcoder %c\n", in cpt_check_pch_fifo_underruns()
256 static void cpt_set_fifo_underrun_reporting(struct drm_device *dev, in cpt_set_fifo_underrun_reporting()
258 bool enable, bool old) in cpt_set_fifo_underrun_reporting() argument
262 if (enable) { in cpt_set_fifo_underrun_reporting()
275 drm_err(&dev_priv->drm, in cpt_set_fifo_underrun_reporting()
282 static bool __intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev, in __intel_set_cpu_fifo_underrun_reporting()
283 enum pipe pipe, bool enable) in __intel_set_cpu_fifo_underrun_reporting() argument
289 lockdep_assert_held(&dev_priv->irq_lock); in __intel_set_cpu_fifo_underrun_reporting()
291 old = !crtc->cpu_fifo_underrun_disabled; in __intel_set_cpu_fifo_underrun_reporting()
292 crtc->cpu_fifo_underrun_disabled = !enable; in __intel_set_cpu_fifo_underrun_reporting()
295 i9xx_set_fifo_underrun_reporting(dev, pipe, enable, old); in __intel_set_cpu_fifo_underrun_reporting()
297 ilk_set_fifo_underrun_reporting(dev, pipe, enable); in __intel_set_cpu_fifo_underrun_reporting()
299 ivb_set_fifo_underrun_reporting(dev, pipe, enable, old); in __intel_set_cpu_fifo_underrun_reporting()
301 bdw_set_fifo_underrun_reporting(dev, pipe, enable); in __intel_set_cpu_fifo_underrun_reporting()
307 * intel_set_cpu_fifo_underrun_reporting - set cpu fifo underrrun reporting state
310 * @enable: whether underruns should be reported or not
317 * disables for all due to shared interrupts. Actual reporting is still per-pipe
323 enum pipe pipe, bool enable) in intel_set_cpu_fifo_underrun_reporting() argument
328 spin_lock_irqsave(&dev_priv->irq_lock, flags); in intel_set_cpu_fifo_underrun_reporting()
329 ret = __intel_set_cpu_fifo_underrun_reporting(&dev_priv->drm, pipe, in intel_set_cpu_fifo_underrun_reporting()
330 enable); in intel_set_cpu_fifo_underrun_reporting()
331 spin_unlock_irqrestore(&dev_priv->irq_lock, flags); in intel_set_cpu_fifo_underrun_reporting()
337 * intel_set_pch_fifo_underrun_reporting - set PCH fifo underrun reporting state
340 * @enable: whether underruns should be reported or not
342 * This function makes us disable or enable PCH fifo underruns for a specific
346 * one interrupt mask/enable bit for all the transcoders.
352 bool enable) in intel_set_pch_fifo_underrun_reporting() argument
360 * NOTE: Pre-LPT has a fixed cpu pipe -> pch transcoder mapping, but LPT in intel_set_pch_fifo_underrun_reporting()
362 * pch transcoder -> pipe lookups from interrupt code simply store the in intel_set_pch_fifo_underrun_reporting()
368 spin_lock_irqsave(&dev_priv->irq_lock, flags); in intel_set_pch_fifo_underrun_reporting()
370 old = !crtc->pch_fifo_underrun_disabled; in intel_set_pch_fifo_underrun_reporting()
371 crtc->pch_fifo_underrun_disabled = !enable; in intel_set_pch_fifo_underrun_reporting()
374 ibx_set_fifo_underrun_reporting(&dev_priv->drm, in intel_set_pch_fifo_underrun_reporting()
376 enable); in intel_set_pch_fifo_underrun_reporting()
378 cpt_set_fifo_underrun_reporting(&dev_priv->drm, in intel_set_pch_fifo_underrun_reporting()
380 enable, old); in intel_set_pch_fifo_underrun_reporting()
382 spin_unlock_irqrestore(&dev_priv->irq_lock, flags); in intel_set_pch_fifo_underrun_reporting()
387 * intel_cpu_fifo_underrun_irq_handler - handle CPU fifo underrun interrupt
407 crtc->cpu_fifo_underrun_disabled) in intel_cpu_fifo_underrun_irq_handler()
415 * write-1-to-clear logic) too. in intel_cpu_fifo_underrun_irq_handler()
433 drm_err(&dev_priv->drm, "CPU pipe %c FIFO underrun: %s%s%s%s\n", in intel_cpu_fifo_underrun_irq_handler()
440 drm_err(&dev_priv->drm, "CPU pipe %c FIFO underrun\n", pipe_name(pipe)); in intel_cpu_fifo_underrun_irq_handler()
443 intel_fbc_handle_fifo_underrun_irq(&dev_priv->display); in intel_cpu_fifo_underrun_irq_handler()
447 * intel_pch_fifo_underrun_irq_handler - handle PCH fifo underrun interrupt
461 drm_err(&dev_priv->drm, "PCH transcoder %c FIFO underrun\n", in intel_pch_fifo_underrun_irq_handler()
467 * intel_check_cpu_fifo_underruns - check for CPU fifo underruns immediately
479 spin_lock_irq(&dev_priv->irq_lock); in intel_check_cpu_fifo_underruns()
481 for_each_intel_crtc(&dev_priv->drm, crtc) { in intel_check_cpu_fifo_underruns()
482 if (crtc->cpu_fifo_underrun_disabled) in intel_check_cpu_fifo_underruns()
491 spin_unlock_irq(&dev_priv->irq_lock); in intel_check_cpu_fifo_underruns()
495 * intel_check_pch_fifo_underruns - check for PCH fifo underruns immediately
506 spin_lock_irq(&dev_priv->irq_lock); in intel_check_pch_fifo_underruns()
508 for_each_intel_crtc(&dev_priv->drm, crtc) { in intel_check_pch_fifo_underruns()
509 if (crtc->pch_fifo_underrun_disabled) in intel_check_pch_fifo_underruns()
516 spin_unlock_irq(&dev_priv->irq_lock); in intel_check_pch_fifo_underruns()
521 bool enable) in intel_init_fifo_underrun_reporting() argument
523 crtc->cpu_fifo_underrun_disabled = !enable; in intel_init_fifo_underrun_reporting()
529 * it for PCH transcoder B, etc. LPT-H has only PCH transcoder A, in intel_init_fifo_underrun_reporting()
530 * and marking underrun reporting as disabled for the non-existing in intel_init_fifo_underrun_reporting()
534 if (intel_has_pch_trancoder(i915, crtc->pipe)) in intel_init_fifo_underrun_reporting()
535 crtc->pch_fifo_underrun_disabled = !enable; in intel_init_fifo_underrun_reporting()