提交 2795aa48 编写于 作者: D Daniel Vetter

drm/i915: Clarify irq_lock locking, intel_tv_detect

->detect callbacks are only ever called from process context, and
there's no fancy nesting going on here. So plain _irq spinlock
variants is what we want.
Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 5b254c59
...@@ -1182,18 +1182,17 @@ intel_tv_detect_type(struct intel_tv *intel_tv, ...@@ -1182,18 +1182,17 @@ intel_tv_detect_type(struct intel_tv *intel_tv,
struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct drm_device *dev = encoder->dev; struct drm_device *dev = encoder->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long irqflags;
u32 tv_ctl, save_tv_ctl; u32 tv_ctl, save_tv_ctl;
u32 tv_dac, save_tv_dac; u32 tv_dac, save_tv_dac;
int type; int type;
/* Disable TV interrupts around load detect or we'll recurse */ /* Disable TV interrupts around load detect or we'll recurse */
if (connector->polled & DRM_CONNECTOR_POLL_HPD) { if (connector->polled & DRM_CONNECTOR_POLL_HPD) {
spin_lock_irqsave(&dev_priv->irq_lock, irqflags); spin_lock_irq(&dev_priv->irq_lock);
i915_disable_pipestat(dev_priv, 0, i915_disable_pipestat(dev_priv, 0,
PIPE_HOTPLUG_INTERRUPT_STATUS | PIPE_HOTPLUG_INTERRUPT_STATUS |
PIPE_HOTPLUG_TV_INTERRUPT_STATUS); PIPE_HOTPLUG_TV_INTERRUPT_STATUS);
spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags); spin_unlock_irq(&dev_priv->irq_lock);
} }
save_tv_dac = tv_dac = I915_READ(TV_DAC); save_tv_dac = tv_dac = I915_READ(TV_DAC);
...@@ -1266,11 +1265,11 @@ intel_tv_detect_type(struct intel_tv *intel_tv, ...@@ -1266,11 +1265,11 @@ intel_tv_detect_type(struct intel_tv *intel_tv,
/* Restore interrupt config */ /* Restore interrupt config */
if (connector->polled & DRM_CONNECTOR_POLL_HPD) { if (connector->polled & DRM_CONNECTOR_POLL_HPD) {
spin_lock_irqsave(&dev_priv->irq_lock, irqflags); spin_lock_irq(&dev_priv->irq_lock);
i915_enable_pipestat(dev_priv, 0, i915_enable_pipestat(dev_priv, 0,
PIPE_HOTPLUG_INTERRUPT_STATUS | PIPE_HOTPLUG_INTERRUPT_STATUS |
PIPE_HOTPLUG_TV_INTERRUPT_STATUS); PIPE_HOTPLUG_TV_INTERRUPT_STATUS);
spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags); spin_unlock_irq(&dev_priv->irq_lock);
} }
return type; return type;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册