diff options
author | Rob Clark <robdclark@chromium.org> | 2020-10-23 19:51:08 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-11-05 03:00:56 +0300 |
commit | 20224d715a882210428ea62bba93f1bc4a0afe23 (patch) | |
tree | cab4d2b0e55f4b85672eb1d61f3d3b76b76ae162 /drivers/gpu/drm/msm/msm_gem.h | |
parent | 599089c6af68300207ee1823230d31eda1f15959 (diff) | |
download | linux-20224d715a882210428ea62bba93f1bc4a0afe23.tar.xz |
drm/msm/submit: Move copy_from_user ahead of locking bos
We cannot switch to using obj->resv for locking without first moving all
the copy_from_user() ahead of submit_lock_objects(). Otherwise in the
mm fault path we aquire mm->mmap_sem before obj lock, but in the submit
path the order is reversed.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h index 766ce278c74a..1f4e5d871a23 100644 --- a/drivers/gpu/drm/msm/msm_gem.h +++ b/drivers/gpu/drm/msm/msm_gem.h @@ -240,7 +240,10 @@ struct msm_gem_submit { uint32_t type; uint32_t size; /* in dwords */ uint64_t iova; + uint32_t offset;/* in dwords */ uint32_t idx; /* cmdstream buffer idx in bos[] */ + uint32_t nr_relocs; + struct drm_msm_gem_submit_reloc *relocs; } *cmd; /* array of size nr_cmds */ struct { uint32_t flags; |