Lyude Paul
2021-Jan-19 01:54 UTC
[Nouveau] [PATCH 2/3] drm/nouveau/kms/nv50-: Report max cursor size to userspace
Cc: Martin Peres <martin.peres at free.fr> Cc: Jeremy Cline <jcline at redhat.com> Cc: Simon Ser <contact at emersion.fr> Signed-off-by: Lyude Paul <lyude at redhat.com> --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index c6367035970e..5f4f09a601d4 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -2663,6 +2663,14 @@ nv50_display_create(struct drm_device *dev) else nouveau_display(dev)->format_modifiers = disp50xx_modifiers; + if (disp->disp->object.oclass >= GK104_DISP) { + dev->mode_config.cursor_width = 256; + dev->mode_config.cursor_height = 256; + } else { + dev->mode_config.cursor_width = 64; + dev->mode_config.cursor_height = 64; + } + /* create crtc objects to represent the hw heads */ if (disp->disp->object.oclass >= GV100_DISP) crtcs = nvif_rd32(&device->object, 0x610060) & 0xff; -- 2.29.2
Simon Ser
2021-Jan-19 10:22 UTC
[Nouveau] [PATCH 2/3] drm/nouveau/kms/nv50-: Report max cursor size to userspace
On Tuesday, January 19th, 2021 at 2:54 AM, Lyude Paul <lyude at redhat.com> wrote:> Cc: Martin Peres <martin.peres at free.fr> > Cc: Jeremy Cline <jcline at redhat.com> > Cc: Simon Ser <contact at emersion.fr> > Signed-off-by: Lyude Paul <lyude at redhat.com> > --- > drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c > index c6367035970e..5f4f09a601d4 100644 > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c > @@ -2663,6 +2663,14 @@ nv50_display_create(struct drm_device *dev) > else > nouveau_display(dev)->format_modifiers = disp50xx_modifiers; > > + if (disp->disp->object.oclass >= GK104_DISP) {I can confirm this works fine on GK208B. Tested with wlroots. I don't have older cards to test, though. Tested-by: Simon Ser <contact at emersion.fr>> + dev->mode_config.cursor_width = 256; > + dev->mode_config.cursor_height = 256; > + } else { > + dev->mode_config.cursor_width = 64; > + dev->mode_config.cursor_height = 64; > + } > + > /* create crtc objects to represent the hw heads */ > if (disp->disp->object.oclass >= GV100_DISP) > crtcs = nvif_rd32(&device->object, 0x610060) & 0xff; > -- > 2.29.2
Alex Riesen
2021-Feb-23 14:15 UTC
[Nouveau] [PATCH 2/3] drm/nouveau/kms/nv50-: Report max cursor size to userspace
Lyude Paul, Tue, Jan 19, 2021 02:54:13 +0100:> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c > index c6367035970e..5f4f09a601d4 100644 > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c > @@ -2663,6 +2663,14 @@ nv50_display_create(struct drm_device *dev) > else > nouveau_display(dev)->format_modifiers = disp50xx_modifiers; > > + if (disp->disp->object.oclass >= GK104_DISP) { > + dev->mode_config.cursor_width = 256; > + dev->mode_config.cursor_height = 256; > + } else { > + dev->mode_config.cursor_width = 64; > + dev->mode_config.cursor_height = 64; > + } > + > /* create crtc objects to represent the hw heads */ > if (disp->disp->object.oclass >= GV100_DISP) > crtcs = nvif_rd32(&device->object, 0x610060) & 0xff;This change broke X cursor in my setup, and reverting the commit restores it. Dell Precision M4800, issue ~2014 with GK106GLM [Quadro K2100M] (rev a1). libdrm 2.4.91-1 (Debian 10.8 stable). There are no errors or warnings in Xorg logs nor in the kernel log. Regards, Alex