diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2019-06-07 00:27:43 +0200 |
---|---|---|
committer | Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> | 2019-06-26 22:56:40 -0300 |
commit | a0e4e5754ccec8c3ae518eaf3830865ae2b39efe (patch) | |
tree | e85b61b6bfb57a0b3ec62831d01ee7d7f3d31c83 /drivers/gpu/drm | |
parent | 18d0952a838ba559655b0cd9cf85097ad63d9bca (diff) | |
download | linux-a0e4e5754ccec8c3ae518eaf3830865ae2b39efe.tar.bz2 |
drm/vkms: Use spin_lock_irq in process context
The worker is always in process context, no need for the _irqsafe
version. Same for the set_source callback, that's only called from the
debugfs handler in a syscall.
Cc: Shayenne Moura <shayenneluzmoura@gmail.com>
Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Tested-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190606222751.32567-3-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/vkms/vkms_crc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_crc.c b/drivers/gpu/drm/vkms/vkms_crc.c index e9fb4ebb789f..d8a2872c58dd 100644 --- a/drivers/gpu/drm/vkms/vkms_crc.c +++ b/drivers/gpu/drm/vkms/vkms_crc.c @@ -167,16 +167,15 @@ void vkms_crc_work_handle(struct work_struct *work) u32 crc32 = 0; u64 frame_start, frame_end; bool crc_pending; - unsigned long flags; - spin_lock_irqsave(&out->state_lock, flags); + spin_lock_irq(&out->state_lock); frame_start = crtc_state->frame_start; frame_end = crtc_state->frame_end; crc_pending = crtc_state->crc_pending; crtc_state->frame_start = 0; crtc_state->frame_end = 0; crtc_state->crc_pending = false; - spin_unlock_irqrestore(&out->state_lock, flags); + spin_unlock_irq(&out->state_lock); /* * We raced with the vblank hrtimer and previous work already computed @@ -255,7 +254,6 @@ int vkms_set_crc_source(struct drm_crtc *crtc, const char *src_name) { struct vkms_output *out = drm_crtc_to_vkms_output(crtc); bool enabled = false; - unsigned long flags; int ret = 0; ret = vkms_crc_parse_source(src_name, &enabled); @@ -263,9 +261,9 @@ int vkms_set_crc_source(struct drm_crtc *crtc, const char *src_name) /* make sure nothing is scheduled on crtc workq */ flush_workqueue(out->crc_workq); - spin_lock_irqsave(&out->lock, flags); + spin_lock_irq(&out->lock); out->crc_enabled = enabled; - spin_unlock_irqrestore(&out->lock, flags); + spin_unlock_irq(&out->lock); return ret; } |