Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH] grvga: fix section mismatch warnings
From: Sam Ravnborg @ 2011-12-27 21:57 UTC (permalink / raw)
  To: linux-fbdev

From 7368b53b755a66c69b2b5ede30e2effe960ad59a Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Tue, 27 Dec 2011 22:55:49 +0100
Subject: [PATCH] grvga: fix section mismatch warnings

Fix following section mismatch warnings:

WARNING: drivers/video/built-in.o(.devinit.text+0x110): Section mismatch in reference from the function grvga_probe() to the function .init.text:grvga_parse_custom()
The function __devinit grvga_probe() references
a function __init grvga_parse_custom().
If grvga_parse_custom is only used by grvga_probe then
annotate grvga_parse_custom with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x1f8): Section mismatch in reference from the function grvga_probe() to the variable .init.data:grvga_fix
The function __devinit grvga_probe() references
a variable __initdata grvga_fix.
If grvga_fix is only used by grvga_probe then
annotate grvga_fix with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x204): Section mismatch in reference from the function grvga_probe() to the variable .init.data:grvga_fix
The function __devinit grvga_probe() references
a variable __initdata grvga_fix.
If grvga_fix is only used by grvga_probe then
annotate grvga_fix with a matching annotation.

grvga_fix is used in a function annotated __devinit - so
match this using a __devinitdata annotation on grvga_fix.

grvga_parse_custom() is used in a function annotated
__devinit - so match this by annotating grvga_parse_custom()
with __devinit too.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Kristoffer Glembo <kristoffer@gaisler.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
---
 drivers/video/grvga.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/grvga.c b/drivers/video/grvga.c
index f37e025..da066c2 100644
--- a/drivers/video/grvga.c
+++ b/drivers/video/grvga.c
@@ -70,7 +70,7 @@ static const struct fb_videomode grvga_modedb[] = {
     }
  };
 
-static struct fb_fix_screeninfo grvga_fix __initdata = {
+static struct fb_fix_screeninfo grvga_fix __devinitdata = {
 	.id =		"AG SVGACTRL",
 	.type =		FB_TYPE_PACKED_PIXELS,
 	.visual =       FB_VISUAL_PSEUDOCOLOR,
@@ -267,7 +267,7 @@ static struct fb_ops grvga_ops = {
 	.fb_imageblit	= cfb_imageblit
 };
 
-static int __init grvga_parse_custom(char *options,
+static int __devinit grvga_parse_custom(char *options,
 				     struct fb_var_screeninfo *screendata)
 {
 	char *this_opt;
-- 
1.6.0.6


^ permalink raw reply related

* [PATCH] offb: Fix setting of the pseudo-palette for >8bpp
From: Benjamin Herrenschmidt @ 2011-12-28 10:08 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: linuxppc-dev

When using a >8bpp framebuffer, offb advertises truecolor, not directcolor,
and doesn't touch the color map even if it has a corresponding access method
for the real hardware.

Thus it needs to set the pseudo-palette with all 3 components of the color,
like other truecolor framebuffers, not with copies of the color index like
a directcolor framebuffer would do.

This went unnoticed for a long time because it's pretty hard to get offb
to kick in with anything but 8bpp (old BootX under MacOS will do that and
qemu does it).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

diff --git a/drivers/video/offb.c b/drivers/video/offb.c
index cb163a5..24e1fc6 100644
--- a/drivers/video/offb.c
+++ b/drivers/video/offb.c
@@ -100,36 +100,32 @@ static int offb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
 			  u_int transp, struct fb_info *info)
 {
 	struct offb_par *par = (struct offb_par *) info->par;
-	int i, depth;
-	u32 *pal = info->pseudo_palette;
-
-	depth = info->var.bits_per_pixel;
-	if (depth == 16)
-		depth = (info->var.green.length == 5) ? 15 : 16;
-
-	if (regno > 255 ||
-	    (depth == 16 && regno > 63) ||
-	    (depth == 15 && regno > 31))
-		return 1;
-
-	if (regno < 16) {
-		switch (depth) {
-		case 15:
-			pal[regno] = (regno << 10) | (regno << 5) | regno;
-			break;
-		case 16:
-			pal[regno] = (regno << 11) | (regno << 5) | regno;
-			break;
-		case 24:
-			pal[regno] = (regno << 16) | (regno << 8) | regno;
-			break;
-		case 32:
-			i = (regno << 8) | regno;
-			pal[regno] = (i << 16) | i;
-			break;
+
+	if (info->fix.visual == FB_VISUAL_TRUECOLOR) {
+		u32 *pal = info->pseudo_palette;
+		u32 cr = red >> (16 - info->var.red.length);
+		u32 cg = green >> (16 - info->var.green.length);
+		u32 cb = blue >> (16 - info->var.blue.length);
+		u32 value;
+
+		if (regno >= 16)
+			return -EINVAL;
+
+		value = (cr << info->var.red.offset) |
+			(cg << info->var.green.offset) |
+			(cb << info->var.blue.offset);
+		if (info->var.transp.length > 0) {
+			u32 mask = (1 << info->var.transp.length) - 1;
+			mask <<= info->var.transp.offset;
+			value |= mask;
 		}
+		pal[regno] = value;
+		return 0;
 	}
 
+	if (regno > 255)
+		return -EINVAL;
+
 	red >>= 8;
 	green >>= 8;
 	blue >>= 8;

^ permalink raw reply related

* [PATCH] offb: Fix setting of the pseudo-palette for >8bpp
From: Benjamin Herrenschmidt @ 2011-12-28 10:10 UTC (permalink / raw)
  To: linux-fbdev; +Cc: linuxppc-dev

When using a >8bpp framebuffer, offb advertises truecolor, not directcolor,
and doesn't touch the color map even if it has a corresponding access method
for the real hardware.

Thus it needs to set the pseudo-palette with all 3 components of the color,
like other truecolor framebuffers, not with copies of the color index like
a directcolor framebuffer would do.

This went unnoticed for a long time because it's pretty hard to get offb
to kick in with anything but 8bpp (old BootX under MacOS will do that and
qemu does it).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

(resent to the right list)

BTW. Do we have a maintainer to pick up those offb patches I sent ? I'm
happy to carry them in -powerpc instead, it would actually make it easier
for me....

diff --git a/drivers/video/offb.c b/drivers/video/offb.c
index cb163a5..24e1fc6 100644
--- a/drivers/video/offb.c
+++ b/drivers/video/offb.c
@@ -100,36 +100,32 @@ static int offb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
 			  u_int transp, struct fb_info *info)
 {
 	struct offb_par *par = (struct offb_par *) info->par;
-	int i, depth;
-	u32 *pal = info->pseudo_palette;
-
-	depth = info->var.bits_per_pixel;
-	if (depth = 16)
-		depth = (info->var.green.length = 5) ? 15 : 16;
-
-	if (regno > 255 ||
-	    (depth = 16 && regno > 63) ||
-	    (depth = 15 && regno > 31))
-		return 1;
-
-	if (regno < 16) {
-		switch (depth) {
-		case 15:
-			pal[regno] = (regno << 10) | (regno << 5) | regno;
-			break;
-		case 16:
-			pal[regno] = (regno << 11) | (regno << 5) | regno;
-			break;
-		case 24:
-			pal[regno] = (regno << 16) | (regno << 8) | regno;
-			break;
-		case 32:
-			i = (regno << 8) | regno;
-			pal[regno] = (i << 16) | i;
-			break;
+
+	if (info->fix.visual = FB_VISUAL_TRUECOLOR) {
+		u32 *pal = info->pseudo_palette;
+		u32 cr = red >> (16 - info->var.red.length);
+		u32 cg = green >> (16 - info->var.green.length);
+		u32 cb = blue >> (16 - info->var.blue.length);
+		u32 value;
+
+		if (regno >= 16)
+			return -EINVAL;
+
+		value = (cr << info->var.red.offset) |
+			(cg << info->var.green.offset) |
+			(cb << info->var.blue.offset);
+		if (info->var.transp.length > 0) {
+			u32 mask = (1 << info->var.transp.length) - 1;
+			mask <<= info->var.transp.offset;
+			value |= mask;
 		}
+		pal[regno] = value;
+		return 0;
 	}
 
+	if (regno > 255)
+		return -EINVAL;
+
 	red >>= 8;
 	green >>= 8;
 	blue >>= 8;




^ permalink raw reply related

* RE: [PATCH 1/6] video: s3c-fb: Make runtime PM functional again
From: Jingoo Han @ 2011-12-28 23:54 UTC (permalink / raw)
  To: 'Mark Brown', 'Florian Tobias Schandinat'
  Cc: linux-fbdev, linux-kernel
In-Reply-To: <1324995372-3410-1-git-send-email-broonie@opensource.wolfsonmicro.com>

> -----Original Message-----
> From: Mark Brown [mailto:broonie@opensource.wolfsonmicro.com]
> Sent: Tuesday, December 27, 2011 11:16 PM
> To: Jingoo Han; Florian Tobias Schandinat
> Cc: linux-fbdev@vger.kernel.org; linux-kernel@vger.kernel.org; Mark Brown
> Subject: [PATCH 1/6] video: s3c-fb: Make runtime PM functional again
> 
> The change in "video: s3c-fb: modify runtime pm functions" (commit
> 35784b) renders the runtime power management for the device completely
> ineffectual as while it leaves runtime power management notionally
> enabled a runtime power reference is held for the entire time the device
> is registered meaning it will never actually do anything.
> 
> A further issue is introduced as runtime power management is added
> during the system suspend path which is not something which drivers are
> supposed to do and would interact poorly if there were any operations
> done in the runtime power management callbacks.
> 
> While this does make things simpler (the main motivation for the
> original change) it will not only cause us to use more power in the
> framebuffer controller but will also prevent us entering lower power
> domain and SoC wide states as we can never power down the domain
> containing the device.  Since neither of these things is desirable
> revert the change.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

	Acked-by: Jingoo Han <jg1.han@samsung.com>

> ---
>  drivers/video/s3c-fb.c |   51 +++++++++++++++++++++++++++++------------------
>  1 files changed, 31 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index a0b3fd6..b1a75a0 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -1038,8 +1038,30 @@ static int s3c_fb_ioctl(struct fb_info *info, unsigned int cmd,
>  	return ret;
>  }
> 
> +static int s3c_fb_open(struct fb_info *info, int user)
> +{
> +	struct s3c_fb_win *win = info->par;
> +	struct s3c_fb *sfb = win->parent;
> +
> +	pm_runtime_get_sync(sfb->dev);
> +
> +	return 0;
> +}
> +
> +static int s3c_fb_release(struct fb_info *info, int user)
> +{
> +	struct s3c_fb_win *win = info->par;
> +	struct s3c_fb *sfb = win->parent;
> +
> +	pm_runtime_put_sync(sfb->dev);
> +
> +	return 0;
> +}
> +
>  static struct fb_ops s3c_fb_ops = {
>  	.owner		= THIS_MODULE,
> +	.fb_open	= s3c_fb_open,
> +	.fb_release	= s3c_fb_release,
>  	.fb_check_var	= s3c_fb_check_var,
>  	.fb_set_par	= s3c_fb_set_par,
>  	.fb_blank	= s3c_fb_blank,
> @@ -1446,6 +1468,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
>  	}
> 
>  	platform_set_drvdata(pdev, sfb);
> +	pm_runtime_put_sync(sfb->dev);
> 
>  	return 0;
> 
> @@ -1485,6 +1508,8 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
>  	struct s3c_fb *sfb = platform_get_drvdata(pdev);
>  	int win;
> 
> +	pm_runtime_get_sync(sfb->dev);
> +
>  	for (win = 0; win < S3C_FB_MAX_WIN; win++)
>  		if (sfb->windows[win])
>  			s3c_fb_release_win(sfb, sfb->windows[win]);
> @@ -1510,7 +1535,7 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
>  	return 0;
>  }
> 
> -#ifdef CONFIG_PM_SLEEP
> +#ifdef CONFIG_PM
>  static int s3c_fb_suspend(struct device *dev)
>  {
>  	struct platform_device *pdev = to_platform_device(dev);
> @@ -1531,8 +1556,6 @@ static int s3c_fb_suspend(struct device *dev)
>  		clk_disable(sfb->lcd_clk);
> 
>  	clk_disable(sfb->bus_clk);
> -	pm_runtime_put_sync(sfb->dev);
> -
>  	return 0;
>  }
> 
> @@ -1544,7 +1567,6 @@ static int s3c_fb_resume(struct device *dev)
>  	struct s3c_fb_win *win;
>  	int win_no;
> 
> -	pm_runtime_get_sync(sfb->dev);
>  	clk_enable(sfb->bus_clk);
> 
>  	if (!sfb->variant.has_clksel)
> @@ -1583,19 +1605,11 @@ static int s3c_fb_resume(struct device *dev)
> 
>  	return 0;
>  }
> +#else
> +#define s3c_fb_suspend NULL
> +#define s3c_fb_resume  NULL
>  #endif
> 
> -#ifdef CONFIG_PM_RUNTIME
> -static int s3c_fb_runtime_suspend(struct device *dev)
> -{
> -	return 0;
> -}
> -
> -static int s3c_fb_runtime_resume(struct device *dev)
> -{
> -	return 0;
> -}
> -#endif
> 
>  #define VALID_BPP124 (VALID_BPP(1) | VALID_BPP(2) | VALID_BPP(4))
>  #define VALID_BPP1248 (VALID_BPP124 | VALID_BPP(8))
> @@ -1918,10 +1932,7 @@ static struct platform_device_id s3c_fb_driver_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(platform, s3c_fb_driver_ids);
> 
> -static const struct dev_pm_ops s3c_fb_pm_ops = {
> -	SET_SYSTEM_SLEEP_PM_OPS(s3c_fb_suspend, s3c_fb_resume)
> -	SET_RUNTIME_PM_OPS(s3c_fb_runtime_suspend, s3c_fb_runtime_resume, NULL)
> -};
> +static UNIVERSAL_DEV_PM_OPS(s3cfb_pm_ops, s3c_fb_suspend, s3c_fb_resume, NULL);
> 
>  static struct platform_driver s3c_fb_driver = {
>  	.probe		= s3c_fb_probe,
> @@ -1930,7 +1941,7 @@ static struct platform_driver s3c_fb_driver = {
>  	.driver		= {
>  		.name	= "s3c-fb",
>  		.owner	= THIS_MODULE,
> -		.pm	= &s3c_fb_pm_ops,
> +		.pm	= &s3cfb_pm_ops,
>  	},
>  };
> 
> --
> 1.7.7.3


^ permalink raw reply

* RE: [PATCH 3/6] video: s3c-fb: Disable runtime PM in error paths from
From: Jingoo Han @ 2011-12-28 23:54 UTC (permalink / raw)
  To: 'Mark Brown', 'Florian Tobias Schandinat'
  Cc: linux-fbdev, linux-kernel
In-Reply-To: <1324995372-3410-3-git-send-email-broonie@opensource.wolfsonmicro.com>

> -----Original Message-----
> From: Mark Brown [mailto:broonie@opensource.wolfsonmicro.com]
> Sent: Tuesday, December 27, 2011 11:16 PM
> To: Jingoo Han; Florian Tobias Schandinat
> Cc: linux-fbdev@vger.kernel.org; linux-kernel@vger.kernel.org; Mark Brown
> Subject: [PATCH 3/6] video: s3c-fb: Disable runtime PM in error paths from probe
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

		Acked-by: Jingoo Han <jg1.han@samsung.com>

> ---
>  drivers/video/s3c-fb.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index be4c218..2e0eef0 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -1464,7 +1464,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
>  			dev_err(dev, "failed to create window %d\n", win);
>  			for (; win >= 0; win--)
>  				s3c_fb_release_win(sfb, sfb->windows[win]);
> -			goto err_irq;
> +			goto err_pm_runtime;
>  		}
>  	}
> 
> @@ -1473,7 +1473,8 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
> 
>  	return 0;
> 
> -err_irq:
> +err_pm_runtime:
> +	pm_runtime_put_sync(sfb->dev);
>  	free_irq(sfb->irq_no, sfb);
> 
>  err_ioremap:
> @@ -1483,6 +1484,8 @@ err_req_region:
>  	release_mem_region(sfb->regs_res->start, resource_size(sfb->regs_res));
> 
>  err_lcd_clk:
> +	pm_runtime_disable(sfb->dev);
> +
>  	if (!sfb->variant.has_clksel) {
>  		clk_disable(sfb->lcd_clk);
>  		clk_put(sfb->lcd_clk);
> --
> 1.7.7.3


^ permalink raw reply

* RE: [PATCH 4/6] video: s3c-fb: Take a runtime PM reference when
From: Jingoo Han @ 2011-12-28 23:54 UTC (permalink / raw)
  To: 'Mark Brown', 'Florian Tobias Schandinat'
  Cc: linux-fbdev, linux-kernel
In-Reply-To: <1324995372-3410-4-git-send-email-broonie@opensource.wolfsonmicro.com>

> -----Original Message-----
> From: Mark Brown [mailto:broonie@opensource.wolfsonmicro.com]
> Sent: Tuesday, December 27, 2011 11:16 PM
> To: Jingoo Han; Florian Tobias Schandinat
> Cc: linux-fbdev@vger.kernel.org; linux-kernel@vger.kernel.org; Mark Brown
> Subject: [PATCH 4/6] video: s3c-fb: Take a runtime PM reference when unblanked
> 
> When the framebuffer is unblanked hold a runtime PM reference. This
> prevents us powering down when userspace has left an image on the
> framebuffer and prepares the way for being able to power down the hardware
> when an application still has the device open.
> 
> Since we now hold a runtime PM reference whenever the display is unblanked
> there is no need for the runtime power management to disable and enable
> the display, and doing so would lead to runtime PM trying to recurse into
> itself when called from the blanking code, so split the runtime PM into
> separate functions which only deal with the clocks.  The PM core will
> runtime resume the device prior to system suspend.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

		Acked-by: Jingoo Han <jg1.han@samsung.com>

> ---
>  drivers/video/s3c-fb.c |   66 +++++++++++++++++++++++++++++++++++++++--------
>  1 files changed, 54 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index 2e0eef0..688b9d8 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -192,6 +192,7 @@ struct s3c_fb_vsync {
>   * @regs: The mapped hardware registers.
>   * @variant: Variant information for this hardware.
>   * @enabled: A bitmask of enabled hardware windows.
> + * @output_on: Flag if the physical output is enabled.
>   * @pdata: The platform configuration data passed with the device.
>   * @windows: The hardware windows that have been claimed.
>   * @irq_no: IRQ line number
> @@ -208,6 +209,7 @@ struct s3c_fb {
>  	struct s3c_fb_variant	 variant;
> 
>  	unsigned char		 enabled;
> +	bool			 output_on;
> 
>  	struct s3c_fb_platdata	*pdata;
>  	struct s3c_fb_win	*windows[S3C_FB_MAX_WIN];
> @@ -449,21 +451,28 @@ static void s3c_fb_enable(struct s3c_fb *sfb, int enable)
>  {
>  	u32 vidcon0 = readl(sfb->regs + VIDCON0);
> 
> -	if (enable)
> +	if (enable && !sfb->output_on)
> +		pm_runtime_get_sync(sfb->dev);
> +
> +	if (enable) {
>  		vidcon0 |= VIDCON0_ENVID | VIDCON0_ENVID_F;
> -	else {
> +	} else {
>  		/* see the note in the framebuffer datasheet about
>  		 * why you cannot take both of these bits down at the
>  		 * same time. */
> 
> -		if (!(vidcon0 & VIDCON0_ENVID))
> -			return;
> -
> -		vidcon0 |= VIDCON0_ENVID;
> -		vidcon0 &= ~VIDCON0_ENVID_F;
> +		if (vidcon0 & VIDCON0_ENVID) {
> +			vidcon0 |= VIDCON0_ENVID;
> +			vidcon0 &= ~VIDCON0_ENVID_F;
> +		}
>  	}
> 
>  	writel(vidcon0, sfb->regs + VIDCON0);
> +
> +	if (!enable && sfb->output_on)
> +		pm_runtime_put_sync(sfb->dev);
> +
> +	sfb->output_on = enable;
>  }
> 
>  /**
> @@ -1539,7 +1548,7 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
>  	return 0;
>  }
> 
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
>  static int s3c_fb_suspend(struct device *dev)
>  {
>  	struct platform_device *pdev = to_platform_device(dev);
> @@ -1609,11 +1618,40 @@ static int s3c_fb_resume(struct device *dev)
> 
>  	return 0;
>  }
> -#else
> -#define s3c_fb_suspend NULL
> -#define s3c_fb_resume  NULL
>  #endif
> 
> +#ifdef CONFIG_PM_RUNTIME
> +static int s3c_fb_runtime_suspend(struct device *dev)
> +{
> +	struct platform_device *pdev = to_platform_device(dev);
> +	struct s3c_fb *sfb = platform_get_drvdata(pdev);
> +
> +	if (!sfb->variant.has_clksel)
> +		clk_disable(sfb->lcd_clk);
> +
> +	clk_disable(sfb->bus_clk);
> +
> +	return 0;
> +}
> +
> +static int s3c_fb_runtime_resume(struct device *dev)
> +{
> +	struct platform_device *pdev = to_platform_device(dev);
> +	struct s3c_fb *sfb = platform_get_drvdata(pdev);
> +	struct s3c_fb_platdata *pd = sfb->pdata;
> +
> +	clk_enable(sfb->bus_clk);
> +
> +	if (!sfb->variant.has_clksel)
> +		clk_enable(sfb->lcd_clk);
> +
> +	/* setup gpio and output polarity controls */
> +	pd->setup_gpio();
> +	writel(pd->vidcon1, sfb->regs + VIDCON1);
> +
> +	return 0;
> +}
> +#endif
> 
>  #define VALID_BPP124 (VALID_BPP(1) | VALID_BPP(2) | VALID_BPP(4))
>  #define VALID_BPP1248 (VALID_BPP124 | VALID_BPP(8))
> @@ -1936,7 +1974,11 @@ static struct platform_device_id s3c_fb_driver_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(platform, s3c_fb_driver_ids);
> 
> -static UNIVERSAL_DEV_PM_OPS(s3cfb_pm_ops, s3c_fb_suspend, s3c_fb_resume, NULL);
> +static const struct dev_pm_ops s3cfb_pm_ops = {
> +	SET_SYSTEM_SLEEP_PM_OPS(s3c_fb_suspend, s3c_fb_resume)
> +	SET_RUNTIME_PM_OPS(s3c_fb_runtime_suspend, s3c_fb_runtime_resume,
> +			   NULL)
> +};
> 
>  static struct platform_driver s3c_fb_driver = {
>  	.probe		= s3c_fb_probe,
> --
> 1.7.7.3


^ permalink raw reply

* RE: [PATCH 5/6] video: s3c-fb: Hold runtime PM references when
From: Jingoo Han @ 2011-12-28 23:55 UTC (permalink / raw)
  To: 'Mark Brown', 'Florian Tobias Schandinat'
  Cc: linux-fbdev, linux-kernel
In-Reply-To: <1324995372-3410-5-git-send-email-broonie@opensource.wolfsonmicro.com>

> -----Original Message-----
> From: Mark Brown [mailto:broonie@opensource.wolfsonmicro.com]
> Sent: Tuesday, December 27, 2011 11:16 PM
> To: Jingoo Han; Florian Tobias Schandinat
> Cc: linux-fbdev@vger.kernel.org; linux-kernel@vger.kernel.org; Mark Brown
> Subject: [PATCH 5/6] video: s3c-fb: Hold runtime PM references when touching registers
> 
> Take a runtime PM reference whenever updating registers in preparation
> for suspending the device when the framebuffer is blanked.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

		Acked-by: Jingoo Han <jg1.han@samsung.com>

> ---
>  drivers/video/s3c-fb.c |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index 688b9d8..84cf631 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -496,6 +496,8 @@ static int s3c_fb_set_par(struct fb_info *info)
> 
>  	dev_dbg(sfb->dev, "setting framebuffer parameters\n");
> 
> +	pm_runtime_get_sync(sfb->dev);
> +
>  	shadow_protect_win(win, 1);
> 
>  	switch (var->bits_per_pixel) {
> @@ -692,6 +694,8 @@ static int s3c_fb_set_par(struct fb_info *info)
> 
>  	shadow_protect_win(win, 0);
> 
> +	pm_runtime_put_sync(sfb->dev);
> +
>  	return 0;
>  }
> 
> @@ -763,6 +767,8 @@ static int s3c_fb_setcolreg(unsigned regno,
>  	dev_dbg(sfb->dev, "%s: win %d: %d => rgb=%d/%d/%d\n",
>  		__func__, win->index, regno, red, green, blue);
> 
> +	pm_runtime_get_sync(sfb->dev);
> +
>  	switch (info->fix.visual) {
>  	case FB_VISUAL_TRUECOLOR:
>  		/* true-colour, use pseudo-palette */
> @@ -790,9 +796,11 @@ static int s3c_fb_setcolreg(unsigned regno,
>  		break;
> 
>  	default:
> +		pm_runtime_put_sync(sfb->dev);
>  		return 1;	/* unknown type */
>  	}
> 
> +	pm_runtime_put_sync(sfb->dev);
>  	return 0;
>  }
> 
> @@ -812,6 +820,8 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
> 
>  	dev_dbg(sfb->dev, "blank mode %d\n", blank_mode);
> 
> +	pm_runtime_get_sync(sfb->dev);
> +
>  	wincon = readl(sfb->regs + sfb->variant.wincon + (index * 4));
> 
>  	switch (blank_mode) {
> @@ -839,6 +849,7 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
>  	case FB_BLANK_VSYNC_SUSPEND:
>  	case FB_BLANK_HSYNC_SUSPEND:
>  	default:
> +		pm_runtime_put_sync(sfb->dev);
>  		return 1;
>  	}
> 
> @@ -869,6 +880,8 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
>  		shadow_protect_win(win, 0);
>  	}
> 
> +	pm_runtime_put_sync(sfb->dev);
> +
>  	return 0;
>  }
> 
> @@ -891,6 +904,8 @@ static int s3c_fb_pan_display(struct fb_var_screeninfo *var,
>  	void __iomem *buf	= sfb->regs + win->index * 8;
>  	unsigned int start_boff, end_boff;
> 
> +	pm_runtime_get_sync(sfb->dev);
> +
>  	/* Offset in bytes to the start of the displayed area */
>  	start_boff = var->yoffset * info->fix.line_length;
>  	/* X offset depends on the current bpp */
> @@ -909,6 +924,7 @@ static int s3c_fb_pan_display(struct fb_var_screeninfo *var,
>  			break;
>  		default:
>  			dev_err(sfb->dev, "invalid bpp\n");
> +			pm_runtime_put_sync(sfb->dev);
>  			return -EINVAL;
>  		}
>  	}
> @@ -924,6 +940,7 @@ static int s3c_fb_pan_display(struct fb_var_screeninfo *var,
> 
>  	shadow_protect_win(win, 0);
> 
> +	pm_runtime_put_sync(sfb->dev);
>  	return 0;
>  }
> 
> @@ -1013,11 +1030,16 @@ static int s3c_fb_wait_for_vsync(struct s3c_fb *sfb, u32 crtc)
>  	if (crtc != 0)
>  		return -ENODEV;
> 
> +	pm_runtime_get_sync(sfb->dev);
> +
>  	count = sfb->vsync_info.count;
>  	s3c_fb_enable_irq(sfb);
>  	ret = wait_event_interruptible_timeout(sfb->vsync_info.wait,
>  				       count != sfb->vsync_info.count,
>  				       msecs_to_jiffies(VSYNC_TIMEOUT_MSEC));
> +
> +	pm_runtime_put_sync(sfb->dev);
> +
>  	if (ret = 0)
>  		return -ETIMEDOUT;
> 
> --
> 1.7.7.3


^ permalink raw reply

* RE: [PATCH 6/6] video: s3c-fb: Don't keep device runtime active when
From: Jingoo Han @ 2011-12-28 23:55 UTC (permalink / raw)
  To: 'Mark Brown', 'Florian Tobias Schandinat'
  Cc: linux-fbdev, linux-kernel
In-Reply-To: <1324995372-3410-6-git-send-email-broonie@opensource.wolfsonmicro.com>

> -----Original Message-----
> From: Mark Brown [mailto:broonie@opensource.wolfsonmicro.com]
> Sent: Tuesday, December 27, 2011 11:16 PM
> To: Jingoo Han; Florian Tobias Schandinat
> Cc: linux-fbdev@vger.kernel.org; linux-kernel@vger.kernel.org; Mark Brown
> Subject: [PATCH 6/6] video: s3c-fb: Don't keep device runtime active when open
> 
> Allow the controller to be runtime suspended when the screen is blanked
> by not taking a runtime reference while the device is open. This allows
> greater system wide power savings when used with a standard application
> layer and ensures that the screen does not blank unless requested.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

		Acked-by: Jingoo Han <jg1.han@samsung.com>

> ---
>  drivers/video/s3c-fb.c |   22 ----------------------
>  1 files changed, 0 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index 84cf631..0c63b69 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -1070,30 +1070,8 @@ static int s3c_fb_ioctl(struct fb_info *info, unsigned int cmd,
>  	return ret;
>  }
> 
> -static int s3c_fb_open(struct fb_info *info, int user)
> -{
> -	struct s3c_fb_win *win = info->par;
> -	struct s3c_fb *sfb = win->parent;
> -
> -	pm_runtime_get_sync(sfb->dev);
> -
> -	return 0;
> -}
> -
> -static int s3c_fb_release(struct fb_info *info, int user)
> -{
> -	struct s3c_fb_win *win = info->par;
> -	struct s3c_fb *sfb = win->parent;
> -
> -	pm_runtime_put_sync(sfb->dev);
> -
> -	return 0;
> -}
> -
>  static struct fb_ops s3c_fb_ops = {
>  	.owner		= THIS_MODULE,
> -	.fb_open	= s3c_fb_open,
> -	.fb_release	= s3c_fb_release,
>  	.fb_check_var	= s3c_fb_check_var,
>  	.fb_set_par	= s3c_fb_set_par,
>  	.fb_blank	= s3c_fb_blank,
> --
> 1.7.7.3


^ permalink raw reply

* [PATCH 1/2] backlight: Convert platform_lcd to devm_kzalloc()
From: Mark Brown @ 2011-12-29 18:20 UTC (permalink / raw)
  To: linux-fbdev

Saves some error handling code and eliminates a class of leaks.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/video/backlight/platform_lcd.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c
index 187da59..f0bf491 100644
--- a/drivers/video/backlight/platform_lcd.c
+++ b/drivers/video/backlight/platform_lcd.c
@@ -85,7 +85,8 @@ static int __devinit platform_lcd_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	plcd = kzalloc(sizeof(struct platform_lcd), GFP_KERNEL);
+	plcd = devm_kzalloc(&pdev->dev, sizeof(struct platform_lcd),
+			    GFP_KERNEL);
 	if (!plcd) {
 		dev_err(dev, "no memory for state\n");
 		return -ENOMEM;
@@ -98,7 +99,7 @@ static int __devinit platform_lcd_probe(struct platform_device *pdev)
 	if (IS_ERR(plcd->lcd)) {
 		dev_err(dev, "cannot register lcd device\n");
 		err = PTR_ERR(plcd->lcd);
-		goto err_mem;
+		goto err;
 	}
 
 	platform_set_drvdata(pdev, plcd);
@@ -106,8 +107,7 @@ static int __devinit platform_lcd_probe(struct platform_device *pdev)
 
 	return 0;
 
- err_mem:
-	kfree(plcd);
+ err:
 	return err;
 }
 
@@ -116,7 +116,6 @@ static int __devexit platform_lcd_remove(struct platform_device *pdev)
 	struct platform_lcd *plcd = platform_get_drvdata(pdev);
 
 	lcd_device_unregister(plcd->lcd);
-	kfree(plcd);
 
 	return 0;
 }
-- 
1.7.7.3


^ permalink raw reply related

* [PATCH 2/2] backlight: Convert pwm_bl to dev_pm_ops
From: Mark Brown @ 2011-12-29 18:20 UTC (permalink / raw)
  To: linux-fbdev

Should be no functional changes, mainly a reorganisation to support
future work.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/video/backlight/pwm_bl.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index b811e8f..13ba95b 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -169,10 +169,9 @@ static int pwm_backlight_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM
-static int pwm_backlight_suspend(struct platform_device *pdev,
-				 pm_message_t state)
+static int pwm_backlight_suspend(struct device *dev)
 {
-	struct backlight_device *bl = platform_get_drvdata(pdev);
+	struct backlight_device *bl = dev_get_drvdata(dev);
 	struct pwm_bl_data *pb = dev_get_drvdata(&bl->dev);
 
 	if (pb->notify)
@@ -184,27 +183,29 @@ static int pwm_backlight_suspend(struct platform_device *pdev,
 	return 0;
 }
 
-static int pwm_backlight_resume(struct platform_device *pdev)
+static int pwm_backlight_resume(struct device *dev)
 {
-	struct backlight_device *bl = platform_get_drvdata(pdev);
+	struct backlight_device *bl = dev_get_drvdata(dev);
 
 	backlight_update_status(bl);
 	return 0;
 }
+
+static SIMPLE_DEV_PM_OPS(pwm_backlight_pm_ops, pwm_backlight_suspend,
+			 pwm_backlight_resume);
+
 #else
-#define pwm_backlight_suspend	NULL
-#define pwm_backlight_resume	NULL
+#define pwm_backlight_pm_ops	NULL
 #endif
 
 static struct platform_driver pwm_backlight_driver = {
 	.driver		= {
 		.name	= "pwm-backlight",
 		.owner	= THIS_MODULE,
+		.pm	= &pwm_backlight_pm_ops,
 	},
 	.probe		= pwm_backlight_probe,
 	.remove		= pwm_backlight_remove,
-	.suspend	= pwm_backlight_suspend,
-	.resume		= pwm_backlight_resume,
 };
 
 module_platform_driver(pwm_backlight_driver);
-- 
1.7.7.3


^ permalink raw reply related

* [PATCH] video/omap2. dispc_mgr_enable needs runtime PM
From: NeilBrown @ 2011-12-30  1:37 UTC (permalink / raw)
  To: Kevin Hilman, Tony Lindgren, Tomi Valkeinen, linux-omap; +Cc: linux-fbdev

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]



When dispc_mgr_enable is called during shutdown the device might
be asleep, which causes problems.  So ensure it is awake.

Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 5c81533..75a767f 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -2052,12 +2052,14 @@ bool dispc_mgr_is_enabled(enum omap_channel channel)
 
 void dispc_mgr_enable(enum omap_channel channel, bool enable)
 {
+	dispc_runtime_get();
 	if (dispc_mgr_is_lcd(channel))
 		dispc_mgr_enable_lcd_out(channel, enable);
 	else if (channel == OMAP_DSS_CHANNEL_DIGIT)
 		dispc_mgr_enable_digit_out(enable);
 	else
 		BUG();
+	dispc_runtime_put();
 }
 
 void dispc_lcd_enable_signal_polarity(bool act_high)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply related

* [PATCH] fb_defio: add first_io callback
From: Heiko Stübner @ 2011-12-31 10:45 UTC (permalink / raw)
  To: linux-fbdev

With this optional callback the driver is notified when the first page
is entered into the pagelist and a new deferred_io call is scheduled.

A possible use-case for this is runtime-pm. In the first_io call
	pm_runtime_get()
could be called, which starts an asynchronous runtime_resume of the
device. In the deferred_io callback a call to
	pm_runtime_barrier()
makes the sure, the device is resumed by then and a
	pm_runtime_put()
may put the device back to sleep.

Also, some SoCs may use the runtime-pm system to determine if they
are able to enter deeper idle states. Therefore it is necessary to
keep the use-count from the first written page until the conclusion
of the screen update, to prevent the system from going to sleep before
completing the pending update.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/video/fb_defio.c |    4 ++++
 include/linux/fb.h       |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c
index c27e153..070f26f 100644
--- a/drivers/video/fb_defio.c
+++ b/drivers/video/fb_defio.c
@@ -107,6 +107,10 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma,
 	/* protect against the workqueue changing the page list */
 	mutex_lock(&fbdefio->lock);
 
+	/* first write in this cycle, notify the driver */
+	if (fbdefio->first_io && list_empty(&fbdefio->pagelist))
+		fbdefio->first_io(info);
+
 	/*
 	 * We want the page to remain locked from ->page_mkwrite until
 	 * the PTE is marked dirty to avoid page_mkclean() being called
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 1d6836c..b86cd41 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -602,6 +602,7 @@ struct fb_deferred_io {
 	struct mutex lock; /* mutex that protects the page list */
 	struct list_head pagelist; /* list of touched pages */
 	/* callback */
+	void (*first_io)(struct fb_info *info);
 	void (*deferred_io)(struct fb_info *info, struct list_head *pagelist);
 };
 #endif
-- 
1.7.2.3


^ permalink raw reply related

* RE: [PATCH v2] video: da8xx-fb: reset LCDC only if functional clock
From: Manjunathappa, Prakash @ 2012-01-03  5:41 UTC (permalink / raw)
  To: linux-fbdev

Hi,

On Thu, Dec 22, 2011 at 14:49:14, Manjunathappa, Prakash wrote:
> LCDC functional clock may or may not be derived from CPU/MPU DPLL, For example, AM335x => Separate independent DPLL for LCDC Davinci => Same DPLL as MPU
> 
> So, on platforms where LCDC functional clock is not derived from CPU/MPU PLL it is not required to reset LCDC module as its functional clock does not change with DVFS.
> 
> This patch adds check to do reset only if functional clock changes between pre and post notifier callbacks with DVFS.
> 
> Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
> ---
>  drivers/video/da8xx-fb.c |   15 ++++++++++-----
>  1 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 6b27751..6146186 100644
> --- a/drivers/video/da8xx-fb.c
> +++ b/drivers/video/da8xx-fb.c
> @@ -163,6 +163,7 @@ struct da8xx_fb_par {
>  	int			vsync_timeout;
>  #ifdef CONFIG_CPU_FREQ
>  	struct notifier_block	freq_transition;
> +	unsigned int		lcd_fck_rate;
>  #endif
>  	void (*panel_power_ctrl)(int);
>  };
> @@ -895,11 +896,12 @@ static int lcd_da8xx_cpufreq_transition(struct notifier_block *nb,
>  	struct da8xx_fb_par *par;
>  
>  	par = container_of(nb, struct da8xx_fb_par, freq_transition);
> -	if (val = CPUFREQ_PRECHANGE) {
> -		lcd_disable_raster();
> -	} else if (val = CPUFREQ_POSTCHANGE) {
> -		lcd_calc_clk_divider(par);
> -		lcd_enable_raster();
> +	if (val = CPUFREQ_POSTCHANGE) {
> +		if (par->lcd_fck_rate != clk_get_rate(par->lcdc_clk)) {

I need to update par->lcd_fck_rate here, I will send v3 of this patch.

Thanks,
Prakash

> +			lcd_disable_raster();
> +			lcd_calc_clk_divider(par);
> +			lcd_enable_raster();
> +		}
>  	}
>  
>  	return 0;
> @@ -1192,6 +1194,9 @@ static int __devinit fb_probe(struct platform_device *device)
>  
>  	par = da8xx_fb_info->par;
>  	par->lcdc_clk = fb_clk;
> +#ifdef CONFIG_CPU_FREQ
> +	par->lcd_fck_rate = clk_get_rate(fb_clk); #endif
>  	par->pxl_clk = lcdc_info->pxl_clk;
>  	if (fb_pdata->panel_power_ctrl) {
>  		par->panel_power_ctrl = fb_pdata->panel_power_ctrl;
> --
> 1.7.1
> 
> 


^ permalink raw reply

* Re: [PATCH] OMAPDSS: add OrtusTech COM43H4M10XTC display support
From: Tomi Valkeinen @ 2012-01-03  9:30 UTC (permalink / raw)
  To: Ilya Yanok; +Cc: linux-fbdev, linux-omap, sasha_d
In-Reply-To: <1324940201-16079-1-git-send-email-yanok@emcraft.com>

[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]

On Mon, 2011-12-26 at 23:56 +0100, Ilya Yanok wrote:
> dd data for the OrtusTech COM43H4M10XTC display to the
> generic_dpi_panel driver.
> 
> CC: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
>  drivers/video/omap2/displays/panel-generic-dpi.c |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c
> index 593f831..99669ae 100644
> --- a/drivers/video/omap2/displays/panel-generic-dpi.c
> +++ b/drivers/video/omap2/displays/panel-generic-dpi.c
> @@ -317,6 +317,26 @@ static struct panel_config generic_dpi_panels[] = {
>  					  OMAP_DSS_LCD_IHS,
>  		.name			= "focaltech_etm070003dh6",
>  	},
> +	/* OrtusTech COM43H4M10XTC */
> +	{
> +		{
> +			.x_res		= 480,
> +			.y_res		= 272,
> +
> +			.pixel_clock	= 8000,
> +
> +			.hsw		= 41,
> +			.hfp		= 8,
> +			.hbp		= 4,
> +
> +			.vsw		= 10,
> +			.vfp		= 4,
> +			.vbp		= 2,
> +		},
> +		.config			= OMAP_DSS_LCD_TFT,
> +
> +		.name			= "ortustech_com43h4m10xtc",
> +	},
>  };
>  

Thanks, I'll apply to DSS tree.

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* [PATCH v3] video: da8xx-fb: reset LCDC only if functional clock changes with DVFS
From: Manjunathappa, Prakash @ 2012-01-03 12:52 UTC (permalink / raw)
  To: linux-fbdev

LCDC functional clock may or may not be derived from CPU/MPU DPLL,
For example,
AM335x => Separate independent DPLL for LCDC
Davinci => Same DPLL as MPU

So, on platforms where LCDC functional clock is not derived from CPU/MPU
PLL it is not required to reset LCDC module as its functional clock does
not change with DVFS.

This patch adds check to do reset only if functional clock changes
between pre and post notifier callbacks with DVFS.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
---
Since v2:
Fix, update lcd_fck_rate with current LCD functional clock rate.
Since v1:
Fixed the commit message.

 drivers/video/da8xx-fb.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 6b27751..dee1918 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -163,6 +163,7 @@ struct da8xx_fb_par {
 	int			vsync_timeout;
 #ifdef CONFIG_CPU_FREQ
 	struct notifier_block	freq_transition;
+	unsigned int		lcd_fck_rate;
 #endif
 	void (*panel_power_ctrl)(int);
 };
@@ -895,11 +896,13 @@ static int lcd_da8xx_cpufreq_transition(struct notifier_block *nb,
 	struct da8xx_fb_par *par;
 
 	par = container_of(nb, struct da8xx_fb_par, freq_transition);
-	if (val = CPUFREQ_PRECHANGE) {
-		lcd_disable_raster();
-	} else if (val = CPUFREQ_POSTCHANGE) {
-		lcd_calc_clk_divider(par);
-		lcd_enable_raster();
+	if (val = CPUFREQ_POSTCHANGE) {
+		if (par->lcd_fck_rate != clk_get_rate(par->lcdc_clk)) {
+			par->lcd_fck_rate = clk_get_rate(par->lcdc_clk);
+			lcd_disable_raster();
+			lcd_calc_clk_divider(par);
+			lcd_enable_raster();
+		}
 	}
 
 	return 0;
@@ -1192,6 +1195,9 @@ static int __devinit fb_probe(struct platform_device *device)
 
 	par = da8xx_fb_info->par;
 	par->lcdc_clk = fb_clk;
+#ifdef CONFIG_CPU_FREQ
+	par->lcd_fck_rate = clk_get_rate(fb_clk);
+#endif
 	par->pxl_clk = lcdc_info->pxl_clk;
 	if (fb_pdata->panel_power_ctrl) {
 		par->panel_power_ctrl = fb_pdata->panel_power_ctrl;
-- 
1.7.1


^ permalink raw reply related

* [PATCH] intelfbdrv.c: bailearly is an int module_param
From: Rusty Russell @ 2012-01-04  2:41 UTC (permalink / raw)
  To: Maik Broemme; +Cc: Florian Tobias Schandinat, linux-fbdev, linux-kernel
In-Reply-To: <20120103131748.GA11575@elgon.mountain>

Dan Carpenter points out that it's an int, not a bool:
intelfbdrv.c:818:	if (bailearly = 1)
intelfbdrv.c:828:	if (bailearly = 2)
intelfbdrv.c:836:	if (bailearly = 3)
intelfbdrv.c:842:	if (bailearly = 4)
intelfbdrv.c:851:	if (bailearly = 5)
intelfbdrv.c:859:	if (bailearly = 6)
intelfbdrv.c:866:				    bailearly > 6 ? bailearly - 6 : 0);
intelfbdrv.c:874:	if (bailearly = 18)
intelfbdrv.c:886:	if (bailearly = 19)
intelfbdrv.c:893:	if (bailearly = 20)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/video/intelfb/intelfbdrv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -263,7 +263,7 @@ module_param(probeonly, bool, 0);
 MODULE_PARM_DESC(probeonly, "Do a minimal probe (debug)");
 module_param(idonly, bool, 0);
 MODULE_PARM_DESC(idonly, "Just identify without doing anything else (debug)");
-module_param(bailearly, bool, 0);
+module_param(bailearly, int, 0);
 MODULE_PARM_DESC(bailearly, "Bail out early, depending on value (debug)");
 module_param(mode, charp, S_IRUGO);
 MODULE_PARM_DESC(mode,

^ permalink raw reply

* Re: [PATCH] video/omap2. dispc_mgr_enable needs runtime PM
From: Tomi Valkeinen @ 2012-01-04  7:50 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-omap, linux-fbdev
In-Reply-To: <20111230123755.384a5b5c@notabene.brown>

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

(dropping the Tony and Kevin, as they're probably not interested in
this)

On Fri, 2011-12-30 at 12:37 +1100, NeilBrown wrote:
> 
> When dispc_mgr_enable is called during shutdown the device might
> be asleep, which causes problems.  So ensure it is awake.

How does this problem happen? dispc_mgr_enable(channel, false) shouldn't
be called if the device is asleep, and thus dispc_mgr_enable() shouldn't
use dispc_runtime_get.

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH 2/2] backlight: Convert pwm_bl to dev_pm_ops
From: Andrew Morton @ 2012-01-04 22:34 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <1325182838-25729-2-git-send-email-broonie@opensource.wolfsonmicro.com>

On Thu, 29 Dec 2011 18:20:38 +0000
Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:

> Should be no functional changes, mainly a reorganisation to support
> future work.
> 
> ...
>
> -#define pwm_backlight_suspend	NULL
> -#define pwm_backlight_resume	NULL
> +#define pwm_backlight_pm_ops	NULL
>  #endif
>  
>  static struct platform_driver pwm_backlight_driver = {
>  	.driver		= {
>  		.name	= "pwm-backlight",
>  		.owner	= THIS_MODULE,
> +		.pm	= &pwm_backlight_pm_ops,

This:

	.pm = &NULL,

will not compile.

Please review and test:

From: Andrew Morton <akpm@linux-foundation.org>
Subject: backlight-convert-pwm_bl-to-dev_pm_ops-fix

Fix CONFIG_PM=n build

Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/video/backlight/pwm_bl.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/video/backlight/pwm_bl.c~backlight-convert-pwm_bl-to-dev_pm_ops-fix drivers/video/backlight/pwm_bl.c
--- a/drivers/video/backlight/pwm_bl.c~backlight-convert-pwm_bl-to-dev_pm_ops-fix
+++ a/drivers/video/backlight/pwm_bl.c
@@ -194,15 +194,15 @@ static int pwm_backlight_resume(struct d
 static SIMPLE_DEV_PM_OPS(pwm_backlight_pm_ops, pwm_backlight_suspend,
 			 pwm_backlight_resume);
 
-#else
-#define pwm_backlight_pm_ops	NULL
 #endif
 
 static struct platform_driver pwm_backlight_driver = {
 	.driver		= {
 		.name	= "pwm-backlight",
 		.owner	= THIS_MODULE,
+#ifdef CONFIG_PM
 		.pm	= &pwm_backlight_pm_ops,
+#endif
 	},
 	.probe		= pwm_backlight_probe,
 	.remove		= pwm_backlight_remove,
_


^ permalink raw reply

* Re: [PATCH v5 2/2] video: backlight: support s6e8ax0 panel driver
From: Andrew Morton @ 2012-01-05  1:01 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <4EF15F9C.9030807@samsung.com>

On Wed, 21 Dec 2011 13:25:00 +0900
Donghwa Lee <dh09.lee@samsung.com> wrote:

> 
> This patch is amoled panel driver based MIPI DSI interface.
> S6E8AX0 means it may includes many other ldi controllers, for example,
> S6E8AA0, S6E8AB0, and so on.
> 
> This patch can be modified depending on each panel properites. For example,
> second parameter of panel condition register can be changed depending on
> ldi controller or amoled type.
> 
>
> ...
>
> +static unsigned char s6e8ax0_22_gamma_30[] = {
> +	0xFA, 0x01, 0x60, 0x10, 0x60, 0xF5, 0x00, 0xFF, 0xAD, 0xAF,
> +	0xBA, 0xC3, 0xD8, 0xC5, 0x9F, 0xC6, 0x9E, 0xC1, 0xDC, 0xC0,
> +	0x00, 0x61, 0x00, 0x5A, 0x00, 0x74,
> +};
> +
>
> ...
>
> +static unsigned char s6e8ax0_22_gamma_300[] = {
> +	0xFA, 0x01, 0x60, 0x10, 0x60, 0xB5, 0xD3, 0xBD, 0xB1, 0xD2,
> +	0xB0, 0xC0, 0xDC, 0xC0, 0x94, 0xBA, 0x91, 0xAC, 0xC5, 0xA9,
> +	0x00, 0xC2, 0x00, 0xB7, 0x00, 0xED,
> +};
> +
> +static unsigned char *s6e8ax0_22_gamma_table[] = {
> +	s6e8ax0_22_gamma_30,
> +	s6e8ax0_22_gamma_50,
> +	s6e8ax0_22_gamma_60,
> +	s6e8ax0_22_gamma_70,
> +	s6e8ax0_22_gamma_80,
> +	s6e8ax0_22_gamma_90,
> +	s6e8ax0_22_gamma_100,
> +	s6e8ax0_22_gamma_120,
> +	s6e8ax0_22_gamma_130,
> +	s6e8ax0_22_gamma_140,
> +	s6e8ax0_22_gamma_150,
> +	s6e8ax0_22_gamma_160,
> +	s6e8ax0_22_gamma_170,
> +	s6e8ax0_22_gamma_180,
> +	s6e8ax0_22_gamma_190,
> +	s6e8ax0_22_gamma_200,
> +	s6e8ax0_22_gamma_210,
> +	s6e8ax0_22_gamma_220,
> +	s6e8ax0_22_gamma_230,
> +	s6e8ax0_22_gamma_240,
> +	s6e8ax0_22_gamma_250,
> +	s6e8ax0_22_gamma_260,
> +	s6e8ax0_22_gamma_270,
> +	s6e8ax0_22_gamma_280,
> +	s6e8ax0_22_gamma_300,
> +};

I suggest making all the above arrays const.  Otherwise the compiler
might end up deciding to needlessly allocate space in writeable storage
for them.

If that means that ops->cmd_write() needs constification as well then
let's just do that, for it is the right thing to do.

> +static void s6e8ax0_panel_cond(struct s6e8ax0 *lcd)
> +{
> +	struct mipi_dsim_master_ops *ops = lcd_to_master_ops(lcd);
> +
> +	unsigned char data_to_send[] = {
> +		0xf8, 0x3d, 0x35, 0x00, 0x00, 0x00, 0x93, 0x00, 0x3c,
> +		0x7d, 0x08, 0x27, 0x7d, 0x3f, 0x00, 0x00, 0x00, 0x20,
> +		0x04, 0x08, 0x6e, 0x00, 0x00, 0x00, 0x02, 0x08, 0x08,
> +		0x23, 0x23, 0xc0, 0xc8, 0x08, 0x48, 0xc1, 0x00, 0xc1,
> +		0xff, 0xff, 0xc8
> +	};

Arrays like this certainly should be const.  As it stands, the compiler
needs to generate room on the stack and generate a local copy of the
array each time this function is called!

> +	ops->cmd_write(lcd_to_master(lcd), MIPI_DSI_DCS_LONG_WRITE,
> +		data_to_send, ARRAY_SIZE(data_to_send));
> +}
> +
> +static void s6e8ax0_display_cond(struct s6e8ax0 *lcd)
> +{
> +	struct mipi_dsim_master_ops *ops = lcd_to_master_ops(lcd);
> +	unsigned char data_to_send[] = {
> +		0xf2, 0x80, 0x03, 0x0d
> +	};
> +
> +	ops->cmd_write(lcd_to_master(lcd), MIPI_DSI_DCS_LONG_WRITE,
> +		data_to_send, ARRAY_SIZE(data_to_send));
> +}
> +
> +/* Gamma 2.2 Setting (200cd, 7500K, 10MPCD) */
> +static void s6e8ax0_gamma_cond(struct s6e8ax0 *lcd)
> +{
> +	struct mipi_dsim_master_ops *ops = lcd_to_master_ops(lcd);
> +	unsigned int gamma = lcd->bd->props.brightness;
> +
> +	ops->cmd_write(lcd_to_master(lcd), MIPI_DSI_DCS_LONG_WRITE,
> +			s6e8ax0_22_gamma_table[gamma],
> +			ARRAY_SIZE(s6e8ax0_22_gamma_table));

This seems wrong.  ARRAY_SIZE(s6e8ax0_22_gamma_table) does not
represent the size of s6e8ax0_22_gamma_table[gamma]!

> +}
> +
>
> ...
>
> +static int s6e8ax0_update_gamma_ctrl(struct s6e8ax0 *lcd, int brightness)
> +{
> +	struct mipi_dsim_master_ops *ops = lcd_to_master_ops(lcd);
> +
> +	ops->cmd_write(lcd_to_master(lcd), MIPI_DSI_DCS_LONG_WRITE,
> +			s6e8ax0_22_gamma_table[brightness],
> +			ARRAY_SIZE(s6e8ax0_22_gamma_table));

Ditto.

> +	/* update gamma table. */
> +	s6e8ax0_gamma_update(lcd);
> +	lcd->gamma = brightness;
> +
> +	return 0;
> +}
> +
>
> ...
>
> +static void s6e8ax0_power_on(struct mipi_dsim_lcd_device *dsim_dev, int power)
> +{
> +	struct s6e8ax0 *lcd = dev_get_drvdata(&dsim_dev->dev);
> +
> +	msleep(lcd->ddi_pd->power_on_delay);
> +
> +	/* lcd power on */
> +	if (power)
> +		s6e8ax0_regulator_enable(lcd);
> +	else
> +		s6e8ax0_regulator_disable(lcd);
> +
> +	msleep(lcd->ddi_pd->reset_delay);
> +
> +	/* lcd reset */
> +	if (lcd->ddi_pd->reset)
> +		lcd->ddi_pd->reset(lcd->ld);
> +	msleep(5);
> +}

Maybe we should hold lcd->lock across this function to prevent other
code paths from getting in and fiddling with the hardware while it is
powering on?

>
> ...
>


^ permalink raw reply

* Re: [PATCH 2/2] backlight: Convert pwm_bl to dev_pm_ops
From: Mark Brown @ 2012-01-05  5:50 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <1325182838-25729-2-git-send-email-broonie@opensource.wolfsonmicro.com>

On Wed, Jan 04, 2012 at 02:34:22PM -0800, Andrew Morton wrote:

> Please review and test:

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

but it'll probably take me longer than it's worth to get a test done due
to travel.

^ permalink raw reply

* Re: [PATCH] video/omap2. dispc_mgr_enable needs runtime PM
From: NeilBrown @ 2012-01-05  7:32 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1325663456.1875.14.camel@deskari>

[-- Attachment #1: Type: text/plain, Size: 2360 bytes --]

On Wed, 04 Jan 2012 09:50:56 +0200 Tomi Valkeinen <tomi.valkeinen@ti.com>
wrote:

> (dropping the Tony and Kevin, as they're probably not interested in
> this)

Thanks.... takes a while to figure who cares about what :-)

> 
> On Fri, 2011-12-30 at 12:37 +1100, NeilBrown wrote:
> > 
> > When dispc_mgr_enable is called during shutdown the device might
> > be asleep, which causes problems.  So ensure it is awake.
> 
> How does this problem happen? dispc_mgr_enable(channel, false) shouldn't
> be called if the device is asleep, and thus dispc_mgr_enable() shouldn't
> use dispc_runtime_get.
> 
>  Tomi
> 

The stack trace shows:

[  101.764556] [<c0205b3c>] (dispc_mgr_enable+0x40/0x2e0) from [<c020c10c>] (dss_mgr_disable+0x14/0x20)
[  101.774078] [<c020c10c>] (dss_mgr_disable+0x14/0x20) from [<c020e500>] (omapdss_dpi_display_disable+0x1c/0x88)
[  101.784484] [<c020e500>] (omapdss_dpi_display_disable+0x1c/0x88) from [<c021efa4>] (td028ttec1_panel_suspend+0x1c/0x88)
[  101.795684] [<c021efa4>] (td028ttec1_panel_suspend+0x1c/0x88) from [<c021f03c>] (td028ttec1_panel_disable+0x2c/0x50)
[  101.806640] [<c021f03c>] (td028ttec1_panel_disable+0x2c/0x50) from [<c020ab6c>] (dss_disable_device+0x20/0x2c)
[  101.817047] [<c020ab6c>] (dss_disable_device+0x20/0x2c) from [<c024ad08>] (bus_for_each_dev+0x4c/0x8c)
[  101.826751] [<c024ad08>] (bus_for_each_dev+0x4c/0x8c) from [<c024ca0c>] (platform_drv_shutdown+0x1c/0x24)
[  101.836700] [<c024ca0c>] (platform_drv_shutdown+0x1c/0x24) from [<c0248164>] (device_shutdown+0xcc/0x10c)
[  101.846679] [<c0248164>] (device_shutdown+0xcc/0x10c) from [<c004c134>] (kernel_power_off+0x10/0x4c)
[  101.856170] [<c004c134>] (kernel_power_off+0x10/0x4c) from [<c004c420>] (sys_reboot+0x124/0x1e0)
[  101.865325] [<c004c420>] (sys_reboot+0x124/0x1e0) from [<c000e9c0>] (ret_fast_syscall+0x0/0x3c)


td028ttec1_panel_* are in a non-mainline driver that could well be buggy.
.....
yep, that looks likely.  The 'disable' routines of other panels only call
omapdss_dpi_display_disable() if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE).
This panel calls it unconditionally.  I guess that is the real bug? (and
putting an appropriate test in fixes it).

Thanks for your help.

(If/when I get this td028ttec driver cleaned up, would you be the one I send
it to?)

Thanks,
NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply

* Re: [PATCH] video/omap2. dispc_mgr_enable needs runtime PM
From: Tomi Valkeinen @ 2012-01-05  7:40 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-omap, linux-fbdev
In-Reply-To: <20120105183241.751b8086@notabene.brown>

[-- Attachment #1: Type: text/plain, Size: 839 bytes --]

On Thu, 2012-01-05 at 18:32 +1100, NeilBrown wrote:
> On Wed, 04 Jan 2012 09:50:56 +0200 Tomi Valkeinen <tomi.valkeinen@ti.com>
> wrote:
> 

> yep, that looks likely.  The 'disable' routines of other panels only call
> omapdss_dpi_display_disable() if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE).
> This panel calls it unconditionally.  I guess that is the real bug? (and
> putting an appropriate test in fixes it).

Yes, that's the bug then. The enable and disable calls must match.

> Thanks for your help.
> 
> (If/when I get this td028ttec driver cleaned up, would you be the one I send
> it to?)

Yep. However, I'm currently working on device tree support for omapdss,
which will affect all panel drivers, and I may reject any new panel
patches until the dev tree stuff is in. But please send anyway =).

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* [GIT PULL] OMAP DSS for v3.3
From: Tomi Valkeinen @ 2012-01-05  8:56 UTC (permalink / raw)
  To: Florian Tobias Schandinat; +Cc: linux-omap, linux-fbdev

[-- Attachment #1: Type: text/plain, Size: 9523 bytes --]

Hi Florian,

Here are changes to OMAP display subsystem driver for the merge window.

This merges and works fine with v3.2, and also merges fine with
linux-next. I haven't been able to test with linux-next as there seems
to be other brokenness there.

 Tomi

The following changes since commit 5611cc4572e889b62a7b4c72a413536bf6a9c416:

  Linux 3.2-rc4 (2011-12-01 14:56:01 -0800)

are available in the git repository at:
  git://gitorious.org/linux-omap-dss2/linux.git for-florian

Archit Taneja (3):
      OMAPDSS: DSI: Fix HSDIV related PLL info in dsi_dump_clocks()
      OMAPDSS: Panel NEC: Set omap_dss_device states correctly
      OMAPDSS: Displays: Make PICODLP driver depend on DPI

Axel Lin (2):
      video: omap: Staticise non-exported symbols
      video: omap: convert drivers/video/omap/* to use module_platform_driver()

Chandrabhanu Mahapatra (2):
      OMAPDSS: DISPC: Update Fir Coefficients
      OMAPDSS: DISPC: Update Scaling Clock Logic

Daniel Mack (1):
      OMAP: DSS2: Support for UMSH-8173MD TFT panel

Ilya Yanok (2):
      OMAPDSS: add FocalTech ETM070003DH6 display support
      OMAPDSS: add OrtusTech COM43H4M10XTC display support

Mythri P K (2):
      OMAPDSS: HDMI: Move duplicate code from boardfile
      OMAPDSS: HDMI: Disable DDC internal pull up

Ricardo Neri (4):
      ASoC: OMAP: HDMI: Introduce driver data for audio codec
      ASoC: OMAP: HDMI: Correct signature of ASoC functions
      OMAPDSS: HDMI: Create function to enable HDMI audio
      ASoC: OMAP: HDMI: Move HDMI codec trigger function to generic HDMI driver

Rob Clark (2):
      OMAPDSS: fix potential NULL pointer ref in OCP_ERR handling path
      OMAPDSS: APPLY: fix NULL pointer deref when mgr is not set

Tomi Valkeinen (90):
      OMAPDSS: DSI: flush posted write when entering ULPS
      OMAPDSS: DSI: flush posted write in send_bta
      OMAPDSS: DISPC: Flush posted writes when enabling outputs
      OMAPDSS: DSI: count with number of lanes
      OMAPDSS: DSI: Parse lane config
      OMAPDSS: DSI: Use new lane config in dsi_set_lane_config
      OMAPDSS: DSI: use lane config in dsi_get_lane_mask
      OMAPDSS: DSI: use lane config in dsi_cio_wait_tx_clk_esc_reset
      OMAPDSS: DSI: use lane config in dsi_cio_enable_lane_override
      OMAPDSS: DSI: remove dsi_get_num_lanes_used
      OMAPDSS: DSI: fix lane handling when entering ULPS
      OMAPDSS: DSI: improve wait_for_bit_change
      OMAPDSS: DSI: disable DDR_CLK_ALWAYS_ON when entering ULPS
      OMAPDSS: DISPC: add missing prototype
      OMAPDSS: Remove old fifomerge hacks
      OMAPDSS: remove L4_EXAMPLE code
      OMAPDSS: DISPC: make dispc_ovl_set_channel_out() public
      OMAPDSS: DISPC: make dispc_ovl_set_fifo_threshold() public
      OMAPDSS: remove partial update from the overlay manager
      OMAPDSS: remove partial update from DSI
      OMAPDSS: remove partial update from panel-taal
      OMAPDSS: pass ovl manager to dss_start_update
      OMAPDSS: DISPC: handle 0 out_width/out_height in ovl_setup()
      OMAPDSS: handle ilace/replication when configuring overlay
      OMAPDSS: separate FIFO threshold setup from ovl_setup
      OMAPDSS: separate overlay channel from ovl_setup
      OMAPDSS: setup manager with dispc_mgr_setup()
      OMAPDSS: DISPC: remove unused functions
      OMAPDSS: remove unneeded dss_ovl_wait_for_go()
      OMAPDSS: add ovl/mgr_manual_update() helpers
      OMAPDSS: split omap_dss_mgr_apply() to smaller funcs
      OMAPDSS: apply affects only one overlay manager
      OMAPDSS: create apply.c
      OMAPDSS: hide manager's enable/disable()
      OMAPDSS: APPLY: track whether a manager is enabled
      OMAPDSS: APPLY: skip isr register and config for manual update displays
      OMAPDSS: APPLY: skip isr register and config for disabled displays
      OMAPDSS: APPLY: cleanup dss_mgr_start_update
      OMAPDSS: store overlays in an array
      OMAPDSS: store managers in an array
      OMAPDSS: store overlays in a list for each manager
      OMAPDSS: APPLY: separate vsync isr register/unregister
      OMAPDSS: DISPC: Add dispc_mgr_get_vsync_irq()
      OMAPDSS: APPLY: use dispc_mgr_get_vsync_irq()
      OMAPDSS: APPLY: configure_* funcs take ovl/manager as args
      OMAPDSS: APPLY: rename overlay_cache_data
      OMAPDSS: APPLY: rename manager_cache_data
      OMAPDSS: APPLY: move spinlock outside the struct
      OMAPDSS: APPLY: rename dss_cache to dss_data
      OMAPDSS: APPLY: move ovl funcs to apply.c
      OMAPDSS: APPLY: move mgr funcs to apply.c
      OMAPDSS: remove ovl/mgr check-code temporarily
      OMAPDSS: APPLY: add mutex
      OMAPDSS: APPLY: add missing uses of spinlock
      OMAPDSS: DSI: call mgr_enable/disable for cmd mode displays
      OMAPDSS: APPLY: move mgr->enabled to mgr_priv_data
      OMAPDSS: APPLY: add busy field to mgr_priv_data
      OMAPDSS: APPLY: rewrite overlay enable/disable
      OMAPDSS: APPLY: rewrite register writing
      OMAPDSS: DISPC: add dispc_mgr_get_framedone_irq
      OMAPDSS: APPLY: add updating flag
      OMAPDSS: APPLY: clean up isr_handler
      OMAPDSS: APPLY: move mgr->info to apply.c
      OMAPDSS: APPLY: move ovl->info to apply.c
      OMAPDSS: APPLY: move channel-field to extra_info set
      OMAPDSS: APPLY: move fifo thresholds to extra_info set
      OMAPDSS: APPLY: rename dirty & shadow_dirty
      OMAPDSS: APPLY: remove device_changed field
      OMAPDSS: APPLY: add dss_apply_ovl_enable()
      OMAPDSS: APPLY: skip enable/disable if already enabled/disabled
      OMAPDSS: APPLY: add wait_pending_extra_info_updates()
      OMAPDSS: APPLY: remove runtime_get
      OMAPDSS: Add comments about blocking of ovl/mgr functions
      OMAPDSS: APPLY: add dss_ovl_simple_check()
      OMAPDSS: APPLY: add dss_mgr_simple_check()
      OMAPDSS: APPLY: add checking of ovls/mgrs settings
      OMAPDSS: APPLY: add return value to dss_mgr_enable()
      OMAPDSS: check the return value of dss_mgr_enable()
      OMAPDSS: APPLY: fix extra_info_update_ongoing
      OMAPDSS: APPLY: fix need_isr
      OMAPDSS: APPLY: clear shadow dirty flags only if GO had been set
      OMAPDSS: APPLY: add dss_set_go_bits()
      OMAPDSS: APPLY: cleanup extra_info_update_ongoing
      OMAPDSS: APPLY: add op->enabling
      OMAPDSS: APPLY: simplify dss_mgr_enable
      OMAPDSS: APPLY: add dss_setup_fifos
      OMAPDSS: APPLY: write fifo thresholds only if changed
      OMAPDSS: APPLY: remove unused variables
      OMAPDSS: APPLY: move check functions
      OMAPDSS: APPLY: move simple_check functions

 arch/arm/mach-omap2/board-4430sdp.c                |   23 +-
 arch/arm/mach-omap2/board-omap4panda.c             |   25 +-
 arch/arm/mach-omap2/display.c                      |   39 +
 drivers/media/video/omap/omap_vout.c               |   33 +-
 drivers/video/omap/lcd_ams_delta.c                 |   15 +-
 drivers/video/omap/lcd_h3.c                        |   16 +-
 drivers/video/omap/lcd_htcherald.c                 |   16 +-
 drivers/video/omap/lcd_inn1510.c                   |   16 +-
 drivers/video/omap/lcd_inn1610.c                   |   16 +-
 drivers/video/omap/lcd_osk.c                       |   16 +-
 drivers/video/omap/lcd_palmte.c                    |   16 +-
 drivers/video/omap/lcd_palmtt.c                    |   15 +-
 drivers/video/omap/lcd_palmz71.c                   |   15 +-
 drivers/video/omap2/displays/Kconfig               |    2 +-
 drivers/video/omap2/displays/panel-generic-dpi.c   |   66 +
 .../omap2/displays/panel-nec-nl8048hl11-01b.c      |   61 +-
 drivers/video/omap2/displays/panel-taal.c          |   38 +-
 drivers/video/omap2/dss/Makefile                   |    3 +-
 drivers/video/omap2/dss/apply.c                    | 1324 ++++++++++++++++++++
 drivers/video/omap2/dss/core.c                     |    2 +
 drivers/video/omap2/dss/dispc.c                    |  407 +++----
 drivers/video/omap2/dss/dispc.h                    |   11 +
 drivers/video/omap2/dss/dispc_coefs.c              |  326 +++++
 drivers/video/omap2/dss/dpi.c                      |    7 +-
 drivers/video/omap2/dss/dsi.c                      |  612 +++++-----
 drivers/video/omap2/dss/dss.h                      |   74 +-
 drivers/video/omap2/dss/dss_features.c             |   11 +
 drivers/video/omap2/dss/dss_features.h             |    1 +
 drivers/video/omap2/dss/hdmi.c                     |   59 +-
 drivers/video/omap2/dss/manager.c                  | 1221 ++----------------
 drivers/video/omap2/dss/overlay.c                  |  435 +++-----
 drivers/video/omap2/dss/rfbi.c                     |    1 -
 drivers/video/omap2/dss/sdi.c                      |    8 +-
 drivers/video/omap2/dss/ti_hdmi.h                  |   10 +-
 drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c          |   37 +-
 drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h          |    3 -
 drivers/video/omap2/dss/venc.c                     |   28 +-
 drivers/video/omap2/omapfb/omapfb-ioctl.c          |   42 +-
 drivers/video/omap2/omapfb/omapfb-main.c           |   14 +-
 drivers/video/omap2/omapfb/omapfb-sysfs.c          |    4 +-
 drivers/video/omap2/omapfb/omapfb.h                |   11 +-
 include/video/omapdss.h                            |   58 +-
 42 files changed, 2883 insertions(+), 2254 deletions(-)
 create mode 100644 drivers/video/omap2/dss/apply.c
 create mode 100644 drivers/video/omap2/dss/dispc_coefs.c


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH] atmel_lcdfb: support 16bit BGR:565 mode, remove unsupported 15bit modes
From: Peter Korsgaard @ 2012-01-05 11:26 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1318517570-28459-1-git-send-email-jacmet@sunsite.dk>

>>>>> "Peter" = Peter Korsgaard <jacmet@sunsite.dk> writes:

 Peter> Allow framebuffer to be configured in 16bit mode when panel is
 Peter> wired in (the default) BGR configuration, and don't claim to
 Peter> support 15bit input modes, which the LCD controller cannot
 Peter> handle.

Ping? Nicolas, you added it to your at91-lcd branch - But it doesn't seem
to have gone any further.

 Peter> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
 Peter> ---
 Peter>  drivers/video/atmel_lcdfb.c |   12 +++---------
 Peter>  1 files changed, 3 insertions(+), 9 deletions(-)

 Peter> diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
 Peter> index 7ca3eaf..143f6d9 100644
 Peter> --- a/drivers/video/atmel_lcdfb.c
 Peter> +++ b/drivers/video/atmel_lcdfb.c
 Peter> @@ -418,24 +418,18 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
 var-> red.length = var->green.length = var->blue.length
 Peter>  			= var->bits_per_pixel;
 Peter>  		break;
 Peter> -	case 15:
 Peter>  	case 16:
 Peter>  		if (sinfo->lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB) {
 Peter>  			/* RGB:565 mode */
 var-> red.offset = 11;
 var-> blue.offset = 0;
 Peter> -			var->green.length = 6;
 Peter> -		} else if (sinfo->lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB555) {
 Peter> -			var->red.offset = 10;
 Peter> -			var->blue.offset = 0;
 Peter> -			var->green.length = 5;
 Peter>  		} else {
 Peter> -			/* BGR:555 mode */
 Peter> +			/* BGR:565 mode */
 var-> red.offset = 0;
 Peter> -			var->blue.offset = 10;
 Peter> -			var->green.length = 5;
 Peter> +			var->blue.offset = 11;
 Peter>  		}
 var-> green.offset = 5;
 Peter> +		var->green.length = 6;
 var-> red.length = var->blue.length = 5;
 Peter>  		break;
 Peter>  	case 32:
 Peter> -- 
 Peter> 1.7.6.3

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* Re: [PATCH 1/5] drivers/video: fsl-diu-fb: merge init_fbinfo() into
From: Florian Tobias Schandinat @ 2012-01-09  2:33 UTC (permalink / raw)
  To: linux-fbdev

On 12/19/2011 10:26 PM, Timur Tabi wrote:
> Function init_fbinfo() is called only from install_fb(), and it's only a few
> lines long.  Plus, it ignores the return code from fb_alloc_cmap().  Merge
> its contents into install_fb() and handle errors properly.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>

Applied all 5 patches of this series.


Thanks,

Florian Tobias Schandinat

> ---
>  drivers/video/fsl-diu-fb.c |   25 ++++++++-----------------
>  1 files changed, 8 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
> index 408272c..411a7b3 100644
> --- a/drivers/video/fsl-diu-fb.c
> +++ b/drivers/video/fsl-diu-fb.c
> @@ -1220,21 +1220,6 @@ static struct fb_ops fsl_diu_ops = {
>  	.fb_release = fsl_diu_release,
>  };
>  
> -static int init_fbinfo(struct fb_info *info)
> -{
> -	struct mfb_info *mfbi = info->par;
> -
> -	info->device = NULL;
> -	info->var.activate = FB_ACTIVATE_NOW;
> -	info->fbops = &fsl_diu_ops;
> -	info->flags = FBINFO_FLAG_DEFAULT;
> -	info->pseudo_palette = &mfbi->pseudo_palette;
> -
> -	/* Allocate colormap */
> -	fb_alloc_cmap(&info->cmap, 16, 0);
> -	return 0;
> -}
> -
>  static int __devinit install_fb(struct fb_info *info)
>  {
>  	int rc;
> @@ -1244,8 +1229,14 @@ static int __devinit install_fb(struct fb_info *info)
>  	unsigned int dbsize = ARRAY_SIZE(fsl_diu_mode_db);
>  	int has_default_mode = 1;
>  
> -	if (init_fbinfo(info))
> -		return -EINVAL;
> +	info->var.activate = FB_ACTIVATE_NOW;
> +	info->fbops = &fsl_diu_ops;
> +	info->flags = FBINFO_DEFAULT;
> +	info->pseudo_palette = mfbi->pseudo_palette;
> +
> +	rc = fb_alloc_cmap(&info->cmap, 16, 0);
> +	if (rc)
> +		return rc;
>  
>  	if (mfbi->index = PLANE0) {
>  		if (mfbi->edid_data) {


^ permalink raw reply


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