]> Gentwo Git Trees - linux/.git/commit
drm/nouveau: verify that hardware supports the flush page address
authorTimur Tabi <ttabi@nvidia.com>
Thu, 13 Nov 2025 23:03:23 +0000 (17:03 -0600)
committerLyude Paul <lyude@redhat.com>
Mon, 24 Nov 2025 22:53:22 +0000 (17:53 -0500)
commit31d3354f42c0da34415164a1f621a195caa1f1bc
treea57543983c51d4c74b60e1d08f14fca010b5d716
parent04d98b3452331fa53ec3b698b66273af6ef73288
drm/nouveau: verify that hardware supports the flush page address

Ensure that the DMA address of the framebuffer flush page is not larger
than its hardware register.

On GPUs older than Hopper, the register for the address can hold up to a
40-bit address (right-shifted by 8 so that it fits in the 32-bit
register), and on Hopper and later it can be 52 bits (64-bit register
where bits 52-63 must be zero).

Recently it was discovered that under certain conditions, the flush page
could be allocated outside this range.  Although this bug was fixed, we
can ensure that any future changes to this code don't accidentally
generate an invalid page address.

Signed-off-by: Timur Tabi <ttabi@nvidia.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patch.msgid.link/20251113230323.1271726-2-ttabi@nvidia.com
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gb100.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gb202.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gh100.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c