drm/etnaviv: skip command stream validation on PPAS capable GPUs
authorLucas Stach <l.stach@pengutronix.de>
Fri, 2 Aug 2019 12:24:06 +0000 (14:24 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Thu, 15 Aug 2019 09:57:27 +0000 (11:57 +0200)
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>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c

index 16e7d371a7ef533dc0f45201b4e21350e89e7f1e..63a1206492d2d51e64a392a328534c6e382f5c69 100644 (file)
@@ -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;