Skip to contentSkip to conversation

video: da8xx-fb: fix 24bpp raster configuration

PATCH Superseded Darren Etheridge 2 participants 2 messages Jun 25, 2013 – Jun 26, 2013 Framebuffer layer

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 12/23 video: da8xx-fb: fix 24bpp raster configuration

From: Manjunathappa, Prakash <[email protected]>

Set only LCD_V2_TFT_24BPP_MODE bit for 24bpp and LCD_V2_TFT_24BPP_UNPACK bit along with LCD_V2_TFT_24BPP_MODE for 32bpp configuration.

Patch is tested on am335x-evm for 24bpp and da850-evm for 16bpp configurations.

---
 drivers/video/da8xx-fb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/da8xx-fb.c +2 -2
index 35a33ca..7f92f37 100644
@@ -550,10 +550,10 @@ static int lcd_cfg_frame_buffer(struct da8xx_fb_par *par, u32 width, u32 height,
 	case 4:
 	case 16:
 		break;
-	case 24:
-		reg |= LCD_V2_TFT_24BPP_MODE;
 	case 32:
 		reg |= LCD_V2_TFT_24BPP_UNPACK;
+	case 24:
+		reg |= LCD_V2_TFT_24BPP_MODE;
 		break;
 
 	case 8:
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 21 lines · Darren Etheridge

From: Manjunathappa, Prakash <[email protected]>

Set only LCD_V2_TFT_24BPP_MODE bit for 24bpp and LCD_V2_TFT_24BPP_UNPACK bit along with LCD_V2_TFT_24BPP_MODE for 32bpp configuration.

Patch is tested on am335x-evm for 24bpp and da850-evm for 16bpp configurations.

---
 drivers/video/da8xx-fb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/da8xx-fb.c +0 -0
index 35a33ca..7f92f37 100644
@@ -550,10 +550,10 @@ static int lcd_cfg_frame_buffer(struct da8xx_fb_par *par, u32 width, u32 height,
 	case 4:

drivers/video/da8xx-fb.c static int lcd_cfg_frame_buffer(struct da8xx_fb_par *par, u32 width, u32 height, · line 558

Quoted 10 lines
drivers/video/da8xx-fb.c +2 -2
 	case 16:
 		break;
-	case 24:
-		reg |= LCD_V2_TFT_24BPP_MODE;
 	case 32:
 		reg |= LCD_V2_TFT_24BPP_UNPACK;
+	case 24:
+		reg |= LCD_V2_TFT_24BPP_MODE;
 		break;
 

I'd suggest not to use fall-through here. It just makes the code more difficult to read and more error prone.

Tomi