Commit 6cefa31e authored by Iskren Chernev's avatar Iskren Chernev Committed by Rob Clark

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: 933415e2 ("drm/msm: Add support for private address space instances")
Signed-off-by: default avatarIskren Chernev <iskren.chernev@gmail.com>
Tested-by: default avatarAlexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent fe7952c6
......@@ -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;
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment