提交 5f35ae00 编写于 作者: I Iskren Chernev 提交者: Zheng Zengkai

drm/msm: Fix MSM_INFO_GET_IOVA with carveout

stable inclusion
from stable-5.10.20
commit b016a9f0c546a75319da0f8eb43b4b7a720d45f6
bugzilla: 50608

--------------------------------

[ Upstream commit 6cefa31e ]

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: NIskren Chernev <iskren.chernev@gmail.com>
Tested-by: NAlexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: NRob Clark <robdclark@chromium.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 8b0e4e19
......@@ -775,9 +775,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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册