Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3fcd0a9 authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nv50-nvc0: completely disable relocs



GPU virtual addresses are constant now so this should never be getting hit
anyway and userspace shouldn't break from them being ignored.

This is being done in preference to teaching the code how to deal with BOs
that exist at different virtual addresses within separate VMs.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 180cc306
Loading
Loading
Loading
Loading
+20 −17
Original line number Diff line number Diff line
@@ -333,6 +333,7 @@ static int
validate_list(struct nouveau_channel *chan, struct list_head *list,
	      struct drm_nouveau_gem_pushbuf_bo *pbbo, uint64_t user_pbbo_ptr)
{
	struct drm_nouveau_private *dev_priv = chan->dev->dev_private;
	struct drm_nouveau_gem_pushbuf_bo __user *upbbo =
				(void __force __user *)(uintptr_t)user_pbbo_ptr;
	struct drm_device *dev = chan->dev;
@@ -371,6 +372,7 @@ validate_list(struct nouveau_channel *chan, struct list_head *list,
			return ret;
		}

		if (dev_priv->card_type < NV_50) {
			if (nvbo->bo.offset == b->presumed.offset &&
			    ((nvbo->bo.mem.mem_type == TTM_PL_VRAM &&
			      b->presumed.domain & NOUVEAU_GEM_DOMAIN_VRAM) ||
@@ -390,6 +392,7 @@ validate_list(struct nouveau_channel *chan, struct list_head *list,
					     &b->presumed, sizeof(b->presumed)))
				return -EFAULT;
		}
	}

	return relocs;
}