diff options
author | Jordan Crouse <jcrouse@codeaurora.org> | 2020-08-18 01:01:40 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-09-12 20:48:32 +0300 |
commit | 933415e24bd0dcb29f837040df20e677626054f8 (patch) | |
tree | 6d9c225dcd9da6425ddee05c6a272e43e0c8f736 /drivers/gpu/drm/msm/msm_gem_vma.c | |
parent | b145c6e65eb05e123097d726aa9d4f5b8f11c401 (diff) | |
download | linux-933415e24bd0dcb29f837040df20e677626054f8.tar.xz |
drm/msm: Add support for private address space instances
Add support for allocating private address space instances. Targets that
support per-context pagetables should implement their own function to
allocate private address spaces.
The default will return a pointer to the global address space.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem_vma.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem_vma.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c index 5f6a11211b64..29cc1305cf37 100644 --- a/drivers/gpu/drm/msm/msm_gem_vma.c +++ b/drivers/gpu/drm/msm/msm_gem_vma.c @@ -27,6 +27,15 @@ void msm_gem_address_space_put(struct msm_gem_address_space *aspace) kref_put(&aspace->kref, msm_gem_address_space_destroy); } +struct msm_gem_address_space * +msm_gem_address_space_get(struct msm_gem_address_space *aspace) +{ + if (!IS_ERR_OR_NULL(aspace)) + kref_get(&aspace->kref); + + return aspace; +} + /* Actually unmap memory for the vma */ void msm_gem_purge_vma(struct msm_gem_address_space *aspace, struct msm_gem_vma *vma) |