linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: ARM CLCD: fix up Integrator support
@ 2016-08-29  9:29 Linus Walleij
  2016-08-30  8:54 ` Tomi Valkeinen
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2016-08-29  9:29 UTC (permalink / raw)
  To: linux-arm-kernel

We need to mask all registers of the Integrator/CP core module
control register, and actually write the calculated value to the
control register, not the mask.

Tested on the Integrator/CP with RGB5551 VGA and works like a
charm after this patch.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/video/fbdev/amba-clcd-versatile.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/amba-clcd-versatile.c b/drivers/video/fbdev/amba-clcd-versatile.c
index 9a90817b1550..5c1e03928d7f 100644
--- a/drivers/video/fbdev/amba-clcd-versatile.c
+++ b/drivers/video/fbdev/amba-clcd-versatile.c
@@ -262,7 +262,10 @@ static const struct of_device_id versatile_clcd_of_match[] = {
 /* 0 = 24bit VGA, 1 = 18bit VGA */
 #define INTEGRATOR_CLCD_LCD_N24BITEN	BIT(19)
 
-#define INTEGRATOR_CLCD_MASK		(INTEGRATOR_CLCD_LCDMUX_MASK | \
+#define INTEGRATOR_CLCD_MASK		(INTEGRATOR_CLCD_LCDBIASEN | \
+					 INTEGRATOR_CLCD_LCDBIASUP | \
+					 INTEGRATOR_CLCD_LCDBIASDN | \
+					 INTEGRATOR_CLCD_LCDMUX_MASK | \
 					 INTEGRATOR_CLCD_LCD0_EN | \
 					 INTEGRATOR_CLCD_LCD1_EN | \
 					 INTEGRATOR_CLCD_LCD_STATIC1 | \
@@ -277,6 +280,7 @@ static void integrator_clcd_enable(struct clcd_fb *fb)
 
 	dev_info(&fb->dev->dev, "enable Integrator CLCD connectors\n");
 
+	/* FIXME: really needed? */
 	val = INTEGRATOR_CLCD_LCD_STATIC1 | INTEGRATOR_CLCD_LCD_STATIC2 |
 		INTEGRATOR_CLCD_LCD0_EN | INTEGRATOR_CLCD_LCD1_EN;
 	if (var->bits_per_pixel <= 8 ||
@@ -291,8 +295,8 @@ static void integrator_clcd_enable(struct clcd_fb *fb)
 
 	regmap_update_bits(versatile_syscon_map,
 			   INTEGRATOR_HDR_CTRL_OFFSET,
-			   0,
-			   INTEGRATOR_CLCD_MASK);
+			   INTEGRATOR_CLCD_MASK,
+			   val);
 }
 
 /*
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] video: ARM CLCD: fix up Integrator support
  2016-08-29  9:29 [PATCH] video: ARM CLCD: fix up Integrator support Linus Walleij
@ 2016-08-30  8:54 ` Tomi Valkeinen
  0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2016-08-30  8:54 UTC (permalink / raw)
  To: linux-arm-kernel

On 29/08/16 12:29, Linus Walleij wrote:
> We need to mask all registers of the Integrator/CP core module
> control register, and actually write the calculated value to the
> control register, not the mask.
> 
> Tested on the Integrator/CP with RGB5551 VGA and works like a
> charm after this patch.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  drivers/video/fbdev/amba-clcd-versatile.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

Thanks, queued for 4.9.

 Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160830/b2b1d6df/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-30  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-29  9:29 [PATCH] video: ARM CLCD: fix up Integrator support Linus Walleij
2016-08-30  8:54 ` Tomi Valkeinen

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).