Skip to contentSkip to conversation

drm/mgag200: Force 32 bpp on the console

PATCH In review Thomas Zimmermann 2 participants 3 messages Sep 15, 2022 – Sep 20, 2022

Subsystems (3)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 1/1 drm/mgag200: Force 32 bpp on the console

G200ER does not seem to support 24 bpp, so force the console to use 32 bpp. The problem was introduced, when commit 73f54d5d9682 ("drm/mgag200: Remove special case for G200SE with <2 MiB") changed the preferred color depth from 32 bit to 24 bit.

A setting of 24 is the correct color depth, but G200ER doesn't seem to be able to use the respective RGB888 color format. Using 24-bit color with forced 32 bpp works around the problem.

Fixes 73f54d5d9682 ("drm/mgag200: Remove special case for G200SE with <2 MiB")
Cc Thomas Zimmermann <[email protected]>
Cc Jocelyn Falempe <[email protected]>
Cc Dave Airlie <[email protected]>
---
 drivers/gpu/drm/mgag200/mgag200_drv.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/mgag200/mgag200_drv.c +5 -1
index 251a1bb648cc..a222bf76804f 100644
@@ -262,7 +262,11 @@ mgag200_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (ret)
 		return ret;
 
-	drm_fbdev_generic_setup(dev, 0);
+	/*
+	 * FIXME: A 24-bit color depth does not work with 24 bpp on
+	 * G200ER. Force 32 bpp.
+	 */
+	drm_fbdev_generic_setup(dev, 32);
 
 	return 0;
 }
Signature · 1 line
2.37.3
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Thomas Zimmermann

G200ER does not seem to support 24 bpp, so force the console to use 32 bpp. The problem was introduced, when commit 73f54d5d9682 ("drm/mgag200: Remove special case for G200SE with <2 MiB") changed the preferred color depth from 32 bit to 24 bit.

A setting of 24 is the correct color depth, but G200ER doesn't seem to be able to use the respective RGB888 color format. Using 24-bit color with forced 32 bpp works around the problem.

Thanks for the patch.
At least on my G200EW, 24 bpp is working well. So maybe only the G200ER is affected. I think it may have a performance penalty, I will try to measure it.

Signature · 1 line
Jocelyn
Quoted 30 lines
Fixes 73f54d5d9682 ("drm/mgag200: Remove special case for G200SE with <2 MiB")
Cc Thomas Zimmermann <[email protected]>
Cc Jocelyn Falempe <[email protected]>
Cc Dave Airlie <[email protected]>
---
  drivers/gpu/drm/mgag200/mgag200_drv.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/mgag200/mgag200_drv.c +5 -1
index 251a1bb648cc..a222bf76804f 100644
@@ -262,7 +262,11 @@ mgag200_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
  	if (ret)
  		return ret;
 
-	drm_fbdev_generic_setup(dev, 0);
+	/*
+	 * FIXME: A 24-bit color depth does not work with 24 bpp on
+	 * G200ER. Force 32 bpp.
+	 */
+	drm_fbdev_generic_setup(dev, 32);
 
  	return 0;
  }
author maintainer
#2 lore raw

Hi

Am 19.09.22 um 17:25 schrieb Jocelyn Falempe:

Quoted 6 lines · Thomas Zimmermann
Quoted 5 lines

G200ER does not seem to support 24 bpp, so force the console to use 32 bpp. The problem was introduced, when commit 73f54d5d9682 ("drm/mgag200: Remove special case for G200SE with <2 MiB") changed the preferred color depth from 32 bit to 24 bit.

Quoted 6 lines
Quoted 3 lines

A setting of 24 is the correct color depth, but G200ER doesn't seem to be able to use the respective RGB888 color format. Using 24-bit color with forced 32 bpp works around the problem.

Thanks for the patch.
At least on my G200EW, 24 bpp is working well. So maybe only the G200ER is affected.

I could not reproduce the problem either. Probably only G200ER is affected. Javier suggested to make add a quirk specifically for the particular DELL machine.

In the drm-tip, the code has meanwhile been split up by hardware revisions. So we can fix the problem by not exporting RGB888 at all on G200ER.

Best regards
Thomas

Quoted 3 lines

I think it may have a performance penalty, I will try to measure it. >

Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev