diff options
author | Iskren Chernev <iskren.chernev@gmail.com> | 2021-01-02 22:24:37 +0200 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2021-01-31 10:40:26 -0800 |
commit | 6cefa31e810404dafdfcdb94874146cea11626c2 (patch) | |
tree | 6bccb679873fe8c5bb9d4eeca769740be2f33d44 /drivers/gpu | |
parent | fe7952c629daec6fb71f55376cb2ed543fde3186 (diff) |
drm/msm: Fix MSM_INFO_GET_IOVA with carveout
The msm_gem_get_iova should be guarded with gpu != NULL and not aspace
!= NULL, because aspace is NULL when using vram carveout.
Fixes: 933415e24bd0d ("drm/msm: Add support for private address space instances")
Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/msm/msm_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 108c405e03dd..94525ac76d4e 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -788,9 +788,10 @@ static int msm_ioctl_gem_info_iova(struct drm_device *dev, struct drm_file *file, struct drm_gem_object *obj, uint64_t *iova) { + struct msm_drm_private *priv = dev->dev_private; struct msm_file_private *ctx = file->driver_priv; - if (!ctx->aspace) + if (!priv->gpu) return -EINVAL; /* |