Skip to content

Commit edb5ff0

Browse files
committed
drm/etnaviv: skip command stream validation on PPAS capable GPUs
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>
1 parent 17e4660 commit edb5ff0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,8 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data,
517517
if (ret)
518518
goto err_submit_objects;
519519

520-
if (!etnaviv_cmd_validate_one(gpu, stream, args->stream_size / 4,
520+
if ((priv->mmu_global->version != ETNAVIV_IOMMU_V2) &&
521+
!etnaviv_cmd_validate_one(gpu, stream, args->stream_size / 4,
521522
relocs, args->nr_relocs)) {
522523
ret = -EINVAL;
523524
goto err_submit_objects;

0 commit comments

Comments
 (0)