diff options
author | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2021-12-21 21:00:50 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-21 21:24:25 +0200 |
commit | a6cecaf058c48c6def2548473d814a2d54cb3667 (patch) | |
tree | d2f92d17dd983ee9f37da23c34a62554ab3fadad /drivers/fpga/fpga-mgr.c | |
parent | 60d1bb301ea5a4be3e1071d3d0c179140b270ef8 (diff) |
drm/i915: Require the vm mutex for i915_vma_bind()
[ Upstream commit c2ea703dcafccf18d7d77d8b68fb08c2d9842b7a ]
Protect updates of struct i915_vma flags and async binding / unbinding
with the vm::mutex. This means that i915_vma_bind() needs to assert
vm::mutex held. In order to make that possible drop the caching of
kmap_atomic() maps around i915_vma_bind().
An alternative would be to use kmap_local() but since we block cpu
unplugging during sleeps inside kmap_local() sections this may have
unwanted side-effects. Particularly since we might wait for gpu while
holding the vm mutex.
This change may theoretically increase execbuf cpu-usage on snb, but
at least on non-highmem systems that increase should be very small.
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211221200050.436316-5-thomas.hellstrom@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions