]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/nouveau/kms/gk104-gp1xx: Fix > 64x64 cursors
authorLyude Paul <lyude@redhat.com>
Tue, 19 Jan 2021 01:54:14 +0000 (20:54 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2021 22:28:39 +0000 (23:28 +0100)
commit5ebb1cbe463f85c32f7bb584b661930ec3edb685
treed3651a0cebc22932937677e1460a5d6e555c31bb
parent0634449e9977c74c4bb32564ea3faf925d60039f
drm/nouveau/kms/gk104-gp1xx: Fix > 64x64 cursors

commit ba839b7598440a5d78550a115bac21b08d57cc32 upstream.

While we do handle the additional cursor sizes introduced in NVE4, it looks
like we accidentally broke this when converting over to use Nvidia's
display headers. Since we now use NVVAL in dispnv50/head907d.c in order to
format the value for the cursor layout and NVD9 only had one byte reserved
vs. the 2 bytes reserved in later generations, we end up accidentally
stripping the second bit in the cursor layout format parameter - causing us
to set the wrong cursor size.

This fixes that by adding our own curs_set hook for 917d which uses the
NV917D headers.

Cc: Martin Peres <martin.peres@free.fr>
Cc: Jeremy Cline <jcline@redhat.com>
Cc: Simon Ser <contact@emersion.fr>
Cc: <stable@vger.kernel.org> # v5.9+
Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: ed0b86a90bf9 ("drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_curs_set()")
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/dispnv50/head917d.c
drivers/gpu/drm/nouveau/include/nvhw/class/cl917d.h