dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] drm/etnaviv: skip command stream validation on PPAS capable GPUs
@ 2019-08-09 12:05 Lucas Stach
  2019-08-09 12:05 ` [PATCH v2 2/3] drm/etnaviv: allow to request specific virtual address for gem mapping Lucas Stach
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lucas Stach @ 2019-08-09 12:05 UTC (permalink / raw)
  To: etnaviv; +Cc: patchwork-lst, kernel, dri-devel, Russell King

With per-process address spaces in place, a rogue process submitting
bogus command streams can only hurt itself. There is no need to
validate the command stream before execution anymore.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
index 16e7d371a7ef..63a1206492d2 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
@@ -517,7 +517,8 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data,
 	if (ret)
 		goto err_submit_objects;
 
-	if (!etnaviv_cmd_validate_one(gpu, stream, args->stream_size / 4,
+	if ((priv->mmu_global->version != ETNAVIV_IOMMU_V2) &&
+	    !etnaviv_cmd_validate_one(gpu, stream, args->stream_size / 4,
 				      relocs, args->nr_relocs)) {
 		ret = -EINVAL;
 		goto err_submit_objects;
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-08-15 10:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-09 12:05 [PATCH v2 1/3] drm/etnaviv: skip command stream validation on PPAS capable GPUs Lucas Stach
2019-08-09 12:05 ` [PATCH v2 2/3] drm/etnaviv: allow to request specific virtual address for gem mapping Lucas Stach
2019-08-14 12:29   ` Guido Günther
2019-08-09 12:05 ` [PATCH v2 3/3] drm/etnaviv: implement softpin Lucas Stach
2019-08-14 12:29   ` Guido Günther
2019-08-15 10:16     ` Lucas Stach
2019-08-14 12:05 ` [PATCH v2 1/3] drm/etnaviv: skip command stream validation on PPAS capable GPUs Guido Günther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox