]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/nouveau: Add DRM_IOCTL_NOUVEAU_GET_ZCULL_INFO
authorMel Henning <mhenning@darkrefraction.com>
Thu, 19 Feb 2026 20:05:54 +0000 (15:05 -0500)
committerDanilo Krummrich <dakr@kernel.org>
Tue, 24 Feb 2026 14:04:55 +0000 (15:04 +0100)
commit196b2b95fec447c2c4460f753b277d840633fbef
tree60eab05ef026516a6992de80e0eff3c3659e8825
parent27e125e5568ae4185ffd97abe5b7851ce4f67fe5
drm/nouveau: Add DRM_IOCTL_NOUVEAU_GET_ZCULL_INFO

Add kernel-side support for using the zcull hardware in nvidia gpus.
zcull aims to improve memory bandwidth by using an early approximate
depth test, similar to hierarchical Z on an AMD card.

Add a new ioctl that exposes zcull information that has been read
from the hardware. Userspace uses each of these parameters either
in a heuristic for determining zcull region parameters or in the
calculation of a buffer size.

It appears the hardware hasn't changed its structure for these
values since FERMI_C (circa 2011), so the assumption is that it
won't change on us too quickly, and is therefore reasonable to
include in UAPI.

This bypasses the nvif layer and instead accesses nvkm_gr directly,
which mirrors existing usage of nvkm_gr_units(). There is no nvif
object for nvkm_gr yet, and adding one is not trivial.

Signed-off-by: Mel Henning <mhenning@darkrefraction.com>
Link: https://patch.msgid.link/20260219-zcull3-v3-2-dbe6a716f104@darkrefraction.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
drivers/gpu/drm/nouveau/nouveau_abi16.c
drivers/gpu/drm/nouveau/nouveau_abi16.h
drivers/gpu/drm/nouveau/nouveau_drm.c
include/uapi/drm/nouveau_drm.h