]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/kms/nve4-nv108: Limit cursors to 128x128
authorLyude Paul <lyude@redhat.com>
Fri, 5 Mar 2021 01:52:41 +0000 (20:52 -0500)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 25 Mar 2021 00:00:04 +0000 (10:00 +1000)
commit8cf0a48547420c59f939b9f4a576212c2786a9a6
tree787817bd00aec1c2e2ad1073bb1419ec9854d896
parent3975a5c4961f343798c790aa451775f2e4212067
drm/nouveau/kms/nve4-nv108: Limit cursors to 128x128

While Kepler does technically support 256x256 cursors, it turns out that
Kepler actually has some additional requirements for scanout surfaces that
we're not enforcing correctly, which aren't present on Maxwell and later.
Cursor surfaces must always use small pages (4K), and overlay surfaces must
always use large pages (128K).

Fixing this correctly though will take a bit more work: as we'll need to
add some code in prepare_fb() to move cursor FBs in large pages to small
pages, and vice-versa for overlay FBs. So until we have the time to do
that, just limit cursor surfaces to 128x128 - a size small enough to always
default to small pages.

This means small ovlys are still broken on Kepler, but it is extremely
unlikely anyone cares about those anyway :).

Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: 731786fbf597 ("drm/nouveau/kms/nv50-: Report max cursor size to userspace")
Cc: <stable@vger.kernel.org> # v5.11+
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/dispnv50/disp.c