Skip to contentSkip to conversation

video: da8xx-fb: Add support for Densitron 84-0023-001T

PATCH Superseded [email protected] 1 participant 3 messages Apr 1, 2014 Framebuffer layer

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 video: da8xx-fb: Add support for Densitron 84-0023-001T

From: Jon Ringle <[email protected]>

---
 drivers/video/da8xx-fb.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
drivers/video/da8xx-fb.c +14 -0
index e030e17..d042624 100644
@@ -243,6 +243,20 @@ static struct fb_videomode known_lcd_panels[] = {
 		.sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
 		.flag           = 0,
 	},
+	[3] = {
+		/* Densitron 84-0023-001T */
+		.name           = "Densitron_LCD",
+		.xres           = 320,
+		.yres           = 240,
+		.pixclock       = KHZ2PICOS(6400),
+		.left_margin    = 0,
+		.right_margin   = 0,
+		.upper_margin   = 0,
+		.lower_margin   = 0,
+		.hsync_len      = 30,
+		.vsync_len      = 3,
+		.sync           = 0,
+	},
 };
 
 static bool da8xx_fb_is_raster_enabled(void)
Signature · 1 line
1.8.5.4
#1 lore raw

PATCH v2 2/2 video: da8xx-fb: Fix casting of info->pseudo_palette

From: Jon Ringle <[email protected]>

The casting to (u16 *) on info->pseudo_palette is wrong and causes the display to show a blue (garbage) vertical line on every other pixel column

---
 drivers/video/da8xx-fb.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/video/da8xx-fb.c +1 -9
index d042624..83c43b2 100644
@@ -678,15 +678,7 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
 			(green << info->var.green.offset) |
 			(blue << info->var.blue.offset);
 
-		switch (info->var.bits_per_pixel) {
-		case 16:
-			((u16 *) (info->pseudo_palette))[regno] = v;
-			break;
-		case 24:
-		case 32:
-			((u32 *) (info->pseudo_palette))[regno] = v;
-			break;
-		}
+		((u32 *) (info->pseudo_palette))[regno] = v;
 		if (palette[0] != 0x4000) {
 			update_hw = 1;
 			palette[0] = 0x4000;
Signature · 1 line
1.8.5.4
author
#2 lore raw
In reply to [email protected]
Quoted 12 lines · On Tue, Apr 1, 2014 at 8:33 AM, <[email protected]> wrote:

From: Jon Ringle <[email protected]>

---
 drivers/video/da8xx-fb.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
drivers/video/da8xx-fb.c +0 -0
index e030e17..d042624 100644

drivers/video/da8xx-fb.c static struct fb_videomode known_lcd_panels[] = { · line 248

Quoted 6 lines
drivers/video/da8xx-fb.c +3 -0
@@ -243,6 +243,20 @@ static struct fb_videomode known_lcd_panels[] = {
                .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
                .flag           = 0,
        },
+       [3] = {
+               /* Densitron 84-0023-001T */
+               .name           = "Densitron_LCD",

Crap. I'm sorry. I will resend again. with the correct patch with the name Tomi suggested

Jon