linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/msm: Fix MSM_INFO_GET_IOVA with carveout
@ 2021-01-02 20:24 Iskren Chernev
  2021-01-03  1:30 ` Konrad Dybcio
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Iskren Chernev @ 2021-01-02 20:24 UTC (permalink / raw)
  To: Rob Clark
  Cc: ~postmarketos/upstreaming, Iskren Chernev, Sean Paul,
	David Airlie, Daniel Vetter, Bjorn Andersson, Jordan Crouse,
	linux-arm-msm, dri-devel, freedreno, linux-kernel

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>
---
 drivers/gpu/drm/msm/msm_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index c5e61cb3356df..c1953fb079133 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -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;
 
 	/*
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-08 13:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-02 20:24 [PATCH] drm/msm: Fix MSM_INFO_GET_IOVA with carveout Iskren Chernev
2021-01-03  1:30 ` Konrad Dybcio
2021-01-03 18:01 ` Alexey Minnekhanov
2021-01-07 17:20 ` Rob Clark
2021-01-07 22:36   ` Rob Clark
2021-01-08 13:56     ` Iskren Chernev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).