diff mbox series

drm/etnaviv: relax submit size limits

Message ID 20220106181021.3760251-1-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series drm/etnaviv: relax submit size limits | expand

Commit Message

Lucas Stach Jan. 6, 2022, 6:10 p.m. UTC
While all userspace tried to limit commandstreams to 64K in size,
a bug in the Mesa driver lead to command streams of up to 128K
being submitted. Allow those to avoid breaking existing userspace.

Fixes: 6dfa2fab8ddd ("drm/etnaviv: limit submit sizes")
Cc: stable@vger.kernel.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Christian Gmeiner Jan. 9, 2022, 2:54 p.m. UTC | #1
Am Do., 6. Jan. 2022 um 19:10 Uhr schrieb Lucas Stach <l.stach@pengutronix.de>:
>
> While all userspace tried to limit commandstreams to 64K in size,
> a bug in the Mesa driver lead to command streams of up to 128K
> being submitted. Allow those to avoid breaking existing userspace.
>
> Fixes: 6dfa2fab8ddd ("drm/etnaviv: limit submit sizes")
> Cc: stable@vger.kernel.org
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
index 43da5800bfa3..0dc07c3d72a2 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
@@ -469,8 +469,8 @@  int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data,
 		return -EINVAL;
 	}
 
-	if (args->stream_size > SZ_64K || args->nr_relocs > SZ_64K ||
-	    args->nr_bos > SZ_64K || args->nr_pmrs > 128) {
+	if (args->stream_size > SZ_128K || args->nr_relocs > SZ_128K ||
+	    args->nr_bos > SZ_128K || args->nr_pmrs > 128) {
 		DRM_ERROR("submit arguments out of size limits\n");
 		return -EINVAL;
 	}