public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
@ 2008-09-01 13:37 stanley.miao
  2008-09-02  4:33 ` Gadiyar, Anand
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: stanley.miao @ 2008-09-01 13:37 UTC (permalink / raw)
  To: linux-omap

In RGB565 mode, red and blue color are filtered, so the picture on LCD
looks green and dark.

Fix omapfb's problem on OMAP3430sdp.

Signed-off-by: Stanley Miao <stanley.miao@windriver.com>

---
diff --git a/drivers/video/omap/lcd_2430sdp.c
b/drivers/video/omap/lcd_2430sdp.c
index 9af6cd0..896a236 100644
--- a/drivers/video/omap/lcd_2430sdp.c
+++ b/drivers/video/omap/lcd_2430sdp.c
@@ -23,6 +23,7 @@
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/delay.h>
 #include <linux/i2c/twl4030.h>
 
 #include <mach/gpio.h>
@@ -45,6 +46,10 @@ static unsigned enable_gpio;
 #define ENABLE_VAUX3_DEDICATED	0x03
 #define ENABLE_VAUX3_DEV_GRP	0x20
 
+#define ENABLE_VPLL2_DEDICATED          0x05
+#define ENABLE_VPLL2_DEV_GRP            0xE0
+#define TWL4030_VPLL2_DEV_GRP           0x33
+#define TWL4030_VPLL2_DEDICATED         0x36
 
 #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
 
@@ -76,6 +81,11 @@ static int sdp2430_panel_enable(struct lcd_panel
*panel)
 {
 	u8 ded_val, ded_reg;
 	u8 grp_val, grp_reg;
+	
+	if(!is_sil_rev_less_than(OMAP3430_REV_ES2_0)) {
+		t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED,TWL4030_VPLL2_DEDICATED);
+		t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP,TWL4030_VPLL2_DEV_GRP);
+	}
 
 	if (machine_is_omap_3430sdp()) {
 		ded_reg = TWL4030_VAUX3_DEDICATED;
@@ -104,6 +114,11 @@ static void sdp2430_panel_disable(struct lcd_panel
*panel)
 {
 	omap_set_gpio_dataout(enable_gpio, 0);
 	omap_set_gpio_dataout(backlight_gpio, 0);
+	if(!is_sil_rev_less_than(OMAP3430_REV_ES2_0)) {
+		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
+		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
+		mdelay(4);
+	}
 }
 
 static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)

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

* RE: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-01 13:37 stanley.miao
@ 2008-09-02  4:33 ` Gadiyar, Anand
  2008-09-02  5:49 ` arun c
  2008-09-02 14:51 ` David Brownell
  2 siblings, 0 replies; 15+ messages in thread
From: Gadiyar, Anand @ 2008-09-02  4:33 UTC (permalink / raw)
  To: stanley.miao@windriver.com, linux-omap@vger.kernel.org

 

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org 
> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of stanley.miao
>
> In RGB565 mode, red and blue color are filtered, so the picture on LCD
> looks green and dark.
> 
> Fix omapfb's problem on OMAP3430sdp.
> 
> Signed-off-by: Stanley Miao <stanley.miao@windriver.com>

Tested by me. I get a nice penguin. But no blue background that I
usually see on TI kernels. I have no expertise on this, so this is
just an observation.

Regards,
Anand

> 
> ---
> diff --git a/drivers/video/omap/lcd_2430sdp.c
> b/drivers/video/omap/lcd_2430sdp.c
> index 9af6cd0..896a236 100644
> --- a/drivers/video/omap/lcd_2430sdp.c
> +++ b/drivers/video/omap/lcd_2430sdp.c
> @@ -23,6 +23,7 @@
>  
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
> +#include <linux/delay.h>
>  #include <linux/i2c/twl4030.h>
>  
>  #include <mach/gpio.h>
> @@ -45,6 +46,10 @@ static unsigned enable_gpio;
>  #define ENABLE_VAUX3_DEDICATED	0x03
>  #define ENABLE_VAUX3_DEV_GRP	0x20
>  
> +#define ENABLE_VPLL2_DEDICATED          0x05
> +#define ENABLE_VPLL2_DEV_GRP            0xE0
> +#define TWL4030_VPLL2_DEV_GRP           0x33
> +#define TWL4030_VPLL2_DEDICATED         0x36
>  
>  #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
>  
> @@ -76,6 +81,11 @@ static int sdp2430_panel_enable(struct lcd_panel
> *panel)
>  {
>  	u8 ded_val, ded_reg;
>  	u8 grp_val, grp_reg;
> +	
> +	if(!is_sil_rev_less_than(OMAP3430_REV_ES2_0)) {
> +		t2_out(PM_RECEIVER, 
> ENABLE_VPLL2_DEDICATED,TWL4030_VPLL2_DEDICATED);
> +		t2_out(PM_RECEIVER, 
> ENABLE_VPLL2_DEV_GRP,TWL4030_VPLL2_DEV_GRP);
> +	}
>  
>  	if (machine_is_omap_3430sdp()) {
>  		ded_reg = TWL4030_VAUX3_DEDICATED;
> @@ -104,6 +114,11 @@ static void sdp2430_panel_disable(struct 
> lcd_panel
> *panel)
>  {
>  	omap_set_gpio_dataout(enable_gpio, 0);
>  	omap_set_gpio_dataout(backlight_gpio, 0);
> +	if(!is_sil_rev_less_than(OMAP3430_REV_ES2_0)) {
> +		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
> +		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
> +		mdelay(4);
> +	}
>  }
>  
>  static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)
> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

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

* Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-01 13:37 stanley.miao
  2008-09-02  4:33 ` Gadiyar, Anand
@ 2008-09-02  5:49 ` arun c
  2008-09-02  6:13   ` stanley.miao
  2008-09-02 14:51 ` David Brownell
  2 siblings, 1 reply; 15+ messages in thread
From: arun c @ 2008-09-02  5:49 UTC (permalink / raw)
  To: stanley.miao; +Cc: linux-omap@vger.kernel.org

On Mon, Sep 1, 2008 at 9:37 AM, stanley.miao <stanley.miao@windriver.com> wrote:
> In RGB565 mode, red and blue color are filtered, so the picture on LCD
> looks green and dark.
>
> Fix omapfb's problem on OMAP3430sdp.
>
> Signed-off-by: Stanley Miao <stanley.miao@windriver.com>
>
> ---
> diff --git a/drivers/video/omap/lcd_2430sdp.c
> b/drivers/video/omap/lcd_2430sdp.c
> index 9af6cd0..896a236 100644
> --- a/drivers/video/omap/lcd_2430sdp.c
> +++ b/drivers/video/omap/lcd_2430sdp.c
> @@ -23,6 +23,7 @@
>
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
> +#include <linux/delay.h>
>  #include <linux/i2c/twl4030.h>
>
>  #include <mach/gpio.h>
> @@ -45,6 +46,10 @@ static unsigned enable_gpio;
>  #define ENABLE_VAUX3_DEDICATED 0x03
>  #define ENABLE_VAUX3_DEV_GRP   0x20
>
> +#define ENABLE_VPLL2_DEDICATED          0x05
> +#define ENABLE_VPLL2_DEV_GRP            0xE0
> +#define TWL4030_VPLL2_DEV_GRP           0x33
> +#define TWL4030_VPLL2_DEDICATED         0x36
>
>  #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
>
> @@ -76,6 +81,11 @@ static int sdp2430_panel_enable(struct lcd_panel
> *panel)
>  {
>        u8 ded_val, ded_reg;
>        u8 grp_val, grp_reg;

The below code will execute in 2430SDP also because is_sil_rev_less_than()
will be false there.
You need some mechanism to avoid that right?

> +
> +       if(!is_sil_rev_less_than(OMAP3430_REV_ES2_0)) {
> +               t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED,TWL4030_VPLL2_DEDICATED);
> +               t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP,TWL4030_VPLL2_DEV_GRP);
> +       }
>
>        if (machine_is_omap_3430sdp()) {
>                ded_reg = TWL4030_VAUX3_DEDICATED;
> @@ -104,6 +114,11 @@ static void sdp2430_panel_disable(struct lcd_panel
> *panel)
>  {
>        omap_set_gpio_dataout(enable_gpio, 0);
>        omap_set_gpio_dataout(backlight_gpio, 0);

Here too the same
> +       if(!is_sil_rev_less_than(OMAP3430_REV_ES2_0)) {
> +               t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
> +               t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
> +               mdelay(4);
> +       }
>  }
>
>  static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-02  5:49 ` arun c
@ 2008-09-02  6:13   ` stanley.miao
  2008-09-02  8:14     ` Felipe Balbi
  0 siblings, 1 reply; 15+ messages in thread
From: stanley.miao @ 2008-09-02  6:13 UTC (permalink / raw)
  To: arun c; +Cc: linux-omap@vger.kernel.org

Thanks for correcting me.

Re-send this patch.

Fix omapfb's problem on OMAP3430sdp.

Signed-off-by: Stanley Miao <stanley.miao@windriver.com>
---
diff --git a/drivers/video/omap/lcd_2430sdp.c
b/drivers/video/omap/lcd_2430sdp.c
index 9af6cd0..e4213b3 100644
--- a/drivers/video/omap/lcd_2430sdp.c
+++ b/drivers/video/omap/lcd_2430sdp.c
@@ -23,6 +23,7 @@
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/delay.h>
 #include <linux/i2c/twl4030.h>
 
 #include <mach/gpio.h>
@@ -45,6 +46,10 @@ static unsigned enable_gpio;
 #define ENABLE_VAUX3_DEDICATED	0x03
 #define ENABLE_VAUX3_DEV_GRP	0x20
 
+#define ENABLE_VPLL2_DEDICATED          0x05
+#define ENABLE_VPLL2_DEV_GRP            0xE0
+#define TWL4030_VPLL2_DEV_GRP           0x33
+#define TWL4030_VPLL2_DEDICATED         0x36
 
 #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
 
@@ -76,6 +81,11 @@ static int sdp2430_panel_enable(struct lcd_panel
*panel)
 {
 	u8 ded_val, ded_reg;
 	u8 grp_val, grp_reg;
+	
+	if(is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+		t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED,TWL4030_VPLL2_DEDICATED);
+		t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP,TWL4030_VPLL2_DEV_GRP);
+	}
 
 	if (machine_is_omap_3430sdp()) {
 		ded_reg = TWL4030_VAUX3_DEDICATED;
@@ -104,6 +114,11 @@ static void sdp2430_panel_disable(struct lcd_panel
*panel)
 {
 	omap_set_gpio_dataout(enable_gpio, 0);
 	omap_set_gpio_dataout(backlight_gpio, 0);
+	if(is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
+		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
+		mdelay(4);
+	}
 }
 
 static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)

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

* Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-02  6:13   ` stanley.miao
@ 2008-09-02  8:14     ` Felipe Balbi
  2008-09-02  9:33       ` stanley.miao
  0 siblings, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2008-09-02  8:14 UTC (permalink / raw)
  To: stanley.miao; +Cc: arun c, linux-omap@vger.kernel.org

On Tue, Sep 02, 2008 at 02:13:27PM +0800, stanley.miao wrote:
> @@ -76,6 +81,11 @@ static int sdp2430_panel_enable(struct lcd_panel
> *panel)
>  {
>  	u8 ded_val, ded_reg;
>  	u8 grp_val, grp_reg;
> +	
> +	if(is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {

	missing space "if ()".

> @@ -104,6 +114,11 @@ static void sdp2430_panel_disable(struct lcd_panel
> *panel)
>  {
>  	omap_set_gpio_dataout(enable_gpio, 0);
>  	omap_set_gpio_dataout(backlight_gpio, 0);

	nothing to do with your patch, but these should be converted to
gpiolib.

> +	if(is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {

missing space again. Please, run scripts/checkpatch.pl --strict patch.diff
before sending your patches so we avoid obvious style mistakes.

-- 
balbi

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

* Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-02  8:14     ` Felipe Balbi
@ 2008-09-02  9:33       ` stanley.miao
  2008-09-05 17:13         ` Tony Lindgren
  0 siblings, 1 reply; 15+ messages in thread
From: stanley.miao @ 2008-09-02  9:33 UTC (permalink / raw)
  To: me; +Cc: arun c, linux-omap@vger.kernel.org

Thanks. I resolved the style problem. If gpio function needs to be
changed, I think it should be in a single patch.

Re-send the patch again.

Fix omapfb's problem on OMAP3430

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 drivers/video/omap/lcd_2430sdp.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap/lcd_2430sdp.c
b/drivers/video/omap/lcd_2430sdp.c
index 9af6cd0..cf8d2a5 100644
--- a/drivers/video/omap/lcd_2430sdp.c
+++ b/drivers/video/omap/lcd_2430sdp.c
@@ -23,6 +23,7 @@
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/delay.h>
 #include <linux/i2c/twl4030.h>
 
 #include <mach/gpio.h>
@@ -45,6 +46,10 @@ static unsigned enable_gpio;
 #define ENABLE_VAUX3_DEDICATED	0x03
 #define ENABLE_VAUX3_DEV_GRP	0x20
 
+#define ENABLE_VPLL2_DEDICATED          0x05
+#define ENABLE_VPLL2_DEV_GRP            0xE0
+#define TWL4030_VPLL2_DEV_GRP           0x33
+#define TWL4030_VPLL2_DEDICATED         0x36
 
 #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
 
@@ -77,6 +82,13 @@ static int sdp2430_panel_enable(struct lcd_panel
*panel)
 	u8 ded_val, ded_reg;
 	u8 grp_val, grp_reg;
 
+	if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+		t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED,
+					TWL4030_VPLL2_DEDICATED);
+		t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP,
+					TWL4030_VPLL2_DEV_GRP);
+	}
+
 	if (machine_is_omap_3430sdp()) {
 		ded_reg = TWL4030_VAUX3_DEDICATED;
 		ded_val = ENABLE_VAUX3_DEDICATED;
@@ -104,6 +116,11 @@ static void sdp2430_panel_disable(struct lcd_panel
*panel)
 {
 	omap_set_gpio_dataout(enable_gpio, 0);
 	omap_set_gpio_dataout(backlight_gpio, 0);
+	if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
+		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
+		mdelay(4);
+	}
 }
 
 static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)
-- 
1.5.6.3


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

* Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-01 13:37 stanley.miao
  2008-09-02  4:33 ` Gadiyar, Anand
  2008-09-02  5:49 ` arun c
@ 2008-09-02 14:51 ` David Brownell
  2008-09-03  1:53   ` stanley.miao
  2 siblings, 1 reply; 15+ messages in thread
From: David Brownell @ 2008-09-02 14:51 UTC (permalink / raw)
  To: stanley.miao; +Cc: linux-omap

On Monday 01 September 2008, stanley.miao wrote:
> +       if(!is_sil_rev_less_than(OMAP3430_REV_ES2_0)) {

But checkpatch.pl rejected that, yes?  Fixed in a later
version I see.

... and in "static int sdp2430_panel_enable(...)" this would
seem to be wrong.  But for that matter, lcd_2430sdp.c should
not be relevant for any 3430 board anyway...

If that file is, oddly, being shared between two boards ...
then put that code in the "if (machine_is_omap_3430sdp())"
block.  And someone should consider renaming the file if
it's not specific to the 2430 SDP.



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-02 14:51 ` David Brownell
@ 2008-09-03  1:53   ` stanley.miao
  2008-09-03  1:55     ` David Brownell
  0 siblings, 1 reply; 15+ messages in thread
From: stanley.miao @ 2008-09-03  1:53 UTC (permalink / raw)
  To: David Brownell; +Cc: linux-omap

On Tue, 2008-09-02 at 07:51 -0700, David Brownell wrote:
> On Monday 01 September 2008, stanley.miao wrote:
> > +       if(!is_sil_rev_less_than(OMAP3430_REV_ES2_0)) {
> 
> But checkpatch.pl rejected that, yes?  Fixed in a later
> version I see.

It has been fixed in a later version.
> 
> ... and in "static int sdp2430_panel_enable(...)" this would
> seem to be wrong.  But for that matter, lcd_2430sdp.c should
> not be relevant for any 3430 board anyway...

this was shared between two boards.

> 
> If that file is, oddly, being shared between two boards ...
> then put that code in the "if (machine_is_omap_3430sdp())"
> block.  And someone should consider renaming the file if
> it's not specific to the 2430 SDP.

OMAP3430_ES1 doesn't have this problem.

Stanley.

> 
> 
> 

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

* Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-03  1:53   ` stanley.miao
@ 2008-09-03  1:55     ` David Brownell
  2008-09-03  3:40       ` stanley.miao
  0 siblings, 1 reply; 15+ messages in thread
From: David Brownell @ 2008-09-03  1:55 UTC (permalink / raw)
  To: stanley.miao; +Cc: linux-omap

On Tuesday 02 September 2008, stanley.miao wrote:
> > 
> > If that file is, oddly, being shared between two boards ...
> > then put that code in the "if (machine_is_omap_3430sdp())"
> > block.  And someone should consider renaming the file if
> > it's not specific to the 2430 SDP.
> 
> OMAP3430_ES1 doesn't have this problem.

Not the point.  Why have 2430 chips run code that only makes
sense on 3430 silicion?

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-03  1:55     ` David Brownell
@ 2008-09-03  3:40       ` stanley.miao
  0 siblings, 0 replies; 15+ messages in thread
From: stanley.miao @ 2008-09-03  3:40 UTC (permalink / raw)
  To: David Brownell; +Cc: linux-omap

On Tue, 2008-09-02 at 18:55 -0700, David Brownell wrote:
> On Tuesday 02 September 2008, stanley.miao wrote:
> > > 
> > > If that file is, oddly, being shared between two boards ...
> > > then put that code in the "if (machine_is_omap_3430sdp())"
> > > block.  And someone should consider renaming the file if
> > > it's not specific to the 2430 SDP.
> > 
> > OMAP3430_ES1 doesn't have this problem.
> 
> Not the point.  Why have 2430 chips run code that only makes
> sense on 3430 silicion?

Have you noticed my later version ? I have modified it to
if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)).

Stanley.

> 

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

* Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-02  9:33       ` stanley.miao
@ 2008-09-05 17:13         ` Tony Lindgren
  2008-09-08  2:27           ` stanley.miao
  0 siblings, 1 reply; 15+ messages in thread
From: Tony Lindgren @ 2008-09-05 17:13 UTC (permalink / raw)
  To: stanley.miao; +Cc: me, arun c, linux-omap@vger.kernel.org

* stanley.miao <stanley.miao@windriver.com> [080902 02:32]:
> Thanks. I resolved the style problem. If gpio function needs to be
> changed, I think it should be in a single patch.
> 
> Re-send the patch again.
> 
> Fix omapfb's problem on OMAP3430
> 
> Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
> ---
>  drivers/video/omap/lcd_2430sdp.c |   17 +++++++++++++++++
>  1 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/video/omap/lcd_2430sdp.c
> b/drivers/video/omap/lcd_2430sdp.c
> index 9af6cd0..cf8d2a5 100644
> --- a/drivers/video/omap/lcd_2430sdp.c
> +++ b/drivers/video/omap/lcd_2430sdp.c
> @@ -23,6 +23,7 @@
>  
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
> +#include <linux/delay.h>
>  #include <linux/i2c/twl4030.h>
>  
>  #include <mach/gpio.h>
> @@ -45,6 +46,10 @@ static unsigned enable_gpio;
>  #define ENABLE_VAUX3_DEDICATED	0x03
>  #define ENABLE_VAUX3_DEV_GRP	0x20
>  
> +#define ENABLE_VPLL2_DEDICATED          0x05
> +#define ENABLE_VPLL2_DEV_GRP            0xE0
> +#define TWL4030_VPLL2_DEV_GRP           0x33
> +#define TWL4030_VPLL2_DEDICATED         0x36
>  
>  #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
>  
> @@ -77,6 +82,13 @@ static int sdp2430_panel_enable(struct lcd_panel
> *panel)
>  	u8 ded_val, ded_reg;
>  	u8 grp_val, grp_reg;
>  
> +	if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
> +		t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED,
> +					TWL4030_VPLL2_DEDICATED);
> +		t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP,
> +					TWL4030_VPLL2_DEV_GRP);
> +	}
> +
>  	if (machine_is_omap_3430sdp()) {
>  		ded_reg = TWL4030_VAUX3_DEDICATED;
>  		ded_val = ENABLE_VAUX3_DEDICATED;

How about putting the is_sel_rev_greater_than test within the
machine_is_omap3430sdp test?

Tony

> @@ -104,6 +116,11 @@ static void sdp2430_panel_disable(struct lcd_panel
> *panel)
>  {
>  	omap_set_gpio_dataout(enable_gpio, 0);
>  	omap_set_gpio_dataout(backlight_gpio, 0);
> +	if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
> +		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
> +		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
> +		mdelay(4);
> +	}
>  }
>  
>  static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)
> -- 
> 1.5.6.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-05 17:13         ` Tony Lindgren
@ 2008-09-08  2:27           ` stanley.miao
  0 siblings, 0 replies; 15+ messages in thread
From: stanley.miao @ 2008-09-08  2:27 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap@vger.kernel.org

On Fri, 2008-09-05 at 10:13 -0700, Tony Lindgren wrote:
> * stanley.miao <stanley.miao@windriver.com> [080902 02:32]:
> > Thanks. I resolved the style problem. If gpio function needs to be
> > changed, I think it should be in a single patch.
> > 
> > Re-send the patch again.
> > 
> > Fix omapfb's problem on OMAP3430
> > 
> > Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
> > ---
> >  drivers/video/omap/lcd_2430sdp.c |   17 +++++++++++++++++
> >  1 files changed, 17 insertions(+), 0 deletions(-)
> > 
[...]
> >  
> >  #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
> >  
> > @@ -77,6 +82,13 @@ static int sdp2430_panel_enable(struct lcd_panel
> > *panel)
> >  	u8 ded_val, ded_reg;
> >  	u8 grp_val, grp_reg;
> >  
> > +	if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
> > +		t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED,
> > +					TWL4030_VPLL2_DEDICATED);
> > +		t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP,
> > +					TWL4030_VPLL2_DEV_GRP);
> > +	}
> > +
> >  	if (machine_is_omap_3430sdp()) {
> >  		ded_reg = TWL4030_VAUX3_DEDICATED;
> >  		ded_val = ENABLE_VAUX3_DEDICATED;
> 
> How about putting the is_sel_rev_greater_than test within the
> machine_is_omap3430sdp test?

Good, this will run fewer instructions on 2430sdp.

Stanley.

> 
> Tony


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

* [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
@ 2008-09-08  2:42 stanley.miao
  2008-09-08  3:29 ` stanley.miao
  0 siblings, 1 reply; 15+ messages in thread
From: stanley.miao @ 2008-09-08  2:42 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org; +Cc: Tony Lindgren

For clarity, I re-send this request.


In RGB565 mode, red and blue color are filtered, so the picture on LCD
looks green and dark.

Fix omapfb's problem on OMAP3430sdp.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 drivers/video/omap/lcd_2430sdp.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap/lcd_2430sdp.c
b/drivers/video/omap/lcd_2430sdp.c
index 9af6cd0..3747e7d 100644
--- a/drivers/video/omap/lcd_2430sdp.c
+++ b/drivers/video/omap/lcd_2430sdp.c
@@ -23,6 +23,7 @@
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/delay.h>
 #include <linux/i2c/twl4030.h>
 
 #include <mach/gpio.h>
@@ -45,6 +46,10 @@ static unsigned enable_gpio;
 #define ENABLE_VAUX3_DEDICATED	0x03
 #define ENABLE_VAUX3_DEV_GRP	0x20
 
+#define ENABLE_VPLL2_DEDICATED          0x05
+#define ENABLE_VPLL2_DEV_GRP            0xE0
+#define TWL4030_VPLL2_DEV_GRP           0x33
+#define TWL4030_VPLL2_DEDICATED         0x36
 
 #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
 
@@ -77,11 +82,19 @@ static int sdp2430_panel_enable(struct lcd_panel
*panel)
 	u8 ded_val, ded_reg;
 	u8 grp_val, grp_reg;
 
+
 	if (machine_is_omap_3430sdp()) {
 		ded_reg = TWL4030_VAUX3_DEDICATED;
 		ded_val = ENABLE_VAUX3_DEDICATED;
 		grp_reg = TWL4030_VAUX3_DEV_GRP;
 		grp_val = ENABLE_VAUX3_DEV_GRP;
+
+		if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+			t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED,
+					TWL4030_VPLL2_DEDICATED);
+			t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP,
+					TWL4030_VPLL2_DEV_GRP);
+		}
 	} else {
 		ded_reg = TWL4030_VAUX2_DEDICATED;
 		ded_val = ENABLE_VAUX2_DEDICATED;
@@ -104,6 +117,11 @@ static void sdp2430_panel_disable(struct lcd_panel
*panel)
 {
 	omap_set_gpio_dataout(enable_gpio, 0);
 	omap_set_gpio_dataout(backlight_gpio, 0);
+	if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
+		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
+		mdelay(4);
+	}
 }
 
 static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)
-- 
1.5.6.3


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

* Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-08  2:42 [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp stanley.miao
@ 2008-09-08  3:29 ` stanley.miao
  2008-09-10 17:46   ` Tony Lindgren
  0 siblings, 1 reply; 15+ messages in thread
From: stanley.miao @ 2008-09-08  3:29 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org; +Cc: Tony Lindgren

Prune off a empty line.

Fix omapfb's problem on OMAP3430sdp.

---
 drivers/video/omap/lcd_2430sdp.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap/lcd_2430sdp.c
b/drivers/video/omap/lcd_2430sdp.c
index 9af6cd0..b456e02 100644
--- a/drivers/video/omap/lcd_2430sdp.c
+++ b/drivers/video/omap/lcd_2430sdp.c
@@ -23,6 +23,7 @@
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/delay.h>
 #include <linux/i2c/twl4030.h>
 
 #include <mach/gpio.h>
@@ -45,6 +46,10 @@ static unsigned enable_gpio;
 #define ENABLE_VAUX3_DEDICATED	0x03
 #define ENABLE_VAUX3_DEV_GRP	0x20
 
+#define ENABLE_VPLL2_DEDICATED          0x05
+#define ENABLE_VPLL2_DEV_GRP            0xE0
+#define TWL4030_VPLL2_DEV_GRP           0x33
+#define TWL4030_VPLL2_DEDICATED         0x36
 
 #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
 
@@ -82,6 +87,13 @@ static int sdp2430_panel_enable(struct lcd_panel
*panel)
 		ded_val = ENABLE_VAUX3_DEDICATED;
 		grp_reg = TWL4030_VAUX3_DEV_GRP;
 		grp_val = ENABLE_VAUX3_DEV_GRP;
+
+		if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+			t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED,
+					TWL4030_VPLL2_DEDICATED);
+			t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP,
+					TWL4030_VPLL2_DEV_GRP);
+		}
 	} else {
 		ded_reg = TWL4030_VAUX2_DEDICATED;
 		ded_val = ENABLE_VAUX2_DEDICATED;
@@ -104,6 +116,11 @@ static void sdp2430_panel_disable(struct lcd_panel
*panel)
 {
 	omap_set_gpio_dataout(enable_gpio, 0);
 	omap_set_gpio_dataout(backlight_gpio, 0);
+	if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
+		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
+		mdelay(4);
+	}
 }
 
 static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)
-- 
1.5.6.3


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

* Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp
  2008-09-08  3:29 ` stanley.miao
@ 2008-09-10 17:46   ` Tony Lindgren
  0 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2008-09-10 17:46 UTC (permalink / raw)
  To: stanley.miao; +Cc: linux-omap@vger.kernel.org

* stanley.miao <stanley.miao@windriver.com> [080907 20:28]:
> Prune off a empty line.
> 
> Fix omapfb's problem on OMAP3430sdp.

Pushing today.

Tony

> 
> ---
>  drivers/video/omap/lcd_2430sdp.c |   17 +++++++++++++++++
>  1 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/video/omap/lcd_2430sdp.c
> b/drivers/video/omap/lcd_2430sdp.c
> index 9af6cd0..b456e02 100644
> --- a/drivers/video/omap/lcd_2430sdp.c
> +++ b/drivers/video/omap/lcd_2430sdp.c
> @@ -23,6 +23,7 @@
>  
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
> +#include <linux/delay.h>
>  #include <linux/i2c/twl4030.h>
>  
>  #include <mach/gpio.h>
> @@ -45,6 +46,10 @@ static unsigned enable_gpio;
>  #define ENABLE_VAUX3_DEDICATED	0x03
>  #define ENABLE_VAUX3_DEV_GRP	0x20
>  
> +#define ENABLE_VPLL2_DEDICATED          0x05
> +#define ENABLE_VPLL2_DEV_GRP            0xE0
> +#define TWL4030_VPLL2_DEV_GRP           0x33
> +#define TWL4030_VPLL2_DEDICATED         0x36
>  
>  #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
>  
> @@ -82,6 +87,13 @@ static int sdp2430_panel_enable(struct lcd_panel
> *panel)
>  		ded_val = ENABLE_VAUX3_DEDICATED;
>  		grp_reg = TWL4030_VAUX3_DEV_GRP;
>  		grp_val = ENABLE_VAUX3_DEV_GRP;
> +
> +		if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
> +			t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED,
> +					TWL4030_VPLL2_DEDICATED);
> +			t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP,
> +					TWL4030_VPLL2_DEV_GRP);
> +		}
>  	} else {
>  		ded_reg = TWL4030_VAUX2_DEDICATED;
>  		ded_val = ENABLE_VAUX2_DEDICATED;
> @@ -104,6 +116,11 @@ static void sdp2430_panel_disable(struct lcd_panel
> *panel)
>  {
>  	omap_set_gpio_dataout(enable_gpio, 0);
>  	omap_set_gpio_dataout(backlight_gpio, 0);
> +	if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
> +		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
> +		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
> +		mdelay(4);
> +	}
>  }
>  
>  static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)
> -- 
> 1.5.6.3
> 

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

end of thread, other threads:[~2008-09-10 17:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-08  2:42 [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp stanley.miao
2008-09-08  3:29 ` stanley.miao
2008-09-10 17:46   ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2008-09-01 13:37 stanley.miao
2008-09-02  4:33 ` Gadiyar, Anand
2008-09-02  5:49 ` arun c
2008-09-02  6:13   ` stanley.miao
2008-09-02  8:14     ` Felipe Balbi
2008-09-02  9:33       ` stanley.miao
2008-09-05 17:13         ` Tony Lindgren
2008-09-08  2:27           ` stanley.miao
2008-09-02 14:51 ` David Brownell
2008-09-03  1:53   ` stanley.miao
2008-09-03  1:55     ` David Brownell
2008-09-03  3:40       ` stanley.miao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox