linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* A few mxsfb patches
@ 2011-03-05 16:18 Shawn Guo
  2011-03-05 16:18 ` [PATCH 1/3] video: mxsfb: smarten the code a little bit Shawn Guo
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Shawn Guo @ 2011-03-05 16:18 UTC (permalink / raw)
  To: linux-arm-kernel

The patches came from the work of adding framebuffer for mx28evk and
mx23evk boards.  They are all minor changes.

 [PATCH 1/3] video: mxsfb: smarten the code a little bit
 [PATCH 2/3] video: mxsfb: fix the incorrect error checking for alloc_pages_exact
 [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support

 arch/arm/mach-mxs/include/mach/mxsfb.h |    3 ++-
 drivers/video/mxsfb.c                  |   25 ++++++++++++++-----------
 2 files changed, 16 insertions(+), 12 deletions(-)

Regards,
Shawn

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

* [PATCH 1/3] video: mxsfb: smarten the code a little bit
  2011-03-05 16:18 A few mxsfb patches Shawn Guo
@ 2011-03-05 16:18 ` Shawn Guo
  2011-03-05 16:41   ` Arnd Bergmann
  2011-03-06  6:18   ` [PATCH 1/3 RESEND] " Shawn Guo
  2011-03-05 16:18 ` [PATCH 2/3] video: mxsfb: fix the incorrect error checking for alloc_pages_exact Shawn Guo
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 17+ messages in thread
From: Shawn Guo @ 2011-03-05 16:18 UTC (permalink / raw)
  To: linux-arm-kernel

* Fix indentation issue in register definitions
* Remove empty pair of {} in mxsfb_devtype[]
* Add a message for a successful mxsfb_probe, which seems useful
  to tell that mxsfb driver is built in and probed successfully

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
---
 drivers/video/mxsfb.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index a3b1179..8a57f8b 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -52,11 +52,11 @@
 #define LCDC_CTRL			0x00
 #define LCDC_CTRL1			0x10
 #define LCDC_V4_CTRL2			0x20
-#define LCDC_V3_TRANSFER_COUNT	0x20
-#define LCDC_V4_TRANSFER_COUNT	0x30
-#define LCDC_V4_CUR_BUF		0x40
+#define LCDC_V3_TRANSFER_COUNT		0x20
+#define LCDC_V4_TRANSFER_COUNT		0x30
+#define LCDC_V4_CUR_BUF			0x40
 #define LCDC_V4_NEXT_BUF		0x50
-#define LCDC_V3_CUR_BUF		0x30
+#define LCDC_V3_CUR_BUF			0x30
 #define LCDC_V3_NEXT_BUF		0x40
 #define LCDC_TIMING			0x60
 #define LCDC_VDCTRL0			0x70
@@ -71,8 +71,8 @@
 #define LCDC_DVICTRL4			0x100
 #define LCDC_V4_DATA			0x180
 #define LCDC_V3_DATA			0x1b0
-#define LCDC_V4_DEBUG0		0x1d0
-#define LCDC_V3_DEBUG0		0x1f0
+#define LCDC_V4_DEBUG0			0x1d0
+#define LCDC_V3_DEBUG0			0x1f0
 
 #define CTRL_SFTRST			(1 << 31)
 #define CTRL_CLKGATE			(1 << 30)
@@ -832,6 +832,8 @@ static int __devinit mxsfb_probe(struct platform_device *pdev)
 		mxsfb_enable_controller(fb_info);
 	}
 
+	dev_info(&pdev->dev, "initialized\n");
+
 	return 0;
 
 error_register:
@@ -882,7 +884,6 @@ static struct platform_device_id mxsfb_devtype[] = {
 	}, {
 		.name = "imx28-fb",
 		.driver_data = MXSFB_V4,
-	}, {
 	},
 };
 MODULE_DEVICE_TABLE(platform, mxsfb_devtype);
-- 
1.7.1

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

* [PATCH 2/3] video: mxsfb: fix the incorrect error checking for alloc_pages_exact
  2011-03-05 16:18 A few mxsfb patches Shawn Guo
  2011-03-05 16:18 ` [PATCH 1/3] video: mxsfb: smarten the code a little bit Shawn Guo
@ 2011-03-05 16:18 ` Shawn Guo
  2011-03-05 16:18 ` [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support Shawn Guo
  2011-03-07  7:26 ` A few mxsfb patches Sascha Hauer
  3 siblings, 0 replies; 17+ messages in thread
From: Shawn Guo @ 2011-03-05 16:18 UTC (permalink / raw)
  To: linux-arm-kernel

fb_virt than fb_info->screen_base should be checked here, or the path
of framebuffer allocation always ends up with 'return -ENOMEM'.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
---
 drivers/video/mxsfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 8a57f8b..927a682 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -717,7 +717,7 @@ static int __devinit mxsfb_init_fbinfo(struct mxsfb_info *host)
 		if (!fb_size)
 			fb_size = SZ_2M; /* default */
 		fb_virt = alloc_pages_exact(fb_size, GFP_DMA);
-		if (!fb_info->screen_base)
+		if (!fb_virt)
 			return -ENOMEM;
 
 		fb_phys = virt_to_phys(fb_virt);
-- 
1.7.1

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

* [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support
  2011-03-05 16:18 A few mxsfb patches Shawn Guo
  2011-03-05 16:18 ` [PATCH 1/3] video: mxsfb: smarten the code a little bit Shawn Guo
  2011-03-05 16:18 ` [PATCH 2/3] video: mxsfb: fix the incorrect error checking for alloc_pages_exact Shawn Guo
@ 2011-03-05 16:18 ` Shawn Guo
  2011-04-04 15:04   ` Uwe Kleine-König
  2011-03-07  7:26 ` A few mxsfb patches Sascha Hauer
  3 siblings, 1 reply; 17+ messages in thread
From: Shawn Guo @ 2011-03-05 16:18 UTC (permalink / raw)
  To: linux-arm-kernel

The current implementation provides configuration for HSYNC_POL,
VSYNC_POL and ENABLE_POL via 'sync' of fb_videomode, but DOTCLK_POL
is missing there.  It's assuming that data sampling at rising/positive
edge is always the case.  However, it's not true.  For example, the
panel on mx28evk board (Seiko 43WVF1G) samples data at
failing/negative edge.  The patch is to add this configuration.

Also, to unify the naming schema of all these polarity configurations
and match them with the bits name in Reference Manual, a couple of
definitions are renamed.

Lastly, to reduce the chance of defining customized 'FB_SYNC_' flag
by incrementing the preceeding value, the definitions are changed to
bit shifting way.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
---
 arch/arm/mach-mxs/include/mach/mxsfb.h |    3 ++-
 drivers/video/mxsfb.c                  |    8 +++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-mxs/include/mach/mxsfb.h b/arch/arm/mach-mxs/include/mach/mxsfb.h
index 923f397..e4d7979 100644
--- a/arch/arm/mach-mxs/include/mach/mxsfb.h
+++ b/arch/arm/mach-mxs/include/mach/mxsfb.h
@@ -24,7 +24,8 @@
 #define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */
 #define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */
 
-#define FB_SYNC_DATA_ENABLE_HIGH_ACT	64
+#define FB_SYNC_DATA_ENABLE_HIGH_ACT	(1 << 6)
+#define FB_SYNC_DOTCLK_FAILING_ACT	(1 << 7) /* failing/negtive edge sampling */
 
 struct mxsfb_platform_data {
 	struct fb_videomode *mode_list;
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 927a682..0555671 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -103,8 +103,8 @@
 #define VDCTRL0_ENABLE_PRESENT		(1 << 28)
 #define VDCTRL0_VSYNC_ACT_HIGH		(1 << 27)
 #define VDCTRL0_HSYNC_ACT_HIGH		(1 << 26)
-#define VDCTRL0_DOTCLK_ACTIVE_HIGH	(1 << 25)
-#define VDCTRL0_POL_ACTIVE_HIGH		(1 << 24)
+#define VDCTRL0_DOTCLK_ACT_FAILING	(1 << 25)
+#define VDCTRL0_ENABLE_ACT_HIGH		(1 << 24)
 #define VDCTRL0_VSYNC_PERIOD_UNIT	(1 << 21)
 #define VDCTRL0_VSYNC_PULSE_WIDTH_UNIT	(1 << 20)
 #define VDCTRL0_HALF_LINE		(1 << 19)
@@ -452,7 +452,9 @@ static int mxsfb_set_par(struct fb_info *fb_info)
 	if (fb_info->var.sync & FB_SYNC_VERT_HIGH_ACT)
 		vdctrl0 |= VDCTRL0_VSYNC_ACT_HIGH;
 	if (fb_info->var.sync & FB_SYNC_DATA_ENABLE_HIGH_ACT)
-		vdctrl0 |= VDCTRL0_POL_ACTIVE_HIGH;
+		vdctrl0 |= VDCTRL0_ENABLE_ACT_HIGH;
+	if (fb_info->var.sync & FB_SYNC_DOTCLK_FAILING_ACT)
+		vdctrl0 |= VDCTRL0_DOTCLK_ACT_FAILING;
 
 	writel(vdctrl0, host->base + LCDC_VDCTRL0);
 
-- 
1.7.1

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

* [PATCH 1/3] video: mxsfb: smarten the code a little bit
  2011-03-05 16:18 ` [PATCH 1/3] video: mxsfb: smarten the code a little bit Shawn Guo
@ 2011-03-05 16:41   ` Arnd Bergmann
  2011-03-06  4:09     ` Shawn Guo
  2011-03-06  6:18   ` [PATCH 1/3 RESEND] " Shawn Guo
  1 sibling, 1 reply; 17+ messages in thread
From: Arnd Bergmann @ 2011-03-05 16:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 05 March 2011 17:18:49 Shawn Guo wrote:
> @@ -882,7 +884,6 @@ static struct platform_device_id mxsfb_devtype[] = {
>         }, {
>                 .name = "imx28-fb",
>                 .driver_data = MXSFB_V4,
> -       }, {
>         },
>  };

This is broken, you need to have an empty entry as the end marker,
otherwise, the match function will interpret whatever comes in 
memory after the last entry as input data, until it hits zeroes.

	Arnd

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

* [PATCH 1/3] video: mxsfb: smarten the code a little bit
  2011-03-05 16:41   ` Arnd Bergmann
@ 2011-03-06  4:09     ` Shawn Guo
  2011-03-06  6:30       ` Shawn Guo
  0 siblings, 1 reply; 17+ messages in thread
From: Shawn Guo @ 2011-03-06  4:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

On Sat, Mar 05, 2011 at 05:41:11PM +0100, Arnd Bergmann wrote:
> On Saturday 05 March 2011 17:18:49 Shawn Guo wrote:
> > @@ -882,7 +884,6 @@ static struct platform_device_id mxsfb_devtype[] = {
> >         }, {
> >                 .name = "imx28-fb",
> >                 .driver_data = MXSFB_V4,
> > -       }, {
> >         },
> >  };
> 
> This is broken, you need to have an empty entry as the end marker,
> otherwise, the match function will interpret whatever comes in 
> memory after the last entry as input data, until it hits zeroes.
> 
Ah, my dumb.  Thanks for pointing this out.  I will recover it with
a marker, and also prepare a patch to fix the exactly same issue I
created in fec.c :)

-- 
Regards,
Shawn

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

* [PATCH 1/3 RESEND] video: mxsfb: smarten the code a little bit
  2011-03-05 16:18 ` [PATCH 1/3] video: mxsfb: smarten the code a little bit Shawn Guo
  2011-03-05 16:41   ` Arnd Bergmann
@ 2011-03-06  6:18   ` Shawn Guo
  1 sibling, 0 replies; 17+ messages in thread
From: Shawn Guo @ 2011-03-06  6:18 UTC (permalink / raw)
  To: linux-arm-kernel

* Fix indentation issue in register definitions
* Add a message for a successful mxsfb_probe, which seems useful
  to tell that mxsfb driver is built in and probed successfully

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
---
 drivers/video/mxsfb.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index a3b1179..9591cb6 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -52,11 +52,11 @@
 #define LCDC_CTRL			0x00
 #define LCDC_CTRL1			0x10
 #define LCDC_V4_CTRL2			0x20
-#define LCDC_V3_TRANSFER_COUNT	0x20
-#define LCDC_V4_TRANSFER_COUNT	0x30
-#define LCDC_V4_CUR_BUF		0x40
+#define LCDC_V3_TRANSFER_COUNT		0x20
+#define LCDC_V4_TRANSFER_COUNT		0x30
+#define LCDC_V4_CUR_BUF			0x40
 #define LCDC_V4_NEXT_BUF		0x50
-#define LCDC_V3_CUR_BUF		0x30
+#define LCDC_V3_CUR_BUF			0x30
 #define LCDC_V3_NEXT_BUF		0x40
 #define LCDC_TIMING			0x60
 #define LCDC_VDCTRL0			0x70
@@ -71,8 +71,8 @@
 #define LCDC_DVICTRL4			0x100
 #define LCDC_V4_DATA			0x180
 #define LCDC_V3_DATA			0x1b0
-#define LCDC_V4_DEBUG0		0x1d0
-#define LCDC_V3_DEBUG0		0x1f0
+#define LCDC_V4_DEBUG0			0x1d0
+#define LCDC_V3_DEBUG0			0x1f0
 
 #define CTRL_SFTRST			(1 << 31)
 #define CTRL_CLKGATE			(1 << 30)
@@ -832,6 +832,8 @@ static int __devinit mxsfb_probe(struct platform_device *pdev)
 		mxsfb_enable_controller(fb_info);
 	}
 
+	dev_info(&pdev->dev, "initialized\n");
+
 	return 0;
 
 error_register:
@@ -883,7 +885,8 @@ static struct platform_device_id mxsfb_devtype[] = {
 		.name = "imx28-fb",
 		.driver_data = MXSFB_V4,
 	}, {
-	},
+		/* sentinel */
+	}
 };
 MODULE_DEVICE_TABLE(platform, mxsfb_devtype);
 
-- 
1.7.1

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

* [PATCH 1/3] video: mxsfb: smarten the code a little bit
  2011-03-06  4:09     ` Shawn Guo
@ 2011-03-06  6:30       ` Shawn Guo
  0 siblings, 0 replies; 17+ messages in thread
From: Shawn Guo @ 2011-03-06  6:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Mar 06, 2011 at 12:09:21PM +0800, Shawn Guo wrote:
> Hi Arnd,
> 
> On Sat, Mar 05, 2011 at 05:41:11PM +0100, Arnd Bergmann wrote:
> > On Saturday 05 March 2011 17:18:49 Shawn Guo wrote:
> > > @@ -882,7 +884,6 @@ static struct platform_device_id mxsfb_devtype[] = {
> > >         }, {
> > >                 .name = "imx28-fb",
> > >                 .driver_data = MXSFB_V4,
> > > -       }, {
> > >         },
> > >  };
> > 
> > This is broken, you need to have an empty entry as the end marker,
> > otherwise, the match function will interpret whatever comes in 
> > memory after the last entry as input data, until it hits zeroes.
> > 
> Ah, my dumb.  Thanks for pointing this out.  I will recover it with
> a marker, and also prepare a patch to fix the exactly same issue I
> created in fec.c :)
> 
Just found that fec has been fixed by the following commit on David's
tree.

commit 9eb0e6f26e48ef22cc56a2b81b1572ace999f70f
Author: Axel Lin <axel.lin@gmail.com>
Date:   Tue Feb 22 23:28:46 2011 +0000

    net/fec: fix unterminated platform_device_id table

    The platform_device_id table is supposed to be zero-terminated.

-- 
Regards,
Shawn

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

* A few mxsfb patches
  2011-03-05 16:18 A few mxsfb patches Shawn Guo
                   ` (2 preceding siblings ...)
  2011-03-05 16:18 ` [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support Shawn Guo
@ 2011-03-07  7:26 ` Sascha Hauer
  2011-03-07  7:45   ` Shawn Guo
  3 siblings, 1 reply; 17+ messages in thread
From: Sascha Hauer @ 2011-03-07  7:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Shawn,

On Sun, Mar 06, 2011 at 12:18:48AM +0800, Shawn Guo wrote:
> The patches came from the work of adding framebuffer for mx28evk and
> mx23evk boards.  They are all minor changes.
> 
>  [PATCH 1/3] video: mxsfb: smarten the code a little bit
>  [PATCH 2/3] video: mxsfb: fix the incorrect error checking for alloc_pages_exact
>  [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support

As this driver is new, we can squash these patches into the original
patch and add your ack to this one, if that's ok for you.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* A few mxsfb patches
  2011-03-07  7:26 ` A few mxsfb patches Sascha Hauer
@ 2011-03-07  7:45   ` Shawn Guo
  0 siblings, 0 replies; 17+ messages in thread
From: Shawn Guo @ 2011-03-07  7:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 07, 2011 at 08:26:57AM +0100, Sascha Hauer wrote:
> Hi Shawn,
> 
Hi Sascha,

> On Sun, Mar 06, 2011 at 12:18:48AM +0800, Shawn Guo wrote:
> > The patches came from the work of adding framebuffer for mx28evk and
> > mx23evk boards.  They are all minor changes.
> > 
> >  [PATCH 1/3] video: mxsfb: smarten the code a little bit
> >  [PATCH 2/3] video: mxsfb: fix the incorrect error checking for alloc_pages_exact
> >  [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support
> 
> As this driver is new, we can squash these patches into the original
> patch and add your ack to this one, if that's ok for you.
> 
No problem, as they are really some simple changes.

-- 
Regards,
Shawn

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

* [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support
  2011-03-05 16:18 ` [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support Shawn Guo
@ 2011-04-04 15:04   ` Uwe Kleine-König
  2011-04-04 15:42     ` Shawn Guo
  2011-04-05  6:47     ` [PATCH] video: mxsfb: correct typo 'FAILING' to 'FALLING' Shawn Guo
  0 siblings, 2 replies; 17+ messages in thread
From: Uwe Kleine-König @ 2011-04-04 15:04 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Sun, Mar 06, 2011 at 12:18:51AM +0800, Shawn Guo wrote:
> The current implementation provides configuration for HSYNC_POL,
> VSYNC_POL and ENABLE_POL via 'sync' of fb_videomode, but DOTCLK_POL
> is missing there.  It's assuming that data sampling at rising/positive
> edge is always the case.  However, it's not true.  For example, the
> panel on mx28evk board (Seiko 43WVF1G) samples data at
> failing/negative edge.  The patch is to add this configuration.
s/failing/falling?

> 
> Also, to unify the naming schema of all these polarity configurations
> and match them with the bits name in Reference Manual, a couple of
> definitions are renamed.
> 
> Lastly, to reduce the chance of defining customized 'FB_SYNC_' flag
> by incrementing the preceeding value, the definitions are changed to
> bit shifting way.
> 
> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> ---
>  arch/arm/mach-mxs/include/mach/mxsfb.h |    3 ++-
>  drivers/video/mxsfb.c                  |    8 +++++---
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-mxs/include/mach/mxsfb.h b/arch/arm/mach-mxs/include/mach/mxsfb.h
> index 923f397..e4d7979 100644
> --- a/arch/arm/mach-mxs/include/mach/mxsfb.h
> +++ b/arch/arm/mach-mxs/include/mach/mxsfb.h
> @@ -24,7 +24,8 @@
>  #define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */
>  #define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */
>  
> -#define FB_SYNC_DATA_ENABLE_HIGH_ACT	64
> +#define FB_SYNC_DATA_ENABLE_HIGH_ACT	(1 << 6)
> +#define FB_SYNC_DOTCLK_FAILING_ACT	(1 << 7) /* failing/negtive edge sampling */
ditto + s/negtive/negative/

As your patch is already in mainline, do you care to send a followup?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support
  2011-04-04 15:04   ` Uwe Kleine-König
@ 2011-04-04 15:42     ` Shawn Guo
  2011-04-05  5:53       ` Lothar Waßmann
  2011-04-05  6:47     ` [PATCH] video: mxsfb: correct typo 'FAILING' to 'FALLING' Shawn Guo
  1 sibling, 1 reply; 17+ messages in thread
From: Shawn Guo @ 2011-04-04 15:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 04, 2011 at 05:04:30PM +0200, Uwe Kleine-K?nig wrote:
> Hello,
> 
> On Sun, Mar 06, 2011 at 12:18:51AM +0800, Shawn Guo wrote:
> > The current implementation provides configuration for HSYNC_POL,
> > VSYNC_POL and ENABLE_POL via 'sync' of fb_videomode, but DOTCLK_POL
> > is missing there.  It's assuming that data sampling at rising/positive
> > edge is always the case.  However, it's not true.  For example, the
> > panel on mx28evk board (Seiko 43WVF1G) samples data at
> > failing/negative edge.  The patch is to add this configuration.
> s/failing/falling?
> 
> > 
> > Also, to unify the naming schema of all these polarity configurations
> > and match them with the bits name in Reference Manual, a couple of
> > definitions are renamed.
> > 
> > Lastly, to reduce the chance of defining customized 'FB_SYNC_' flag
> > by incrementing the preceeding value, the definitions are changed to
> > bit shifting way.
> > 
> > Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> > ---
> >  arch/arm/mach-mxs/include/mach/mxsfb.h |    3 ++-
> >  drivers/video/mxsfb.c                  |    8 +++++---
> >  2 files changed, 7 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/arm/mach-mxs/include/mach/mxsfb.h b/arch/arm/mach-mxs/include/mach/mxsfb.h
> > index 923f397..e4d7979 100644
> > --- a/arch/arm/mach-mxs/include/mach/mxsfb.h
> > +++ b/arch/arm/mach-mxs/include/mach/mxsfb.h
> > @@ -24,7 +24,8 @@
> >  #define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */
> >  #define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */
> >  
> > -#define FB_SYNC_DATA_ENABLE_HIGH_ACT	64
> > +#define FB_SYNC_DATA_ENABLE_HIGH_ACT	(1 << 6)
> > +#define FB_SYNC_DOTCLK_FAILING_ACT	(1 << 7) /* failing/negtive edge sampling */
> ditto + s/negtive/negative/
> 
> As your patch is already in mainline, do you care to send a followup?
> 
It depends on if Sascha would pick up this follow-up.  I feel that he
may not care too much about such cosmetic patch.

-- 
Regards,
Shawn

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

* [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support
  2011-04-04 15:42     ` Shawn Guo
@ 2011-04-05  5:53       ` Lothar Waßmann
  2011-04-05  6:24         ` Shawn Guo
  2011-04-05  7:32         ` Uwe Kleine-König
  0 siblings, 2 replies; 17+ messages in thread
From: Lothar Waßmann @ 2011-04-05  5:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Shawn Guo writes:
> On Mon, Apr 04, 2011 at 05:04:30PM +0200, Uwe Kleine-K?nig wrote:
> > Hello,
> > 
> > On Sun, Mar 06, 2011 at 12:18:51AM +0800, Shawn Guo wrote:
> > > The current implementation provides configuration for HSYNC_POL,
> > > VSYNC_POL and ENABLE_POL via 'sync' of fb_videomode, but DOTCLK_POL
> > > is missing there.  It's assuming that data sampling at rising/positive
> > > edge is always the case.  However, it's not true.  For example, the
> > > panel on mx28evk board (Seiko 43WVF1G) samples data at
> > > failing/negative edge.  The patch is to add this configuration.
> > s/failing/falling?
> > 
> > > 
> > > Also, to unify the naming schema of all these polarity configurations
> > > and match them with the bits name in Reference Manual, a couple of
> > > definitions are renamed.
> > > 
> > > Lastly, to reduce the chance of defining customized 'FB_SYNC_' flag
> > > by incrementing the preceeding value, the definitions are changed to
> > > bit shifting way.
> > > 
> > > Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> > > ---
> > >  arch/arm/mach-mxs/include/mach/mxsfb.h |    3 ++-
> > >  drivers/video/mxsfb.c                  |    8 +++++---
> > >  2 files changed, 7 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/arch/arm/mach-mxs/include/mach/mxsfb.h b/arch/arm/mach-mxs/include/mach/mxsfb.h
> > > index 923f397..e4d7979 100644
> > > --- a/arch/arm/mach-mxs/include/mach/mxsfb.h
> > > +++ b/arch/arm/mach-mxs/include/mach/mxsfb.h
> > > @@ -24,7 +24,8 @@
> > >  #define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */
> > >  #define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */
> > >  
> > > -#define FB_SYNC_DATA_ENABLE_HIGH_ACT	64
> > > +#define FB_SYNC_DATA_ENABLE_HIGH_ACT	(1 << 6)
> > > +#define FB_SYNC_DOTCLK_FAILING_ACT	(1 << 7) /* failing/negtive edge sampling */
>
s/FAILING/FALLING/


Lothar Wa?mann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

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

* [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support
  2011-04-05  5:53       ` Lothar Waßmann
@ 2011-04-05  6:24         ` Shawn Guo
  2011-04-05  7:32         ` Uwe Kleine-König
  1 sibling, 0 replies; 17+ messages in thread
From: Shawn Guo @ 2011-04-05  6:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Apr 05, 2011 at 07:53:04AM +0200, Lothar Wa?mann wrote:
> Hi,
> 
> Shawn Guo writes:
> > On Mon, Apr 04, 2011 at 05:04:30PM +0200, Uwe Kleine-K?nig wrote:
> > > Hello,
> > > 
> > > On Sun, Mar 06, 2011 at 12:18:51AM +0800, Shawn Guo wrote:
> > > > The current implementation provides configuration for HSYNC_POL,
> > > > VSYNC_POL and ENABLE_POL via 'sync' of fb_videomode, but DOTCLK_POL
> > > > is missing there.  It's assuming that data sampling at rising/positive
> > > > edge is always the case.  However, it's not true.  For example, the
> > > > panel on mx28evk board (Seiko 43WVF1G) samples data at
> > > > failing/negative edge.  The patch is to add this configuration.
> > > s/failing/falling?
> > > 
> > > > 
> > > > Also, to unify the naming schema of all these polarity configurations
> > > > and match them with the bits name in Reference Manual, a couple of
> > > > definitions are renamed.
> > > > 
> > > > Lastly, to reduce the chance of defining customized 'FB_SYNC_' flag
> > > > by incrementing the preceeding value, the definitions are changed to
> > > > bit shifting way.
> > > > 
> > > > Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> > > > ---
> > > >  arch/arm/mach-mxs/include/mach/mxsfb.h |    3 ++-
> > > >  drivers/video/mxsfb.c                  |    8 +++++---
> > > >  2 files changed, 7 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/arch/arm/mach-mxs/include/mach/mxsfb.h b/arch/arm/mach-mxs/include/mach/mxsfb.h
> > > > index 923f397..e4d7979 100644
> > > > --- a/arch/arm/mach-mxs/include/mach/mxsfb.h
> > > > +++ b/arch/arm/mach-mxs/include/mach/mxsfb.h
> > > > @@ -24,7 +24,8 @@
> > > >  #define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */
> > > >  #define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */
> > > >  
> > > > -#define FB_SYNC_DATA_ENABLE_HIGH_ACT	64
> > > > +#define FB_SYNC_DATA_ENABLE_HIGH_ACT	(1 << 6)
> > > > +#define FB_SYNC_DOTCLK_FAILING_ACT	(1 << 7) /* failing/negtive edge sampling */
> >
> s/FAILING/FALLING/
> 
OK, since so many people care, let me send a patch to test Sascha.

-- 
Regards,
Shawn

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

* [PATCH] video: mxsfb: correct typo 'FAILING' to 'FALLING'
  2011-04-04 15:04   ` Uwe Kleine-König
  2011-04-04 15:42     ` Shawn Guo
@ 2011-04-05  6:47     ` Shawn Guo
  2011-04-05  7:36       ` Uwe Kleine-König
  1 sibling, 1 reply; 17+ messages in thread
From: Shawn Guo @ 2011-04-05  6:47 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
---
The patch should probably be split into two to separate machine code
changes from driver ones, but that will result in build failure,
which could be a problem for bisect, so I keep them as one patch.  

 arch/arm/mach-mxs/include/mach/mxsfb.h |    2 +-
 arch/arm/mach-mxs/mach-mx23evk.c       |    2 +-
 arch/arm/mach-mxs/mach-mx28evk.c       |    2 +-
 drivers/video/mxsfb.c                  |    6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-mxs/include/mach/mxsfb.h b/arch/arm/mach-mxs/include/mach/mxsfb.h
index e4d7979..491787e 100644
--- a/arch/arm/mach-mxs/include/mach/mxsfb.h
+++ b/arch/arm/mach-mxs/include/mach/mxsfb.h
@@ -25,7 +25,7 @@
 #define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */
 
 #define FB_SYNC_DATA_ENABLE_HIGH_ACT	(1 << 6)
-#define FB_SYNC_DOTCLK_FAILING_ACT	(1 << 7) /* failing/negtive edge sampling */
+#define FB_SYNC_DOTCLK_FALLING_ACT	(1 << 7) /* falling/negtive edge sampling */
 
 struct mxsfb_platform_data {
 	struct fb_videomode *mode_list;
diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c
index 214e5b6..bcf24c1 100644
--- a/arch/arm/mach-mxs/mach-mx23evk.c
+++ b/arch/arm/mach-mxs/mach-mx23evk.c
@@ -122,7 +122,7 @@ static struct fb_videomode mx23evk_video_modes[] = {
 		.hsync_len	= 1,
 		.vsync_len	= 1,
 		.sync		= FB_SYNC_DATA_ENABLE_HIGH_ACT |
-				  FB_SYNC_DOTCLK_FAILING_ACT,
+				  FB_SYNC_DOTCLK_FALLING_ACT,
 	},
 };
 
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index bb329b9..9753e85 100644
--- a/arch/arm/mach-mxs/mach-mx28evk.c
+++ b/arch/arm/mach-mxs/mach-mx28evk.c
@@ -311,7 +311,7 @@ static struct fb_videomode mx28evk_video_modes[] = {
 		.hsync_len	= 10,
 		.vsync_len	= 10,
 		.sync		= FB_SYNC_DATA_ENABLE_HIGH_ACT |
-				  FB_SYNC_DOTCLK_FAILING_ACT,
+				  FB_SYNC_DOTCLK_FALLING_ACT,
 	},
 };
 
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 7d02848..aa27231 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -103,7 +103,7 @@
 #define VDCTRL0_ENABLE_PRESENT		(1 << 28)
 #define VDCTRL0_VSYNC_ACT_HIGH		(1 << 27)
 #define VDCTRL0_HSYNC_ACT_HIGH		(1 << 26)
-#define VDCTRL0_DOTCLK_ACT_FAILING	(1 << 25)
+#define VDCTRL0_DOTCLK_ACT_FALLING	(1 << 25)
 #define VDCTRL0_ENABLE_ACT_HIGH		(1 << 24)
 #define VDCTRL0_VSYNC_PERIOD_UNIT	(1 << 21)
 #define VDCTRL0_VSYNC_PULSE_WIDTH_UNIT	(1 << 20)
@@ -453,8 +453,8 @@ static int mxsfb_set_par(struct fb_info *fb_info)
 		vdctrl0 |= VDCTRL0_VSYNC_ACT_HIGH;
 	if (fb_info->var.sync & FB_SYNC_DATA_ENABLE_HIGH_ACT)
 		vdctrl0 |= VDCTRL0_ENABLE_ACT_HIGH;
-	if (fb_info->var.sync & FB_SYNC_DOTCLK_FAILING_ACT)
-		vdctrl0 |= VDCTRL0_DOTCLK_ACT_FAILING;
+	if (fb_info->var.sync & FB_SYNC_DOTCLK_FALLING_ACT)
+		vdctrl0 |= VDCTRL0_DOTCLK_ACT_FALLING;
 
 	writel(vdctrl0, host->base + LCDC_VDCTRL0);
 
-- 
1.7.1

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

* [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support
  2011-04-05  5:53       ` Lothar Waßmann
  2011-04-05  6:24         ` Shawn Guo
@ 2011-04-05  7:32         ` Uwe Kleine-König
  1 sibling, 0 replies; 17+ messages in thread
From: Uwe Kleine-König @ 2011-04-05  7:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Apr 05, 2011 at 07:53:04AM +0200, Lothar Wa?mann wrote:
> Hi,
> 
> Shawn Guo writes:
> > On Mon, Apr 04, 2011 at 05:04:30PM +0200, Uwe Kleine-K?nig wrote:
> > > Hello,
> > > 
> > > On Sun, Mar 06, 2011 at 12:18:51AM +0800, Shawn Guo wrote:
> > > > The current implementation provides configuration for HSYNC_POL,
> > > > VSYNC_POL and ENABLE_POL via 'sync' of fb_videomode, but DOTCLK_POL
> > > > is missing there.  It's assuming that data sampling at rising/positive
> > > > edge is always the case.  However, it's not true.  For example, the
> > > > panel on mx28evk board (Seiko 43WVF1G) samples data at
> > > > failing/negative edge.  The patch is to add this configuration.
> > > s/failing/falling?
> > > 
> > > > 
> > > > Also, to unify the naming schema of all these polarity configurations
> > > > and match them with the bits name in Reference Manual, a couple of
> > > > definitions are renamed.
> > > > 
> > > > Lastly, to reduce the chance of defining customized 'FB_SYNC_' flag
> > > > by incrementing the preceeding value, the definitions are changed to
> > > > bit shifting way.
> > > > 
> > > > Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> > > > ---
> > > >  arch/arm/mach-mxs/include/mach/mxsfb.h |    3 ++-
> > > >  drivers/video/mxsfb.c                  |    8 +++++---
> > > >  2 files changed, 7 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/arch/arm/mach-mxs/include/mach/mxsfb.h b/arch/arm/mach-mxs/include/mach/mxsfb.h
> > > > index 923f397..e4d7979 100644
> > > > --- a/arch/arm/mach-mxs/include/mach/mxsfb.h
> > > > +++ b/arch/arm/mach-mxs/include/mach/mxsfb.h
> > > > @@ -24,7 +24,8 @@
> > > >  #define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */
> > > >  #define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */
> > > >  
> > > > -#define FB_SYNC_DATA_ENABLE_HIGH_ACT	64
> > > > +#define FB_SYNC_DATA_ENABLE_HIGH_ACT	(1 << 6)
> > > > +#define FB_SYNC_DOTCLK_FAILING_ACT	(1 << 7) /* failing/negtive edge sampling */
> >
> s/FAILING/FALLING/
I implicitly wanted that and tried to express that with my ditto.
IMHO the macro name is the main reason for me to fix it.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* [PATCH] video: mxsfb: correct typo 'FAILING' to 'FALLING'
  2011-04-05  6:47     ` [PATCH] video: mxsfb: correct typo 'FAILING' to 'FALLING' Shawn Guo
@ 2011-04-05  7:36       ` Uwe Kleine-König
  0 siblings, 0 replies; 17+ messages in thread
From: Uwe Kleine-König @ 2011-04-05  7:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Apr 05, 2011 at 02:47:55PM +0800, Shawn Guo wrote:
> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> ---
> The patch should probably be split into two to separate machine code
> changes from driver ones, but that will result in build failure,
> which could be a problem for bisect, so I keep them as one patch.  
to prevent that (and if you really care) you need to add a 

#define FB_SYNC_DOTCLK_FAILING_ACT FB_SYNC_DOTCLK_FALLING_ACT

in the first patch, then fix all users and then remove the #define
again. But IMHO it's totally OK to do it in one step since all files
touched are in a single maintainer's responsibility.
(At least drivers/video/mxsfb.c went in via Sascha's tree, too.)

Reported-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

Best regards
Uwe

>  arch/arm/mach-mxs/include/mach/mxsfb.h |    2 +-
>  arch/arm/mach-mxs/mach-mx23evk.c       |    2 +-
>  arch/arm/mach-mxs/mach-mx28evk.c       |    2 +-
>  drivers/video/mxsfb.c                  |    6 +++---
>  4 files changed, 6 insertions(+), 6 deletions(-)

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

end of thread, other threads:[~2011-04-05  7:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-05 16:18 A few mxsfb patches Shawn Guo
2011-03-05 16:18 ` [PATCH 1/3] video: mxsfb: smarten the code a little bit Shawn Guo
2011-03-05 16:41   ` Arnd Bergmann
2011-03-06  4:09     ` Shawn Guo
2011-03-06  6:30       ` Shawn Guo
2011-03-06  6:18   ` [PATCH 1/3 RESEND] " Shawn Guo
2011-03-05 16:18 ` [PATCH 2/3] video: mxsfb: fix the incorrect error checking for alloc_pages_exact Shawn Guo
2011-03-05 16:18 ` [PATCH 3/3] video: mxsfb: add DOTCLK polarity configuration support Shawn Guo
2011-04-04 15:04   ` Uwe Kleine-König
2011-04-04 15:42     ` Shawn Guo
2011-04-05  5:53       ` Lothar Waßmann
2011-04-05  6:24         ` Shawn Guo
2011-04-05  7:32         ` Uwe Kleine-König
2011-04-05  6:47     ` [PATCH] video: mxsfb: correct typo 'FAILING' to 'FALLING' Shawn Guo
2011-04-05  7:36       ` Uwe Kleine-König
2011-03-07  7:26 ` A few mxsfb patches Sascha Hauer
2011-03-07  7:45   ` Shawn Guo

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