Commit 67520415 authored by Chris Wilson's avatar Chris Wilson

drm/i915: s/assert_spin_locked/lockdep_assert_held/

assert_spin_locked() becomes an unconditionally compiled BUG_ON(),
adding debug code right into the heart of critical routines like
interrupt handlers.

   text	   data	    bss	    dec	    hex
1296480	  19944	   2272	1318696	 141f28	before (lockdep disabled)
1295984	  19944	   2272	1318200	 141d38	after

1336261	  21139	   3208	1360608	 14c2e0	before (lockdep enabled)
1339920	  21139	   3208	1364267	 14d12b	after

Small saving for release; hopefully more instructive in debug.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170302132801.599-1-chris@chris-wilson.co.ukReviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
parent e60a870d
...@@ -401,7 +401,7 @@ void __i915_gem_request_submit(struct drm_i915_gem_request *request) ...@@ -401,7 +401,7 @@ void __i915_gem_request_submit(struct drm_i915_gem_request *request)
u32 seqno; u32 seqno;
GEM_BUG_ON(!irqs_disabled()); GEM_BUG_ON(!irqs_disabled());
assert_spin_locked(&engine->timeline->lock); lockdep_assert_held(&engine->timeline->lock);
trace_i915_gem_request_execute(request); trace_i915_gem_request_execute(request);
...@@ -449,7 +449,7 @@ void __i915_gem_request_unsubmit(struct drm_i915_gem_request *request) ...@@ -449,7 +449,7 @@ void __i915_gem_request_unsubmit(struct drm_i915_gem_request *request)
struct intel_timeline *timeline; struct intel_timeline *timeline;
GEM_BUG_ON(!irqs_disabled()); GEM_BUG_ON(!irqs_disabled());
assert_spin_locked(&engine->timeline->lock); lockdep_assert_held(&engine->timeline->lock);
/* Only unwind in reverse order, required so that the per-context list /* Only unwind in reverse order, required so that the per-context list
* is kept in seqno/ring order. * is kept in seqno/ring order.
......
...@@ -180,7 +180,7 @@ i915_hotplug_interrupt_update_locked(struct drm_i915_private *dev_priv, ...@@ -180,7 +180,7 @@ i915_hotplug_interrupt_update_locked(struct drm_i915_private *dev_priv,
{ {
uint32_t val; uint32_t val;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
WARN_ON(bits & ~mask); WARN_ON(bits & ~mask);
val = I915_READ(PORT_HOTPLUG_EN); val = I915_READ(PORT_HOTPLUG_EN);
...@@ -222,7 +222,7 @@ void ilk_update_display_irq(struct drm_i915_private *dev_priv, ...@@ -222,7 +222,7 @@ void ilk_update_display_irq(struct drm_i915_private *dev_priv,
{ {
uint32_t new_val; uint32_t new_val;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
WARN_ON(enabled_irq_mask & ~interrupt_mask); WARN_ON(enabled_irq_mask & ~interrupt_mask);
...@@ -250,7 +250,7 @@ static void ilk_update_gt_irq(struct drm_i915_private *dev_priv, ...@@ -250,7 +250,7 @@ static void ilk_update_gt_irq(struct drm_i915_private *dev_priv,
uint32_t interrupt_mask, uint32_t interrupt_mask,
uint32_t enabled_irq_mask) uint32_t enabled_irq_mask)
{ {
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
WARN_ON(enabled_irq_mask & ~interrupt_mask); WARN_ON(enabled_irq_mask & ~interrupt_mask);
...@@ -302,7 +302,7 @@ static void snb_update_pm_irq(struct drm_i915_private *dev_priv, ...@@ -302,7 +302,7 @@ static void snb_update_pm_irq(struct drm_i915_private *dev_priv,
WARN_ON(enabled_irq_mask & ~interrupt_mask); WARN_ON(enabled_irq_mask & ~interrupt_mask);
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
new_val = dev_priv->pm_imr; new_val = dev_priv->pm_imr;
new_val &= ~interrupt_mask; new_val &= ~interrupt_mask;
...@@ -340,7 +340,7 @@ void gen6_reset_pm_iir(struct drm_i915_private *dev_priv, u32 reset_mask) ...@@ -340,7 +340,7 @@ void gen6_reset_pm_iir(struct drm_i915_private *dev_priv, u32 reset_mask)
{ {
i915_reg_t reg = gen6_pm_iir(dev_priv); i915_reg_t reg = gen6_pm_iir(dev_priv);
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
I915_WRITE(reg, reset_mask); I915_WRITE(reg, reset_mask);
I915_WRITE(reg, reset_mask); I915_WRITE(reg, reset_mask);
...@@ -349,7 +349,7 @@ void gen6_reset_pm_iir(struct drm_i915_private *dev_priv, u32 reset_mask) ...@@ -349,7 +349,7 @@ void gen6_reset_pm_iir(struct drm_i915_private *dev_priv, u32 reset_mask)
void gen6_enable_pm_irq(struct drm_i915_private *dev_priv, u32 enable_mask) void gen6_enable_pm_irq(struct drm_i915_private *dev_priv, u32 enable_mask)
{ {
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
dev_priv->pm_ier |= enable_mask; dev_priv->pm_ier |= enable_mask;
I915_WRITE(gen6_pm_ier(dev_priv), dev_priv->pm_ier); I915_WRITE(gen6_pm_ier(dev_priv), dev_priv->pm_ier);
...@@ -359,7 +359,7 @@ void gen6_enable_pm_irq(struct drm_i915_private *dev_priv, u32 enable_mask) ...@@ -359,7 +359,7 @@ void gen6_enable_pm_irq(struct drm_i915_private *dev_priv, u32 enable_mask)
void gen6_disable_pm_irq(struct drm_i915_private *dev_priv, u32 disable_mask) void gen6_disable_pm_irq(struct drm_i915_private *dev_priv, u32 disable_mask)
{ {
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
dev_priv->pm_ier &= ~disable_mask; dev_priv->pm_ier &= ~disable_mask;
__gen6_mask_pm_irq(dev_priv, disable_mask); __gen6_mask_pm_irq(dev_priv, disable_mask);
...@@ -463,7 +463,7 @@ static void bdw_update_port_irq(struct drm_i915_private *dev_priv, ...@@ -463,7 +463,7 @@ static void bdw_update_port_irq(struct drm_i915_private *dev_priv,
uint32_t new_val; uint32_t new_val;
uint32_t old_val; uint32_t old_val;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
WARN_ON(enabled_irq_mask & ~interrupt_mask); WARN_ON(enabled_irq_mask & ~interrupt_mask);
...@@ -496,7 +496,7 @@ void bdw_update_pipe_irq(struct drm_i915_private *dev_priv, ...@@ -496,7 +496,7 @@ void bdw_update_pipe_irq(struct drm_i915_private *dev_priv,
{ {
uint32_t new_val; uint32_t new_val;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
WARN_ON(enabled_irq_mask & ~interrupt_mask); WARN_ON(enabled_irq_mask & ~interrupt_mask);
...@@ -530,7 +530,7 @@ void ibx_display_interrupt_update(struct drm_i915_private *dev_priv, ...@@ -530,7 +530,7 @@ void ibx_display_interrupt_update(struct drm_i915_private *dev_priv,
WARN_ON(enabled_irq_mask & ~interrupt_mask); WARN_ON(enabled_irq_mask & ~interrupt_mask);
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
if (WARN_ON(!intel_irqs_enabled(dev_priv))) if (WARN_ON(!intel_irqs_enabled(dev_priv)))
return; return;
...@@ -546,7 +546,7 @@ __i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe, ...@@ -546,7 +546,7 @@ __i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,
i915_reg_t reg = PIPESTAT(pipe); i915_reg_t reg = PIPESTAT(pipe);
u32 pipestat = I915_READ(reg) & PIPESTAT_INT_ENABLE_MASK; u32 pipestat = I915_READ(reg) & PIPESTAT_INT_ENABLE_MASK;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
WARN_ON(!intel_irqs_enabled(dev_priv)); WARN_ON(!intel_irqs_enabled(dev_priv));
if (WARN_ONCE(enable_mask & ~PIPESTAT_INT_ENABLE_MASK || if (WARN_ONCE(enable_mask & ~PIPESTAT_INT_ENABLE_MASK ||
...@@ -573,7 +573,7 @@ __i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe, ...@@ -573,7 +573,7 @@ __i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,
i915_reg_t reg = PIPESTAT(pipe); i915_reg_t reg = PIPESTAT(pipe);
u32 pipestat = I915_READ(reg) & PIPESTAT_INT_ENABLE_MASK; u32 pipestat = I915_READ(reg) & PIPESTAT_INT_ENABLE_MASK;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
WARN_ON(!intel_irqs_enabled(dev_priv)); WARN_ON(!intel_irqs_enabled(dev_priv));
if (WARN_ONCE(enable_mask & ~PIPESTAT_INT_ENABLE_MASK || if (WARN_ONCE(enable_mask & ~PIPESTAT_INT_ENABLE_MASK ||
...@@ -3399,7 +3399,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev) ...@@ -3399,7 +3399,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
void valleyview_enable_display_irqs(struct drm_i915_private *dev_priv) void valleyview_enable_display_irqs(struct drm_i915_private *dev_priv)
{ {
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
if (dev_priv->display_irqs_enabled) if (dev_priv->display_irqs_enabled)
return; return;
...@@ -3414,7 +3414,7 @@ void valleyview_enable_display_irqs(struct drm_i915_private *dev_priv) ...@@ -3414,7 +3414,7 @@ void valleyview_enable_display_irqs(struct drm_i915_private *dev_priv)
void valleyview_disable_display_irqs(struct drm_i915_private *dev_priv) void valleyview_disable_display_irqs(struct drm_i915_private *dev_priv)
{ {
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
if (!dev_priv->display_irqs_enabled) if (!dev_priv->display_irqs_enabled)
return; return;
...@@ -4090,7 +4090,7 @@ static void i915_hpd_irq_setup(struct drm_i915_private *dev_priv) ...@@ -4090,7 +4090,7 @@ static void i915_hpd_irq_setup(struct drm_i915_private *dev_priv)
{ {
u32 hotplug_en; u32 hotplug_en;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
/* Note HDMI and DP share hotplug bits */ /* Note HDMI and DP share hotplug bits */
/* enable bits are the same for all generations */ /* enable bits are the same for all generations */
......
...@@ -1008,7 +1008,7 @@ static void hsw_disable_metric_set(struct drm_i915_private *dev_priv) ...@@ -1008,7 +1008,7 @@ static void hsw_disable_metric_set(struct drm_i915_private *dev_priv)
static void gen7_update_oacontrol_locked(struct drm_i915_private *dev_priv) static void gen7_update_oacontrol_locked(struct drm_i915_private *dev_priv)
{ {
assert_spin_locked(&dev_priv->perf.hook_lock); lockdep_assert_held(&dev_priv->perf.hook_lock);
if (dev_priv->perf.oa.exclusive_stream->enabled) { if (dev_priv->perf.oa.exclusive_stream->enabled) {
struct i915_gem_context *ctx = struct i915_gem_context *ctx =
......
...@@ -164,7 +164,7 @@ void __intel_engine_disarm_breadcrumbs(struct intel_engine_cs *engine) ...@@ -164,7 +164,7 @@ void __intel_engine_disarm_breadcrumbs(struct intel_engine_cs *engine)
{ {
struct intel_breadcrumbs *b = &engine->breadcrumbs; struct intel_breadcrumbs *b = &engine->breadcrumbs;
assert_spin_locked(&b->lock); lockdep_assert_held(&b->lock);
if (b->irq_enabled) { if (b->irq_enabled) {
irq_disable(engine); irq_disable(engine);
...@@ -228,7 +228,7 @@ static void __intel_breadcrumbs_enable_irq(struct intel_breadcrumbs *b) ...@@ -228,7 +228,7 @@ static void __intel_breadcrumbs_enable_irq(struct intel_breadcrumbs *b)
container_of(b, struct intel_engine_cs, breadcrumbs); container_of(b, struct intel_engine_cs, breadcrumbs);
struct drm_i915_private *i915 = engine->i915; struct drm_i915_private *i915 = engine->i915;
assert_spin_locked(&b->lock); lockdep_assert_held(&b->lock);
if (b->irq_armed) if (b->irq_armed)
return; return;
...@@ -276,7 +276,7 @@ static inline struct intel_wait *to_wait(struct rb_node *node) ...@@ -276,7 +276,7 @@ static inline struct intel_wait *to_wait(struct rb_node *node)
static inline void __intel_breadcrumbs_finish(struct intel_breadcrumbs *b, static inline void __intel_breadcrumbs_finish(struct intel_breadcrumbs *b,
struct intel_wait *wait) struct intel_wait *wait)
{ {
assert_spin_locked(&b->lock); lockdep_assert_held(&b->lock);
/* This request is completed, so remove it from the tree, mark it as /* This request is completed, so remove it from the tree, mark it as
* complete, and *then* wake up the associated task. * complete, and *then* wake up the associated task.
...@@ -432,7 +432,7 @@ static void __intel_engine_remove_wait(struct intel_engine_cs *engine, ...@@ -432,7 +432,7 @@ static void __intel_engine_remove_wait(struct intel_engine_cs *engine,
{ {
struct intel_breadcrumbs *b = &engine->breadcrumbs; struct intel_breadcrumbs *b = &engine->breadcrumbs;
assert_spin_locked(&b->lock); lockdep_assert_held(&b->lock);
if (RB_EMPTY_NODE(&wait->node)) if (RB_EMPTY_NODE(&wait->node))
goto out; goto out;
...@@ -654,7 +654,7 @@ void intel_engine_enable_signaling(struct drm_i915_gem_request *request) ...@@ -654,7 +654,7 @@ void intel_engine_enable_signaling(struct drm_i915_gem_request *request)
/* locked by dma_fence_enable_sw_signaling() (irqsafe fence->lock) */ /* locked by dma_fence_enable_sw_signaling() (irqsafe fence->lock) */
GEM_BUG_ON(!irqs_disabled()); GEM_BUG_ON(!irqs_disabled());
assert_spin_locked(&request->lock); lockdep_assert_held(&request->lock);
seqno = i915_gem_request_global_seqno(request); seqno = i915_gem_request_global_seqno(request);
if (!seqno) if (!seqno)
...@@ -711,7 +711,7 @@ void intel_engine_cancel_signaling(struct drm_i915_gem_request *request) ...@@ -711,7 +711,7 @@ void intel_engine_cancel_signaling(struct drm_i915_gem_request *request)
struct intel_breadcrumbs *b = &engine->breadcrumbs; struct intel_breadcrumbs *b = &engine->breadcrumbs;
GEM_BUG_ON(!irqs_disabled()); GEM_BUG_ON(!irqs_disabled());
assert_spin_locked(&request->lock); lockdep_assert_held(&request->lock);
GEM_BUG_ON(!request->signaling.wait.seqno); GEM_BUG_ON(!request->signaling.wait.seqno);
spin_lock(&b->lock); spin_lock(&b->lock);
......
...@@ -54,7 +54,7 @@ static bool ivb_can_enable_err_int(struct drm_device *dev) ...@@ -54,7 +54,7 @@ static bool ivb_can_enable_err_int(struct drm_device *dev)
struct intel_crtc *crtc; struct intel_crtc *crtc;
enum pipe pipe; enum pipe pipe;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
for_each_pipe(dev_priv, pipe) { for_each_pipe(dev_priv, pipe) {
crtc = intel_get_crtc_for_pipe(dev_priv, pipe); crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
...@@ -72,7 +72,7 @@ static bool cpt_can_enable_serr_int(struct drm_device *dev) ...@@ -72,7 +72,7 @@ static bool cpt_can_enable_serr_int(struct drm_device *dev)
enum pipe pipe; enum pipe pipe;
struct intel_crtc *crtc; struct intel_crtc *crtc;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
for_each_pipe(dev_priv, pipe) { for_each_pipe(dev_priv, pipe) {
crtc = intel_get_crtc_for_pipe(dev_priv, pipe); crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
...@@ -90,7 +90,7 @@ static void i9xx_check_fifo_underruns(struct intel_crtc *crtc) ...@@ -90,7 +90,7 @@ static void i9xx_check_fifo_underruns(struct intel_crtc *crtc)
i915_reg_t reg = PIPESTAT(crtc->pipe); i915_reg_t reg = PIPESTAT(crtc->pipe);
u32 pipestat = I915_READ(reg) & 0xffff0000; u32 pipestat = I915_READ(reg) & 0xffff0000;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
if ((pipestat & PIPE_FIFO_UNDERRUN_STATUS) == 0) if ((pipestat & PIPE_FIFO_UNDERRUN_STATUS) == 0)
return; return;
...@@ -109,7 +109,7 @@ static void i9xx_set_fifo_underrun_reporting(struct drm_device *dev, ...@@ -109,7 +109,7 @@ static void i9xx_set_fifo_underrun_reporting(struct drm_device *dev,
i915_reg_t reg = PIPESTAT(pipe); i915_reg_t reg = PIPESTAT(pipe);
u32 pipestat = I915_READ(reg) & 0xffff0000; u32 pipestat = I915_READ(reg) & 0xffff0000;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
if (enable) { if (enable) {
I915_WRITE(reg, pipestat | PIPE_FIFO_UNDERRUN_STATUS); I915_WRITE(reg, pipestat | PIPE_FIFO_UNDERRUN_STATUS);
...@@ -139,7 +139,7 @@ static void ivybridge_check_fifo_underruns(struct intel_crtc *crtc) ...@@ -139,7 +139,7 @@ static void ivybridge_check_fifo_underruns(struct intel_crtc *crtc)
enum pipe pipe = crtc->pipe; enum pipe pipe = crtc->pipe;
uint32_t err_int = I915_READ(GEN7_ERR_INT); uint32_t err_int = I915_READ(GEN7_ERR_INT);
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
if ((err_int & ERR_INT_FIFO_UNDERRUN(pipe)) == 0) if ((err_int & ERR_INT_FIFO_UNDERRUN(pipe)) == 0)
return; return;
...@@ -204,7 +204,7 @@ static void cpt_check_pch_fifo_underruns(struct intel_crtc *crtc) ...@@ -204,7 +204,7 @@ static void cpt_check_pch_fifo_underruns(struct intel_crtc *crtc)
enum transcoder pch_transcoder = (enum transcoder) crtc->pipe; enum transcoder pch_transcoder = (enum transcoder) crtc->pipe;
uint32_t serr_int = I915_READ(SERR_INT); uint32_t serr_int = I915_READ(SERR_INT);
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
if ((serr_int & SERR_INT_TRANS_FIFO_UNDERRUN(pch_transcoder)) == 0) if ((serr_int & SERR_INT_TRANS_FIFO_UNDERRUN(pch_transcoder)) == 0)
return; return;
...@@ -248,7 +248,7 @@ static bool __intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev, ...@@ -248,7 +248,7 @@ static bool __intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe); struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
bool old; bool old;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
old = !crtc->cpu_fifo_underrun_disabled; old = !crtc->cpu_fifo_underrun_disabled;
crtc->cpu_fifo_underrun_disabled = !enable; crtc->cpu_fifo_underrun_disabled = !enable;
......
...@@ -157,7 +157,7 @@ static void intel_hpd_irq_storm_disable(struct drm_i915_private *dev_priv) ...@@ -157,7 +157,7 @@ static void intel_hpd_irq_storm_disable(struct drm_i915_private *dev_priv)
enum hpd_pin pin; enum hpd_pin pin;
bool hpd_disabled = false; bool hpd_disabled = false;
assert_spin_locked(&dev_priv->irq_lock); lockdep_assert_held(&dev_priv->irq_lock);
list_for_each_entry(connector, &mode_config->connector_list, head) { list_for_each_entry(connector, &mode_config->connector_list, head) {
if (connector->polled != DRM_CONNECTOR_POLL_HPD) if (connector->polled != DRM_CONNECTOR_POLL_HPD)
......
...@@ -105,7 +105,7 @@ static int i915_pipe_crc_release(struct inode *inode, struct file *filep) ...@@ -105,7 +105,7 @@ static int i915_pipe_crc_release(struct inode *inode, struct file *filep)
static int pipe_crc_data_count(struct intel_pipe_crc *pipe_crc) static int pipe_crc_data_count(struct intel_pipe_crc *pipe_crc)
{ {
assert_spin_locked(&pipe_crc->lock); lockdep_assert_held(&pipe_crc->lock);
return CIRC_CNT(pipe_crc->head, pipe_crc->tail, return CIRC_CNT(pipe_crc->head, pipe_crc->tail,
INTEL_PIPE_CRC_ENTRIES_NR); INTEL_PIPE_CRC_ENTRIES_NR);
} }
......
...@@ -4672,7 +4672,7 @@ bool ironlake_set_drps(struct drm_i915_private *dev_priv, u8 val) ...@@ -4672,7 +4672,7 @@ bool ironlake_set_drps(struct drm_i915_private *dev_priv, u8 val)
{ {
u16 rgvswctl; u16 rgvswctl;
assert_spin_locked(&mchdev_lock); lockdep_assert_held(&mchdev_lock);
rgvswctl = I915_READ16(MEMSWCTL); rgvswctl = I915_READ16(MEMSWCTL);
if (rgvswctl & MEMCTL_CMD_STS) { if (rgvswctl & MEMCTL_CMD_STS) {
...@@ -6203,7 +6203,7 @@ static unsigned long __i915_chipset_val(struct drm_i915_private *dev_priv) ...@@ -6203,7 +6203,7 @@ static unsigned long __i915_chipset_val(struct drm_i915_private *dev_priv)
unsigned long now = jiffies_to_msecs(jiffies), diff1; unsigned long now = jiffies_to_msecs(jiffies), diff1;
int i; int i;
assert_spin_locked(&mchdev_lock); lockdep_assert_held(&mchdev_lock);
diff1 = now - dev_priv->ips.last_time1; diff1 = now - dev_priv->ips.last_time1;
...@@ -6308,7 +6308,7 @@ static void __i915_update_gfx_val(struct drm_i915_private *dev_priv) ...@@ -6308,7 +6308,7 @@ static void __i915_update_gfx_val(struct drm_i915_private *dev_priv)
u64 now, diff, diffms; u64 now, diff, diffms;
u32 count; u32 count;
assert_spin_locked(&mchdev_lock); lockdep_assert_held(&mchdev_lock);
now = ktime_get_raw_ns(); now = ktime_get_raw_ns();
diffms = now - dev_priv->ips.last_time2; diffms = now - dev_priv->ips.last_time2;
...@@ -6353,7 +6353,7 @@ static unsigned long __i915_gfx_val(struct drm_i915_private *dev_priv) ...@@ -6353,7 +6353,7 @@ static unsigned long __i915_gfx_val(struct drm_i915_private *dev_priv)
unsigned long t, corr, state1, corr2, state2; unsigned long t, corr, state1, corr2, state2;
u32 pxvid, ext_v; u32 pxvid, ext_v;
assert_spin_locked(&mchdev_lock); lockdep_assert_held(&mchdev_lock);
pxvid = I915_READ(PXVFREQ(dev_priv->rps.cur_freq)); pxvid = I915_READ(PXVFREQ(dev_priv->rps.cur_freq));
pxvid = (pxvid >> 24) & 0x7f; pxvid = (pxvid >> 24) & 0x7f;
......
...@@ -506,7 +506,7 @@ void intel_uncore_forcewake_get(struct drm_i915_private *dev_priv, ...@@ -506,7 +506,7 @@ void intel_uncore_forcewake_get(struct drm_i915_private *dev_priv,
void intel_uncore_forcewake_get__locked(struct drm_i915_private *dev_priv, void intel_uncore_forcewake_get__locked(struct drm_i915_private *dev_priv,
enum forcewake_domains fw_domains) enum forcewake_domains fw_domains)
{ {
assert_spin_locked(&dev_priv->uncore.lock); lockdep_assert_held(&dev_priv->uncore.lock);
if (!dev_priv->uncore.funcs.force_wake_get) if (!dev_priv->uncore.funcs.force_wake_get)
return; return;
...@@ -564,7 +564,7 @@ void intel_uncore_forcewake_put(struct drm_i915_private *dev_priv, ...@@ -564,7 +564,7 @@ void intel_uncore_forcewake_put(struct drm_i915_private *dev_priv,
void intel_uncore_forcewake_put__locked(struct drm_i915_private *dev_priv, void intel_uncore_forcewake_put__locked(struct drm_i915_private *dev_priv,
enum forcewake_domains fw_domains) enum forcewake_domains fw_domains)
{ {
assert_spin_locked(&dev_priv->uncore.lock); lockdep_assert_held(&dev_priv->uncore.lock);
if (!dev_priv->uncore.funcs.force_wake_put) if (!dev_priv->uncore.funcs.force_wake_put)
return; return;
......
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