* [PATCH v3 1/2] video: da8xx-fb: Add support for Densitron 84-0023-001T
@ 2014-04-01 12:39 jon
2014-04-01 12:39 ` [PATCH v3 2/2] video: da8xx-fb: Fix casting of info->pseudo_palette jon
0 siblings, 1 reply; 4+ messages in thread
From: jon @ 2014-04-01 12:39 UTC (permalink / raw)
To: linux-kernel, linux-fbdev; +Cc: tomi.valkeinen, plagnioj, Jon Ringle
From: Jon Ringle <jringle@gridpoint.com>
Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
drivers/video/da8xx-fb.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index e030e17..233f65f 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -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_84-0023-001T",
+ .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)
--
1.8.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 2/2] video: da8xx-fb: Fix casting of info->pseudo_palette
2014-04-01 12:39 [PATCH v3 1/2] video: da8xx-fb: Add support for Densitron 84-0023-001T jon
@ 2014-04-01 12:39 ` jon
2014-04-04 10:49 ` Tomi Valkeinen
0 siblings, 1 reply; 4+ messages in thread
From: jon @ 2014-04-01 12:39 UTC (permalink / raw)
To: linux-kernel, linux-fbdev; +Cc: tomi.valkeinen, plagnioj, Jon Ringle
From: Jon Ringle <jringle@gridpoint.com>
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
Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
drivers/video/da8xx-fb.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 233f65f..c17f901 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -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;
--
1.8.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 2/2] video: da8xx-fb: Fix casting of info->pseudo_palette
2014-04-01 12:39 ` [PATCH v3 2/2] video: da8xx-fb: Fix casting of info->pseudo_palette jon
@ 2014-04-04 10:49 ` Tomi Valkeinen
2014-04-05 11:35 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Tomi Valkeinen @ 2014-04-04 10:49 UTC (permalink / raw)
To: jon, linux-kernel, linux-fbdev; +Cc: plagnioj, Jon Ringle, Etheridge, Darren
[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]
On 01/04/14 15:39, jon@ringle.org wrote:
> From: Jon Ringle <jringle@gridpoint.com>
>
> 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
>
> Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> ---
> drivers/video/da8xx-fb.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
> index 233f65f..c17f901 100644
> --- a/drivers/video/da8xx-fb.c
> +++ b/drivers/video/da8xx-fb.c
> @@ -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;
>
Thanks.
I wonder why the pseudo_palette in fb.h is 'void *' in the first place.
It seems to be cast to 'u32 *' everywhere...
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 2/2] video: da8xx-fb: Fix casting of info->pseudo_palette
2014-04-04 10:49 ` Tomi Valkeinen
@ 2014-04-05 11:35 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-04-05 11:35 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: jon, linux-kernel@vger.kernel.org, Linux Fbdev development list,
Jean-Christophe PLAGNIOL-VILLARD, Jon Ringle, Etheridge, Darren
Hi Tomi,
On Fri, Apr 4, 2014 at 12:49 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> I wonder why the pseudo_palette in fb.h is 'void *' in the first place.
> It seems to be cast to 'u32 *' everywhere...
Historically, this was driver-specific. Many drivers stored u16 pixel values.
I guess it can be changed to u32 now, dropping all casts.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-05 11:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-01 12:39 [PATCH v3 1/2] video: da8xx-fb: Add support for Densitron 84-0023-001T jon
2014-04-01 12:39 ` [PATCH v3 2/2] video: da8xx-fb: Fix casting of info->pseudo_palette jon
2014-04-04 10:49 ` Tomi Valkeinen
2014-04-05 11:35 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).