summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_bios.c
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2021-03-19 02:03:49 +0300
committerKarol Herbst <kherbst@redhat.com>2021-11-13 01:46:04 +0300
commitc0a808b06939a39f6f90c3a33436365e6ede0618 (patch)
tree5f8be2137d9fa7953f1307e7ae85c268e4cc5cbe /drivers/gpu/drm/nouveau/nouveau_bios.c
parentc5dac1f62153d08a2404bcd6292d72f8290c2c1d (diff)
downloadlinux-c0a808b06939a39f6f90c3a33436365e6ede0618.tar.xz
drm/nouveau/kms/nv50-: Correct size checks for cursors
Found this while trying to make some changes to the kms_cursor_crc test. curs507a_acquire checks that the width and height of the cursor framebuffer are equal (asyw->image.{w,h}). This isn't entirely correct though, as the height of the cursor can be larger than the size of the cursor, as long as the width is the same as the cursor size and there's no framebuffer offset. Note that I'm not entirely sure why this wasn't previously breaking kms_cursor_crc tests - they all set up cursors with the height being one pixel larger than the actual size of the cursor. But this seems to fix things, and the code before was definitely incorrect - so it's not really worth looking into further imho. Changes since v1: * Don't use crtc_w everywhere for determining cursor layout, just use fb size again * Change check so that we only check that the w/h of the cursor plane is the same, the width of the scanout surface is the same as the framebuffer width, and that there's no offset being used for the cursor surface. Signed-off-by: Lyude Paul <lyude@redhat.com> Cc: Martin Peres <martin.peres@mupuf.org> Cc: Jeremy Cline <jcline@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Karol Herbst <kherbst@redhat.com> Signed-off-by: Karol Herbst <kherbst@redhat.com> Link: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests/10
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bios.c')
0 files changed, 0 insertions, 0 deletions