]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/etnaviv: always allocate 4K for kernel ringbuffers
authorLucas Stach <l.stach@pengutronix.de>
Fri, 25 Oct 2024 15:14:17 +0000 (17:14 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Mon, 28 Oct 2024 15:49:04 +0000 (16:49 +0100)
Since the kernel ringbuffers are allocated from a larger suballocated
area, same as the user commandbufs, they don't need to be CPU page
sized. Allocate 4KB for the kernel ring buffers, as we never use more
than that.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_gpu.c

index 8c1ef86e901c5f35b6e5dd1bb280bb9500e2027c..c7d59c06ccd18978aca1484f70ea1f7f790a0fd2 100644 (file)
@@ -840,8 +840,7 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
                goto fail;
 
        /* Create buffer: */
-       ret = etnaviv_cmdbuf_init(priv->cmdbuf_suballoc, &gpu->buffer,
-                                 PAGE_SIZE);
+       ret = etnaviv_cmdbuf_init(priv->cmdbuf_suballoc, &gpu->buffer, SZ_4K);
        if (ret) {
                dev_err(gpu->dev, "could not create command buffer\n");
                goto fail;