]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Replace the hw mutex with a hw spinlock
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 14 Jan 2015 10:33:39 +0000 (02:33 -0800)
committerThomas Hellstrom <thellstrom@vmware.com>
Mon, 19 Jan 2015 11:02:13 +0000 (03:02 -0800)
commit9f9d6d75a0e4ec712458e2b881f4ec592684792d
treed2c1fc2d9384e197f54da6196223d7e640c5e0e9
parent021de8d1b224a9479c1409e65c3720e142aaf526
drm/vmwgfx: Replace the hw mutex with a hw spinlock

Fixes a case where we call vmw_fifo_idle() from within a wait function with
task state !TASK_RUNNING, which is illegal.

In addition, make the locking fine-grained, so that it is performed once
for every read- and write operation. This is of course more costly, but we
don't perform much register access in the timing critical paths anyway. Instead
we have the extra benefit of being sure that we don't forget the hw lock around
register accesses. I think currently the kms code was quite buggy w r t this.

This fixes Red Hat Bugzilla Bug 1180796

Cc: stable@vger.kernel.org
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c