Skip to contentSkip to conversation

drm: Fix 8bpp fbcon on i915

PATCH In review [email protected] 3 participants 7 messages Jan 31, 2013 – Feb 13, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover drm: Fix 8bpp fbcon on i915

Looks like I accidentally broke 8bpp support in i915.

This series fixes the regression, as verified in the bug report:
https://bugs.freedesktop.org/show_bug.cgi?id=59572#c18

There should be no negative effect on other drivers since they either don't support 8bpp, or they don't bother with checking the pixel format.

#1 lore raw

PATCH 1/2 drm: Fill depth/bits_per_pixel for C8 format

From: Ville Syrjälä <[email protected]>

Set depth/bits_per_pixel to 8 for C8 format.

---
 drivers/gpu/drm/drm_crtc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_crtc.c +1 -0
index 9c797f6..ff7344c 100644
@@ -3856,6 +3856,7 @@ void drm_fb_get_bpp_depth(uint32_t format, unsigned int *depth,
 			  int *bpp)
 {
 	switch (format) {
+	case DRM_FORMAT_C8:
 	case DRM_FORMAT_RGB332:
 	case DRM_FORMAT_BGR233:
 		*depth = 8;
Signature · 6 lines
1.7.12.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

PATCH 2/2 drm: Use C8 instead of RGB332 when determining the format from depth/bpp

In reply to [email protected]

From: Ville Syrjälä <[email protected]>

Support for real RGB332 is a rarity, most hardware only really support C8. So use C8 instead of RGB332 when determining the format based on depth/bpp.

This fixes 8bpp fbcon on i915, since i915 will only accept C8 and not RGB332.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59572

---
 drivers/gpu/drm/drm_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc.c +1 -1
index ff7344c..826a5ca 100644
@@ -2253,7 +2253,7 @@ uint32_t drm_mode_legacy_fb_format(uint32_t bpp, uint32_t depth)
 
 	switch (bpp) {
 	case 8:
-		fmt = DRM_FORMAT_RGB332;
+		fmt = DRM_FORMAT_C8;
 		break;
 	case 16:
 		if (depth == 15)
Signature · 6 lines
1.7.12.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Tested-by [email protected] on v1 2/2
#3 lore raw

Re: [PATCH 2/2] drm: Use C8 instead of RGB332 when determining the format from depth/bpp

Quoted 11 lines · On Thu, Jan 31, 2013 at 07:43:38PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Support for real RGB332 is a rarity, most hardware only really support C8. So use C8 instead of RGB332 when determining the format based on depth/bpp.

This fixes 8bpp fbcon on i915, since i915 will only accept C8 and not RGB332.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59572

Dave, can you please consider including these two patches into -fixes? The fix a black screen regression when users opt for 8bpp console ... -Daniel

Quoted 24 lines
---
 drivers/gpu/drm/drm_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc.c +1 -1
index ff7344c..826a5ca 100644
@@ -2253,7 +2253,7 @@ uint32_t drm_mode_legacy_fb_format(uint32_t bpp, uint32_t depth)
 
 	switch (bpp) {
 	case 8:
-		fmt = DRM_FORMAT_RGB332;
+		fmt = DRM_FORMAT_C8;
 		break;
 	case 16:
 		if (depth == 15)
Signature · 6 lines
1.7.12.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
maintainer
#4 lore raw

Re: [PATCH 2/2] drm: Use C8 instead of RGB332 when determining the format from depth/bpp

Quoted 10 lines · Daniel Vetter
Quoted 9 lines · On Thu, Jan 31, 2013 at 07:43:38PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Support for real RGB332 is a rarity, most hardware only really support C8. So use C8 instead of RGB332 when determining the format based on depth/bpp.

This fixes 8bpp fbcon on i915, since i915 will only accept C8 and not RGB332.

Quoted 7 lines
Quoted 2 lines

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59572

Dave, can you please consider including these two patches into -fixes? The fix a black screen regression when users opt for 8bpp console ...

These are for next, considering what Linus said about -fixes not unless they are big.

so I'll stick a stable cc onto it in next.

Dave.

#5 lore raw

Re: [PATCH 2/2] drm: Use C8 instead of RGB332 when determining the format from depth/bpp

Quoted 16 lines · Dave Airlie
Quoted 15 lines · Daniel Vetter
Quoted 11 lines · On Thu, Jan 31, 2013 at 07:43:38PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Support for real RGB332 is a rarity, most hardware only really support C8. So use C8 instead of RGB332 when determining the format based on depth/bpp.

This fixes 8bpp fbcon on i915, since i915 will only accept C8 and not RGB332.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59572

Quoted 7 lines
Quoted 2 lines

Dave, can you please consider including these two patches into -fixes? The fix a black screen regression when users opt for 8bpp console ...

These are for next, considering what Linus said about -fixes not unless they are big.

so I'll stick a stable cc onto it in next.

Ping for merging into drm-next or acking for merging through drm-intel-next ...
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#6 lore raw

Re: [PATCH 2/2] drm: Use C8 instead of RGB332 when determining the format from depth/bpp

Quoted 20 lines · Daniel Vetter
Quoted 19 lines · Dave Airlie
Quoted 17 lines · Daniel Vetter
Quoted 11 lines · On Thu, Jan 31, 2013 at 07:43:38PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Support for real RGB332 is a rarity, most hardware only really support C8. So use C8 instead of RGB332 when determining the format based on depth/bpp.

This fixes 8bpp fbcon on i915, since i915 will only accept C8 and not RGB332.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59572

Dave, can you please consider including these two patches into -fixes? The fix a black screen regression when users opt for 8bpp console ...

Quoted 7 lines
Quoted 4 lines

These are for next, considering what Linus said about -fixes not unless they are big.

so I'll stick a stable cc onto it in next.

Ping for merging into drm-next or acking for merging through drm-intel-next ...

Merged both into drm-intel trees for 3.9 with Dave's irc-ack. -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch