Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* Re: [PATCH] drivers/video: compile fixes for fsl-diu-fb.c
From: Michael Neuling @ 2012-01-16  0:52 UTC (permalink / raw)
  To: Tabi Timur-B04825
  Cc: linuxppc-dev@ozlabs.org, linux-fbdev@vger.kernel.org,
	Florian Tobias Schandinat
In-Reply-To: <4F1370C9.9010400@freescale.com>

In message <4F1370C9.9010400@freescale.com> you wrote:
> Michael Neuling wrote:
> > Fix a bunch of compiler errors and warnings introduced in:
> >    commit ddd3d905436b572ebadc09dcf2d12ca5b37020a0
> >    Author: Timur Tabi<timur@freescale.com>
> >    drivers/video: fsl-diu-fb: merge all allocated data into one block
> >
> > Signed-off-by: Michael Neuling<mikey@neuling.org>
> > ---
> > Timur: you do compile test your patches, right? :-P
> 
> I have a script that tests each commit in a set to make sure it compiles,
> so that git-bisect isn't broken.

May I suggest you actually run the script next time :-P

> > This is effecting mpc85xx_defconfig on mainline (and has been in
> > linux-next for while already).
> >
> > diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
> > index acf292b..78cac52 100644
> > --- a/drivers/video/fsl-diu-fb.c
> > +++ b/drivers/video/fsl-diu-fb.c
> > @@ -366,7 +366,7 @@ struct mfb_info {
> >    */
> >   struct fsl_diu_data {
> >   	dma_addr_t dma_addr;
> > -	struct fb_info fsl_diu_info[NUM_AOIS];
> > +	struct fb_info *fsl_diu_info[NUM_AOIS];
> 
> This doesn't make any sense.  If you change fsl_diu_info into a pointer, 
> then where is the object being allocated?

OK, how about this?


From: Michael Neuling <mikey@neuling.org>

[PATCH] drivers/video: compile fixes for fsl-diu-fb.c

Fix a compiler errors introduced in:
  commit ddd3d905436b572ebadc09dcf2d12ca5b37020a0
  Author: Timur Tabi <timur@freescale.com>
  drivers/video: fsl-diu-fb: merge all allocated data into one block

Signed-off-by: Michael Neuling <mikey@neuling.org>

diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index acf292b..3006b2b 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -1432,7 +1432,7 @@ static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state)
 	struct fsl_diu_data *data;
 
 	data = dev_get_drvdata(&ofdev->dev);
-	disable_lcdc(data->fsl_diu_info[0]);
+	disable_lcdc(&(data->fsl_diu_info[0]));
 
 	return 0;
 }
@@ -1442,7 +1442,7 @@ static int fsl_diu_resume(struct platform_device *ofdev)
 	struct fsl_diu_data *data;
 
 	data = dev_get_drvdata(&ofdev->dev);
-	enable_lcdc(data->fsl_diu_info[0]);
+	enable_lcdc(&(data->fsl_diu_info[0]));
 
 	return 0;
 }



^ permalink raw reply related

* Re: [PATCH] drivers/video: compile fixes for fsl-diu-fb.c
From: Tabi Timur-B04825 @ 2012-01-16  0:35 UTC (permalink / raw)
  To: Michael Neuling
  Cc: linuxppc-dev@ozlabs.org, linux-fbdev@vger.kernel.org,
	Florian Tobias Schandinat
In-Reply-To: <19504.1326673788@neuling.org>

Michael Neuling wrote:
> Fix a bunch of compiler errors and warnings introduced in:
>    commit ddd3d905436b572ebadc09dcf2d12ca5b37020a0
>    Author: Timur Tabi<timur@freescale.com>
>    drivers/video: fsl-diu-fb: merge all allocated data into one block
>
> Signed-off-by: Michael Neuling<mikey@neuling.org>
> ---
> Timur: you do compile test your patches, right? :-P

I have a script that tests each commit in a set to make sure it compiles, 
so that git-bisect isn't broken.

> This is effecting mpc85xx_defconfig on mainline (and has been in
> linux-next for while already).
>
> diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
> index acf292b..78cac52 100644
> --- a/drivers/video/fsl-diu-fb.c
> +++ b/drivers/video/fsl-diu-fb.c
> @@ -366,7 +366,7 @@ struct mfb_info {
>    */
>   struct fsl_diu_data {
>   	dma_addr_t dma_addr;
> -	struct fb_info fsl_diu_info[NUM_AOIS];
> +	struct fb_info *fsl_diu_info[NUM_AOIS];

This doesn't make any sense.  If you change fsl_diu_info into a pointer, 
then where is the object being allocated?

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply

* [PATCH] drivers/video: compile fixes for fsl-diu-fb.c
From: Michael Neuling @ 2012-01-16  0:29 UTC (permalink / raw)
  To: Florian Tobias Schandinat, Timur Tabi; +Cc: linuxppc-dev, linux-fbdev

Fix a bunch of compiler errors and warnings introduced in:
  commit ddd3d905436b572ebadc09dcf2d12ca5b37020a0
  Author: Timur Tabi <timur@freescale.com>
  drivers/video: fsl-diu-fb: merge all allocated data into one block

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
Timur: you do compile test your patches, right? :-P

This is effecting mpc85xx_defconfig on mainline (and has been in
linux-next for while already).

diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index acf292b..78cac52 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -366,7 +366,7 @@ struct mfb_info {
  */
 struct fsl_diu_data {
 	dma_addr_t dma_addr;
-	struct fb_info fsl_diu_info[NUM_AOIS];
+	struct fb_info *fsl_diu_info[NUM_AOIS];
 	struct mfb_info mfb[NUM_AOIS];
 	struct device_attribute dev_attr;
 	unsigned int irq;
@@ -608,8 +608,8 @@ static void adjust_aoi_size_position(struct fb_var_screeninfo *var,
 	int lower_aoi_is_open, upper_aoi_is_open;
 	__u32 base_plane_width, base_plane_height, upper_aoi_height;
 
-	base_plane_width = data->fsl_diu_info[0].var.xres;
-	base_plane_height = data->fsl_diu_info[0].var.yres;
+	base_plane_width = data->fsl_diu_info[0]->var.xres;
+	base_plane_height = data->fsl_diu_info[0]->var.yres;
 
 	if (mfbi->x_aoi_d < 0)
 		mfbi->x_aoi_d = 0;
@@ -624,7 +624,7 @@ static void adjust_aoi_size_position(struct fb_var_screeninfo *var,
 		break;
 	case PLANE1_AOI0:
 	case PLANE2_AOI0:
-		lower_aoi_mfbi = data->fsl_diu_info[index+1].par;
+		lower_aoi_mfbi = data->fsl_diu_info[index+1]->par;
 		lower_aoi_is_open = lower_aoi_mfbi->count > 0 ? 1 : 0;
 		if (var->xres > base_plane_width)
 			var->xres = base_plane_width;
@@ -642,8 +642,8 @@ static void adjust_aoi_size_position(struct fb_var_screeninfo *var,
 		break;
 	case PLANE1_AOI1:
 	case PLANE2_AOI1:
-		upper_aoi_mfbi = data->fsl_diu_info[index-1].par;
-		upper_aoi_height = data->fsl_diu_info[index-1].var.yres;
+		upper_aoi_mfbi = data->fsl_diu_info[index-1]->par;
+		upper_aoi_height = data->fsl_diu_info[index-1]->var.yres;
 		upper_aoi_bottom = upper_aoi_mfbi->y_aoi_d + upper_aoi_height;
 		upper_aoi_is_open = upper_aoi_mfbi->count > 0 ? 1 : 0;
 		if (var->xres > base_plane_width)
@@ -1469,7 +1469,7 @@ static ssize_t store_monitor(struct device *device,
 		unsigned int i;
 
 		for (i=0; i < NUM_AOIS; i++)
-			fsl_diu_set_par(&data->fsl_diu_info[i]);
+			fsl_diu_set_par(data->fsl_diu_info[i]);
 	}
 	return count;
 }
@@ -1524,7 +1524,7 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
 	spin_lock_init(&data->reg_lock);
 
 	for (i = 0; i < NUM_AOIS; i++) {
-		struct fb_info *info = &data->fsl_diu_info[i];
+		struct fb_info *info = data->fsl_diu_info[i];
 
 		info->device = &pdev->dev;
 		info->par = &data->mfb[i];
@@ -1597,7 +1597,7 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
 	out_be32(&data->diu_reg->desc[2], data->dummy_ad.paddr);
 
 	for (i = 0; i < NUM_AOIS; i++) {
-		ret = install_fb(&data->fsl_diu_info[i]);
+		ret = install_fb(data->fsl_diu_info[i]);
 		if (ret) {
 			dev_err(&pdev->dev, "could not register fb %d\n", i);
 			goto error;
@@ -1625,7 +1625,7 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
 
 error:
 	for (i = 0; i < NUM_AOIS; i++)
-		uninstall_fb(&data->fsl_diu_info[i]);
+		uninstall_fb(data->fsl_diu_info[i]);
 
 	iounmap(data->diu_reg);
 
@@ -1641,11 +1641,11 @@ static int fsl_diu_remove(struct platform_device *pdev)
 	int i;
 
 	data = dev_get_drvdata(&pdev->dev);
-	disable_lcdc(&data->fsl_diu_info[0]);
+	disable_lcdc(data->fsl_diu_info[0]);
 	free_irq_local(data);
 
 	for (i = 0; i < NUM_AOIS; i++)
-		uninstall_fb(&data->fsl_diu_info[i]);
+		uninstall_fb(data->fsl_diu_info[i]);
 
 	iounmap(data->diu_reg);
 

^ permalink raw reply related

* Re: [GIT PULL] fbdev updates for 3.3
From: Linus Torvalds @ 2012-01-14 23:13 UTC (permalink / raw)
  To: Florian Tobias Schandinat; +Cc: LKML, linux-fbdev@vger.kernel.org
In-Reply-To: <4F10751E.8040906@gmx.de>

On Fri, Jan 13, 2012 at 10:17 AM, Florian Tobias Schandinat
<FlorianSchandinat@gmx.de> wrote:
>
> are available in the git repository at:
>  git://github.com/schandinat/linux-2.6.git fbdev-next

Btw, especially since you are using github, I'd *really* like you to
start using signed tags for your pull requests. Even an unsigned gpg
key is better than none, since it at least shows that it's the same
person doing it over time. And I'm sure you can find people who can
sign your key..

               Linus

^ permalink raw reply

* Re: [PATCH] video: s3c-fb: Add device tree support
From: Sylwester Nawrocki @ 2012-01-13 21:30 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <4F109C04.5090600@gmail.com>

On 01/13/2012 10:03 PM, Sylwester Nawrocki wrote:
> On 01/09/2012 09:01 PM, Thomas Abraham wrote:
>>
>> +	for (idx = 0; idx<   nr_gpios; idx++) {
>> +		gpio = of_get_gpio(dev->of_node, idx);
>> +		if (!gpio_is_valid(gpio)) {
>> +			dev_err(dev, "invalid gpio[%d]: %d\n", idx, gpio);
>> +			return -EINVAL;
>> +		}
>> +
>> +		if (!request)
>> +			continue;
>> +
>> +		ret = gpio_request(gpio, "fimd");
> 
> Is it how it normally is supposed to be done, i.e. configuring a gpio
> _before_ it has been requested ? of_get_gpio() indirectly touches the
> gpio controller and gpio_request() doesn't seem to serve its purpose
> in this case, i.e. if there is situation like:
> 
> driver A                        driver B
> 
> of_get_gpio(nodeA, gpioA);
>                                  of_get_gpio(nodeB, gpioA);
> gpio_request(gpioA);
>                                  gpio_request(gpioB);
                                               s/B/A
> 
> driver B will end up with configuration of gpioA from nodeA, not from
> nodeB.
 
ugh, I put it wrong, it should instead read:

"driver A will end up with configuration of gpioA from nodeB, not from
nodeA."
 
> As there are few drivers doing that I must be missing something,
> not sure what..
> I realize the GPIO number needs to be known in order for a GPIO to be
> requested. Shouldn't of_get_gpio() be extended to allow locking gpio
> controller's module and marking a GPIO as requested in advance ?
> 
>> +		if (ret) {
>> +			dev_err(dev, "gpio [%d] request failed\n", gpio);
>> +			goto gpio_free;
>> +		}
>> +		sfb->gpios[idx] = gpio;
>> +	}
>> +	return 0;
>> +
>> +gpio_free:
>> +	while (--idx>= 0)
>> +		gpio_free(sfb->gpios[idx]);
>> +	return ret;
>> +}
>> +
>> +static void s3c_fb_dt_free_gpios(struct s3c_fb *sfb)
>> +{
>> +	unsigned int idx, nr_gpio;
>> +
>> +	nr_gpio = sfb->pdata->win[0]->max_bpp + 4;
>> +	for (idx = 0; idx<   nr_gpio; idx++)
>> +		gpio_free(sfb->gpios[idx]);
>> +}


^ permalink raw reply

* Re: [PATCH] video: s3c-fb: Add device tree support
From: Sylwester Nawrocki @ 2012-01-13 21:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1326139307-25112-1-git-send-email-thomas.abraham@linaro.org>

On 01/09/2012 09:01 PM, Thomas Abraham wrote:
>
> +	for (idx = 0; idx<  nr_gpios; idx++) {
> +		gpio = of_get_gpio(dev->of_node, idx);
> +		if (!gpio_is_valid(gpio)) {
> +			dev_err(dev, "invalid gpio[%d]: %d\n", idx, gpio);
> +			return -EINVAL;
> +		}
> +
> +		if (!request)
> +			continue;
> +
> +		ret = gpio_request(gpio, "fimd");

Is it how it normally is supposed to be done, i.e. configuring a gpio
_before_ it has been requested ? of_get_gpio() indirectly touches the
gpio controller and gpio_request() doesn't seem to serve its purpose
in this case, i.e. if there is situation like:

driver A                        driver B

of_get_gpio(nodeA, gpioA);
                                of_get_gpio(nodeB, gpioA);
gpio_request(gpioA);
                                gpio_request(gpioB);

driver B will end up with configuration of gpioA from nodeA, not from 
nodeB. 

As there are few drivers doing that I must be missing something,
not sure what..
I realize the GPIO number needs to be known in order for a GPIO to be
requested. Shouldn't of_get_gpio() be extended to allow locking gpio
controller's module and marking a GPIO as requested in advance ?

> +		if (ret) {
> +			dev_err(dev, "gpio [%d] request failed\n", gpio);
> +			goto gpio_free;
> +		}
> +		sfb->gpios[idx] = gpio;
> +	}
> +	return 0;
> +
> +gpio_free:
> +	while (--idx>= 0)
> +		gpio_free(sfb->gpios[idx]);
> +	return ret;
> +}
> +
> +static void s3c_fb_dt_free_gpios(struct s3c_fb *sfb)
> +{
> +	unsigned int idx, nr_gpio;
> +
> +	nr_gpio = sfb->pdata->win[0]->max_bpp + 4;
> +	for (idx = 0; idx<  nr_gpio; idx++)
> +		gpio_free(sfb->gpios[idx]);
> +}

^ permalink raw reply

* Re: [PATCH 5/6] OMAPDSS: DISPC: move fifo threhold calc to dispc.c
From: Archit @ 2012-01-13 20:12 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev, archit, rob
In-Reply-To: <1326455193-19716-6-git-send-email-tomi.valkeinen@ti.com>

Hi,

On Friday 13 January 2012 05:16 PM, Tomi Valkeinen wrote:
> Move fifo threshold calculation into dispc.c, as the thresholds are
> really dispc internal thing.
>
> Signed-off-by: Tomi Valkeinen<tomi.valkeinen@ti.com>

<snip>

> diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
> index 511ae2a..1cbb7a5 100644
> --- a/drivers/video/omap2/dss/dsi.c
> +++ b/drivers/video/omap2/dss/dsi.c
> @@ -4524,14 +4524,6 @@ int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable)
>   }
>   EXPORT_SYMBOL(omapdss_dsi_enable_te);
>
> -void dsi_get_overlay_fifo_thresholds(enum omap_plane plane,
> -		u32 fifo_size, u32 burst_size,
> -		u32 *fifo_low, u32 *fifo_high)
> -{
> -	*fifo_high = fifo_size - burst_size;
> -	*fifo_low = fifo_size - burst_size * 2;
> -}

We are removing the special treatment for overlays connected to DSI done 
before. Won't this cause the issues you saw with DSI in OMAP3?

Archit

> -
>   int dsi_init_display(struct omap_dss_device *dssdev)
>   {
>   	struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
> diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
> index 3cf99a9..f2378a8 100644
> --- a/drivers/video/omap2/dss/dss.h
> +++ b/drivers/video/omap2/dss/dss.h
> @@ -202,9 +202,6 @@ void dss_uninit_device(struct platform_device *pdev,
>   		struct omap_dss_device *dssdev);
>   bool dss_use_replication(struct omap_dss_device *dssdev,
>   		enum omap_color_mode mode);
> -void default_get_overlay_fifo_thresholds(enum omap_plane plane,
> -		u32 fifo_size, u32 burst_size,
> -		u32 *fifo_low, u32 *fifo_high);
>
>   /* manager */
>   int dss_init_overlay_managers(struct platform_device *pdev);
> @@ -313,9 +310,6 @@ int dsi_pll_calc_clock_div_pck(struct platform_device *dsidev, bool is_tft,
>   int dsi_pll_init(struct platform_device *dsidev, bool enable_hsclk,
>   		bool enable_hsdiv);
>   void dsi_pll_uninit(struct platform_device *dsidev, bool disconnect_lanes);
> -void dsi_get_overlay_fifo_thresholds(enum omap_plane plane,
> -		u32 fifo_size, u32 burst_size,
> -		u32 *fifo_low, u32 *fifo_high);
>   void dsi_wait_pll_hsdiv_dispc_active(struct platform_device *dsidev);
>   void dsi_wait_pll_hsdiv_dsi_active(struct platform_device *dsidev);
>   struct platform_device *dsi_get_dsidev_from_id(int module);
> @@ -429,8 +423,8 @@ int dispc_calc_clock_rates(unsigned long dispc_fclk_rate,
>
>
>   void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high);
> -u32 dispc_ovl_get_fifo_size(enum omap_plane plane);
> -u32 dispc_ovl_get_burst_size(enum omap_plane plane);
> +void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane,
> +		u32 *fifo_low, u32 *fifo_high, bool use_fifomerge);
>   int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
>   		bool ilace, bool replication);
>   int dispc_ovl_enable(enum omap_plane plane, bool enable);


^ permalink raw reply

* [GIT PULL] fbdev updates for 3.3
From: Florian Tobias Schandinat @ 2012-01-13 18:17 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: LKML, linux-fbdev@vger.kernel.org

Hi Linus,

please pull the following changes to the fbdev subsystem. It contains

- removal of the (unused) display subsystem

- an API extension to support YUV formats via FOURCC done by Laurent

- large updates to OMAP, some updates to sh_mipi_dsi, s3c-fb, fsl-diu-fb, amifb,
cirrusfb and atmel_lcdfb, few patches to others

This merge window was not as quite as I hoped but it all looks pretty reasonable.


Thanks,

Florian Tobias Schandinat


The following changes since commit 384703b8e6cd4c8ef08512e596024e028c91c339:

  Linux 3.2-rc6 (2011-12-16 18:36:26 -0800)

are available in the git repository at:
  git://github.com/schandinat/linux-2.6.git fbdev-next

Alexander Stein (2):
      atmel_lcdfb: Adjust HFP calculation so it matches the manual.
      atmel_lcdfb: Use proper blanking on negative contrast polarity

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 (5):
      video: convert drivers/video/* to use module_platform_driver()
      video: convert mbxfb to use module_platform_driver()
      video: pnx4008: convert drivers/video/pnx4008/* to use
module_platform_driver()
      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

Florian Tobias Schandinat (6):
      fbdev: remove display subsystem
      Merge commit 'v3.2-rc2' into fbdev-next
      Merge branch 'fbdev-for-linus' into fbdev-next
      Merge commit 'v3.2-rc6' into fbdev-next
      Merge branch 'for-florian' of git://gitorious.org/linux-omap-dss2/linux
into fbdev-next
      Revert "atmel_lcdfb: Adjust HFP calculation so it matches the manual."

Geert Uytterhoeven (12):
      zorro: Rename Picasso IV Z2 "MEM" to "RAM" for consistency
      fbdev/cirrusfb: Rewrite Zorro graphics card probing
      fbdev/cirrusfb: Add support for Picasso IV in Zorro II mode
      fbdev/cirrusfb: Add support for "64 MiB" version of Picasso IV
      fbdev/amifb: Correct whitespace
      fbdev/amifb: Fix double free
      fbdev/amifb: Reorder functions to remove forward declarations
      fbdev/amifb: Make amifb_setup() static
      fbdev/amifb: Remove superfluous casts when assigning void *
      fbdev/amifb: Store monitor limits in separate __initdata variables
      fbdev/amifb: Enable Copper DMA after setting up the Copper
      fbdev/amifb: Use framebuffer_alloc()

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

Jingoo Han (6):
      video: s3c-fb: fix transparency length for pixel blending
      video: s3c2410: fix checkpatch error and warnings
      video: s3c-fb: set missing bitmask of enabled hardware window
      video: s3c-fb: modify runtime pm functions
      video: s3c-fb: add shadow register protect
      MAINTAINERS: add a maintainer for Samsung Framebuffer driver

Kuninori Morimoto (15):
      fbdev: sh_mobile_lcdcfb: fixup LDHAJR :: HSYNPAJ needs mask
      fbdev: sh_mipi_dsi: tidyup dsip_clk
      fbdev: sh_mipi_dsi: typo fix of SH_MIPI_DSI_HBPBM
      fbdev: sh_mipi_dsi: tidyup VMCTR2 parameter expression
      fbdev: sh_mipi_dsi: add SH_MIPI_DSI_HFPBM flag
      fbdev: sh_mipi_dsi: add SH_MIPI_DSI_BL2E flag
      fbdev: sh_mipi_dsi: add lane control support
      fbdev: sh_mipi_dsi: add sync_pulses/sync_events/burst mode
      fbdev: sh_mipi_dsi: add VMLEN1/VMLEN2 calculation
      fbdev: sh_mipi_dsi: add set_dot_clock() for each platform
      fbdev: sh_mipi_dsi: add HSxxCLK support
      fbdev: sh_mipi_dsi: sh_mipi has pdata instead of dev
      fbdev: sh_mipi_dsi: fixup setup timing of sh_mipi_setup()
      fbdev: sh_mipi_dsi: fixup setup timing of SYSCONF
      fbdev: sh_mipi_dsi: fixup setup timing DSICTRL

Lars-Peter Clausen (1):
      video: Remove redundant spi driver bus initialization

Laurent Pinchart (4):
      fbdev: Add FOURCC-based format configuration API
      v4l: Add V4L2_PIX_FMT_NV24 and V4L2_PIX_FMT_NV42 formats
      fbdev: sh_mobile_lcdc: Support FOURCC-based format API
      fbdev: matroxfb: Fix compilation after fb_var_screeninfo change

Marek Vasut (1):
      MXSFB: Fix driver registration

Mark Brown (7):
      video: s3c-fb: Unify runtime and system PM functions
      video: s3c-fb: Make runtime PM functional again
      video: s3c-fb: Use s3c_fb_enable() to enable the framebuffer
      video: s3c-fb: Disable runtime PM in error paths from probe
      video: s3c-fb: Take a runtime PM reference when unblanked
      video: s3c-fb: Hold runtime PM references when touching registers
      video: s3c-fb: Don't keep device runtime active when open

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

Ondrej Zary (1):
      s3fb: fix Virge/VX

Peter Korsgaard (1):
      atmel_lcdfb: support new-style palette format

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

Rusty Russell (2):
      i810: fix module_param bool abuse.
      module_param: make bool parameters really bool (drivers/video/i810)

Sam Ravnborg (1):
      grvga: fix section mismatch warnings

Timur Tabi (7):
      drivers/video: fsl-diu-fb: merge all allocated data into one block
      drivers/video: fsl-diu-fb: rename "machine_data" to "data"
      drivers/video: fsl-diu-fb: merge init_fbinfo() into install_fb()
      drivers/video: fsl-diu-fb: set correct framebuffer flags
      drivers/video: fsl-diu-fb: remove broken reference count enabling the display
      drivers/video: fsl-diu-fb: add default platform ops functions
      drivers/video: fsl-diu-fb: merge fsl_diu_alloc() into map_video_memory()

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

Zac Storer (2):
      Drivers: video: controlfb: fixed a brace coding style issue
      Drivers: video: sbuslib: fixed a brace coding style issue

 Documentation/DocBook/media/v4l/pixfmt-nv24.xml    |  121 +
 Documentation/DocBook/media/v4l/pixfmt.xml         |    1 +
 Documentation/fb/api.txt                           |  306 ++
 MAINTAINERS                                        |    6 +
 arch/arm/mach-omap2/board-4430sdp.c                |   23 +-
 arch/arm/mach-omap2/board-omap4panda.c             |   25 +-
 arch/arm/mach-omap2/display.c                      |   39 +
 arch/arm/mach-shmobile/board-ag5evm.c              |   43 +-
 arch/arm/mach-shmobile/board-ap4evb.c              |   32 +-
 arch/arm/mach-shmobile/board-mackerel.c            |    4 +-
 arch/arm/mach-shmobile/clock-sh7372.c              |    4 +-
 arch/arm/mach-shmobile/clock-sh73a0.c              |    4 +-
 arch/sh/boards/mach-ap325rxa/setup.c               |    2 +-
 arch/sh/boards/mach-ecovec24/setup.c               |    2 +-
 arch/sh/boards/mach-kfr2r09/setup.c                |    2 +-
 arch/sh/boards/mach-migor/setup.c                  |    4 +-
 arch/sh/boards/mach-se/7724/setup.c                |    2 +-
 drivers/media/video/omap/omap_vout.c               |   33 +-
 drivers/video/Kconfig                              |    1 -
 drivers/video/Makefile                             |    2 +-
 drivers/video/amifb.c                              | 5012 ++++++++++----------
 drivers/video/atmel_lcdfb.c                        |   37 +-
 drivers/video/cirrusfb.c                           |  266 +-
 drivers/video/controlfb.c                          |    2 +-
 drivers/video/display/Kconfig                      |   24 -
 drivers/video/display/Makefile                     |    6 -
 drivers/video/display/display-sysfs.c              |  219 -
 drivers/video/fbmem.c                              |   14 +
 drivers/video/fsl-diu-fb.c                         |  587 ++--
 drivers/video/grvga.c                              |    4 +-
 drivers/video/i810/i810_main.c                     |   16 +-
 drivers/video/matrox/matroxfb_base.c               |    1 -
 drivers/video/matrox/matroxfb_crtc2.c              |    1 -
 drivers/video/mbx/mbxfb.c                          |   13 +-
 drivers/video/mxsfb.c                              |   13 +-
 drivers/video/nuc900fb.c                           |   13 +-
 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_mipid.c                     |    1 -
 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-acx565akm.c     |    1 -
 drivers/video/omap2/displays/panel-generic-dpi.c   |   66 +
 drivers/video/omap2/displays/panel-n8x0.c          |    1 -
 .../omap2/displays/panel-nec-nl8048hl11-01b.c      |   62 +-
 drivers/video/omap2/displays/panel-taal.c          |   38 +-
 .../video/omap2/displays/panel-tpo-td043mtea1.c    |    1 -
 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 +-
 drivers/video/pnx4008/pnxrgbfb.c                   |   13 +-
 drivers/video/pnx4008/sdum.c                       |   13 +-
 drivers/video/pxa168fb.c                           |   12 +-
 drivers/video/pxa3xx-gcu.c                         |   15 +-
 drivers/video/s3c-fb.c                             |  202 +-
 drivers/video/s3c2410fb.c                          |   29 +-
 drivers/video/s3fb.c                               |   30 +-
 drivers/video/sbuslib.c                            |    2 +-
 drivers/video/sh7760fb.c                           |   13 +-
 drivers/video/sh_mipi_dsi.c                        |  218 +-
 drivers/video/sh_mobile_lcdcfb.c                   |  375 +-
 drivers/video/sh_mobile_meram.c                    |   13 +-
 drivers/video/sm501fb.c                            |   13 +-
 drivers/video/vt8500lcdfb.c                        |   13 +
 drivers/video/w100fb.c                             |   13 +-
 drivers/video/wm8505fb.c                           |   13 +-
 drivers/video/wmt_ge_rops.c                        |   13 +-
 drivers/video/xilinxfb.c                           |   20 +-
 include/linux/display.h                            |   61 -
 include/linux/fb.h                                 |   14 +-
 include/linux/videodev2.h                          |    2 +
 include/linux/zorro_ids.h                          |    4 +-
 include/video/omapdss.h                            |   58 +-
 include/video/sh_mipi_dsi.h                        |   21 +-
 include/video/sh_mobile_lcdc.h                     |    4 +-
 102 files changed, 6924 insertions(+), 6108 deletions(-)
 create mode 100644 Documentation/DocBook/media/v4l/pixfmt-nv24.xml
 create mode 100644 Documentation/fb/api.txt
 delete mode 100644 drivers/video/display/Kconfig
 delete mode 100644 drivers/video/display/Makefile
 delete mode 100644 drivers/video/display/display-sysfs.c
 create mode 100644 drivers/video/omap2/dss/apply.c
 create mode 100644 drivers/video/omap2/dss/dispc_coefs.c
 delete mode 100644 include/linux/display.h

^ permalink raw reply

* [PATCH 6/6] OMAPDSS: DISPC: Add naive threshold calc for fifomerge
From: Tomi Valkeinen @ 2012-01-13 11:46 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, rob, Tomi Valkeinen
In-Reply-To: <1326455193-19716-1-git-send-email-tomi.valkeinen@ti.com>

Take fifo merge into use by implementing a rather naive fifo merge
threshold calculation: keep the low threshold always the same, but
increase the high threshold when fifo merge is used.

This should greatly increase the time between pixel data fetches from
SDRAM, as the usable fifo size is much larger. However, it probably
won't help for fifo underflows, as the low threshols is kept the same.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dispc.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index a759722..6451321 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1077,8 +1077,24 @@ void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane,
 	burst_size = dispc_ovl_get_burst_size(plane);
 	fifo_size = dispc_ovl_get_fifo_size(plane);
 
+	/*
+	 * We use the same low threshold for both fifomerge and non-fifomerge
+	 * cases, but for fifomerge we calculate the high threshold using the
+	 * combined fifo size
+	 */
 	*fifo_low = fifo_size - burst_size;
-	*fifo_high = fifo_size - buf_unit;
+
+	if (use_fifomerge) {
+		int i;
+
+		fifo_size = 0;
+		for (i = 0; i < omap_dss_get_num_overlays(); ++i)
+			fifo_size += dispc_ovl_get_fifo_size(i);
+
+		*fifo_high = fifo_size - buf_unit;
+	} else {
+		*fifo_high = fifo_size - buf_unit;
+	}
 }
 
 static void dispc_ovl_set_fir(enum omap_plane plane,
-- 
1.7.4.1


^ permalink raw reply related

* [PATCH 5/6] OMAPDSS: DISPC: move fifo threhold calc to dispc.c
From: Tomi Valkeinen @ 2012-01-13 11:46 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, rob, Tomi Valkeinen
In-Reply-To: <1326455193-19716-1-git-send-email-tomi.valkeinen@ti.com>

Move fifo threshold calculation into dispc.c, as the thresholds are
really dispc internal thing.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/apply.c   |   34 ++--------------------------------
 drivers/video/omap2/dss/dispc.c   |   22 ++++++++++++++++++++--
 drivers/video/omap2/dss/display.c |   10 ----------
 drivers/video/omap2/dss/dsi.c     |    8 --------
 drivers/video/omap2/dss/dss.h     |   10 ++--------
 5 files changed, 24 insertions(+), 60 deletions(-)

diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index 6f7b213..b0264a1 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -907,7 +907,6 @@ static void dss_ovl_setup_fifo(struct omap_overlay *ovl,
 {
 	struct ovl_priv_data *op = get_ovl_priv(ovl);
 	struct omap_dss_device *dssdev;
-	u32 size, burst_size;
 	u32 fifo_low, fifo_high;
 
 	if (!op->enabled && !op->enabling)
@@ -915,37 +914,8 @@ static void dss_ovl_setup_fifo(struct omap_overlay *ovl,
 
 	dssdev = ovl->manager->device;
 
-	if (use_fifo_merge) {
-		int i;
-
-		size = 0;
-
-		for (i = 0; i < omap_dss_get_num_overlays(); ++i)
-			size += dispc_ovl_get_fifo_size(i);
-	} else {
-		size = dispc_ovl_get_fifo_size(ovl->id);
-	}
-
-	burst_size = dispc_ovl_get_burst_size(ovl->id);
-
-	switch (dssdev->type) {
-	case OMAP_DISPLAY_TYPE_DPI:
-	case OMAP_DISPLAY_TYPE_DBI:
-	case OMAP_DISPLAY_TYPE_SDI:
-	case OMAP_DISPLAY_TYPE_VENC:
-	case OMAP_DISPLAY_TYPE_HDMI:
-		default_get_overlay_fifo_thresholds(ovl->id, size,
-				burst_size, &fifo_low, &fifo_high);
-		break;
-#ifdef CONFIG_OMAP2_DSS_DSI
-	case OMAP_DISPLAY_TYPE_DSI:
-		dsi_get_overlay_fifo_thresholds(ovl->id, size,
-				burst_size, &fifo_low, &fifo_high);
-		break;
-#endif
-	default:
-		BUG();
-	}
+	dispc_ovl_compute_fifo_thresholds(ovl->id, &fifo_low, &fifo_high,
+			use_fifo_merge);
 
 	dss_apply_ovl_fifo_thresholds(ovl, fifo_low, fifo_high);
 }
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index ba907bd..a759722 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -909,7 +909,7 @@ static void dispc_configure_burst_sizes(void)
 		dispc_ovl_set_burst_size(i, burst_size);
 }
 
-u32 dispc_ovl_get_burst_size(enum omap_plane plane)
+static u32 dispc_ovl_get_burst_size(enum omap_plane plane)
 {
 	unsigned unit = dss_feat_get_burst_size_unit();
 	/* burst multiplier is always x8 (see dispc_configure_burst_sizes()) */
@@ -1018,7 +1018,7 @@ static void dispc_read_plane_fifo_sizes(void)
 	}
 }
 
-u32 dispc_ovl_get_fifo_size(enum omap_plane plane)
+static u32 dispc_ovl_get_fifo_size(enum omap_plane plane)
 {
 	return dispc.fifo_size[plane];
 }
@@ -1063,6 +1063,24 @@ void dispc_enable_fifomerge(bool enable)
 	REG_FLD_MOD(DISPC_CONFIG, enable ? 1 : 0, 14, 14);
 }
 
+void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane,
+		u32 *fifo_low, u32 *fifo_high, bool use_fifomerge)
+{
+	/*
+	 * All sizes are in bytes. Both the buffer and burst are made of
+	 * buffer_units, and the fifo thresholds must be buffer_unit aligned.
+	 */
+
+	unsigned buf_unit = dss_feat_get_buffer_size_unit();
+	unsigned fifo_size, burst_size;
+
+	burst_size = dispc_ovl_get_burst_size(plane);
+	fifo_size = dispc_ovl_get_fifo_size(plane);
+
+	*fifo_low = fifo_size - burst_size;
+	*fifo_high = fifo_size - buf_unit;
+}
+
 static void dispc_ovl_set_fir(enum omap_plane plane,
 				int hinc, int vinc,
 				enum omap_color_component color_comp)
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index be331dc..4424c19 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -279,16 +279,6 @@ void omapdss_default_get_resolution(struct omap_dss_device *dssdev,
 }
 EXPORT_SYMBOL(omapdss_default_get_resolution);
 
-void default_get_overlay_fifo_thresholds(enum omap_plane plane,
-		u32 fifo_size, u32 burst_size,
-		u32 *fifo_low, u32 *fifo_high)
-{
-	unsigned buf_unit = dss_feat_get_buffer_size_unit();
-
-	*fifo_high = fifo_size - buf_unit;
-	*fifo_low = fifo_size - burst_size;
-}
-
 int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev)
 {
 	switch (dssdev->type) {
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 511ae2a..1cbb7a5 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -4524,14 +4524,6 @@ int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable)
 }
 EXPORT_SYMBOL(omapdss_dsi_enable_te);
 
-void dsi_get_overlay_fifo_thresholds(enum omap_plane plane,
-		u32 fifo_size, u32 burst_size,
-		u32 *fifo_low, u32 *fifo_high)
-{
-	*fifo_high = fifo_size - burst_size;
-	*fifo_low = fifo_size - burst_size * 2;
-}
-
 int dsi_init_display(struct omap_dss_device *dssdev)
 {
 	struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 3cf99a9..f2378a8 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -202,9 +202,6 @@ void dss_uninit_device(struct platform_device *pdev,
 		struct omap_dss_device *dssdev);
 bool dss_use_replication(struct omap_dss_device *dssdev,
 		enum omap_color_mode mode);
-void default_get_overlay_fifo_thresholds(enum omap_plane plane,
-		u32 fifo_size, u32 burst_size,
-		u32 *fifo_low, u32 *fifo_high);
 
 /* manager */
 int dss_init_overlay_managers(struct platform_device *pdev);
@@ -313,9 +310,6 @@ int dsi_pll_calc_clock_div_pck(struct platform_device *dsidev, bool is_tft,
 int dsi_pll_init(struct platform_device *dsidev, bool enable_hsclk,
 		bool enable_hsdiv);
 void dsi_pll_uninit(struct platform_device *dsidev, bool disconnect_lanes);
-void dsi_get_overlay_fifo_thresholds(enum omap_plane plane,
-		u32 fifo_size, u32 burst_size,
-		u32 *fifo_low, u32 *fifo_high);
 void dsi_wait_pll_hsdiv_dispc_active(struct platform_device *dsidev);
 void dsi_wait_pll_hsdiv_dsi_active(struct platform_device *dsidev);
 struct platform_device *dsi_get_dsidev_from_id(int module);
@@ -429,8 +423,8 @@ int dispc_calc_clock_rates(unsigned long dispc_fclk_rate,
 
 
 void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high);
-u32 dispc_ovl_get_fifo_size(enum omap_plane plane);
-u32 dispc_ovl_get_burst_size(enum omap_plane plane);
+void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane,
+		u32 *fifo_low, u32 *fifo_high, bool use_fifomerge);
 int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
 		bool ilace, bool replication);
 int dispc_ovl_enable(enum omap_plane plane, bool enable);
-- 
1.7.4.1


^ permalink raw reply related

* [PATCH 4/6] OMAPDSS: DISPC: print fifo threshold values in bytes
From: Tomi Valkeinen @ 2012-01-13 11:46 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, rob, Tomi Valkeinen
In-Reply-To: <1326455193-19716-1-git-send-email-tomi.valkeinen@ti.com>

Fifo thresholds are calculated using bytes, but the debug print prints
values in buffer units. Change the prints to use bytes to be in line
with the calculations, and also to print in the same units on all OMAPs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dispc.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index d711518..ba907bd 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1039,13 +1039,13 @@ void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high)
 	dss_feat_get_reg_field(FEAT_REG_FIFOHIGHTHRESHOLD, &hi_start, &hi_end);
 	dss_feat_get_reg_field(FEAT_REG_FIFOLOWTHRESHOLD, &lo_start, &lo_end);
 
-	DSSDBG("fifo(%d) low/high old %u/%u, new %u/%u\n",
+	DSSDBG("fifo(%d) threshold (bytes), old %u/%u, new %u/%u\n",
 			plane,
 			REG_GET(DISPC_OVL_FIFO_THRESHOLD(plane),
-				lo_start, lo_end),
+				lo_start, lo_end) * unit,
 			REG_GET(DISPC_OVL_FIFO_THRESHOLD(plane),
-				hi_start, hi_end),
-			low, high);
+				hi_start, hi_end) * unit,
+			low * unit, high * unit);
 
 	dispc_write_reg(DISPC_OVL_FIFO_THRESHOLD(plane),
 			FLD_VAL(high, hi_start, hi_end) |
-- 
1.7.4.1


^ permalink raw reply related

* [PATCH 3/6] OMAPDSS: APPLY: add fifo-merge support
From: Tomi Valkeinen @ 2012-01-13 11:46 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, rob, Tomi Valkeinen
In-Reply-To: <1326455193-19716-1-git-send-email-tomi.valkeinen@ti.com>

Add fifo-merge support. This is done mainly in four functions:
mgr_enable/disable and ovl_enable/disable. These are the functions where
overlays are taken into and out of active use.

The process to enable and disable fifo-merge is not simple. We need to
do it in steps, waiting in between for certain settings to be taken into
use, and continuing after that. The reason for this is that fifo-merge
is a common thing for all managers/overlays, and its use must be
synchronized.

As an example, when we disable an overlay, we first set the overlay as
disabled, then wait until the overlay is actually disabled in the HW,
and only after that we may re-configure the fifos, possibly taking
fifo-merge into use.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/apply.c |  164 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 156 insertions(+), 8 deletions(-)

diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index 604737f..6f7b213 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -902,7 +902,8 @@ static void dss_apply_fifo_merge(bool use_fifo_merge)
 	dss_data.fifo_merge_dirty = true;
 }
 
-static void dss_ovl_setup_fifo(struct omap_overlay *ovl)
+static void dss_ovl_setup_fifo(struct omap_overlay *ovl,
+		bool use_fifo_merge)
 {
 	struct ovl_priv_data *op = get_ovl_priv(ovl);
 	struct omap_dss_device *dssdev;
@@ -914,7 +915,16 @@ static void dss_ovl_setup_fifo(struct omap_overlay *ovl)
 
 	dssdev = ovl->manager->device;
 
-	size = dispc_ovl_get_fifo_size(ovl->id);
+	if (use_fifo_merge) {
+		int i;
+
+		size = 0;
+
+		for (i = 0; i < omap_dss_get_num_overlays(); ++i)
+			size += dispc_ovl_get_fifo_size(i);
+	} else {
+		size = dispc_ovl_get_fifo_size(ovl->id);
+	}
 
 	burst_size = dispc_ovl_get_burst_size(ovl->id);
 
@@ -940,7 +950,8 @@ static void dss_ovl_setup_fifo(struct omap_overlay *ovl)
 	dss_apply_ovl_fifo_thresholds(ovl, fifo_low, fifo_high);
 }
 
-static void dss_mgr_setup_fifos(struct omap_overlay_manager *mgr)
+static void dss_mgr_setup_fifos(struct omap_overlay_manager *mgr,
+		bool use_fifo_merge)
 {
 	struct omap_overlay *ovl;
 	struct mgr_priv_data *mp;
@@ -951,10 +962,10 @@ static void dss_mgr_setup_fifos(struct omap_overlay_manager *mgr)
 		return;
 
 	list_for_each_entry(ovl, &mgr->overlays, list)
-		dss_ovl_setup_fifo(ovl);
+		dss_ovl_setup_fifo(ovl, use_fifo_merge);
 }
 
-static void dss_setup_fifos(void)
+static void dss_setup_fifos(bool use_fifo_merge)
 {
 	const int num_mgrs = omap_dss_get_num_overlay_managers();
 	struct omap_overlay_manager *mgr;
@@ -962,15 +973,91 @@ static void dss_setup_fifos(void)
 
 	for (i = 0; i < num_mgrs; ++i) {
 		mgr = omap_dss_get_overlay_manager(i);
-		dss_mgr_setup_fifos(mgr);
+		dss_mgr_setup_fifos(mgr, use_fifo_merge);
 	}
 }
 
+static int get_num_used_managers(void)
+{
+	const int num_mgrs = omap_dss_get_num_overlay_managers();
+	struct omap_overlay_manager *mgr;
+	struct mgr_priv_data *mp;
+	int i;
+	int enabled_mgrs;
+
+	enabled_mgrs = 0;
+
+	for (i = 0; i < num_mgrs; ++i) {
+		mgr = omap_dss_get_overlay_manager(i);
+		mp = get_mgr_priv(mgr);
+
+		if (!mp->enabled)
+			continue;
+
+		enabled_mgrs++;
+	}
+
+	return enabled_mgrs;
+}
+
+static int get_num_used_overlays(void)
+{
+	const int num_ovls = omap_dss_get_num_overlays();
+	struct omap_overlay *ovl;
+	struct ovl_priv_data *op;
+	struct mgr_priv_data *mp;
+	int i;
+	int enabled_ovls;
+
+	enabled_ovls = 0;
+
+	for (i = 0; i < num_ovls; ++i) {
+		ovl = omap_dss_get_overlay(i);
+		op = get_ovl_priv(ovl);
+
+		if (!op->enabled && !op->enabling)
+			continue;
+
+		mp = get_mgr_priv(ovl->manager);
+
+		if (!mp->enabled)
+			continue;
+
+		enabled_ovls++;
+	}
+
+	return enabled_ovls;
+}
+
+static bool get_use_fifo_merge(void)
+{
+	int enabled_mgrs = get_num_used_managers();
+	int enabled_ovls = get_num_used_overlays();
+
+	if (!dss_has_feature(FEAT_FIFO_MERGE))
+		return false;
+
+	/*
+	 * In theory the only requirement for fifomerge is enabled_ovls <= 1.
+	 * However, if we have two managers enabled and set/unset the fifomerge,
+	 * we need to set the GO bits in particular sequence for the managers,
+	 * and wait in between.
+	 *
+	 * This is rather difficult as new apply calls can happen at any time,
+	 * so we simplify the problem by requiring also that enabled_mgrs <= 1.
+	 * In practice this shouldn't matter, because when only one overlay is
+	 * enabled, most likely only one output is enabled.
+	 */
+
+	return enabled_mgrs <= 1 && enabled_ovls <= 1;
+}
+
 int dss_mgr_enable(struct omap_overlay_manager *mgr)
 {
 	struct mgr_priv_data *mp = get_mgr_priv(mgr);
 	unsigned long flags;
 	int r;
+	bool fifo_merge;
 
 	mutex_lock(&apply_lock);
 
@@ -988,11 +1075,23 @@ int dss_mgr_enable(struct omap_overlay_manager *mgr)
 		goto err;
 	}
 
-	dss_setup_fifos();
+	/* step 1: setup fifos/fifomerge before enabling the manager */
+
+	fifo_merge = get_use_fifo_merge();
+	dss_setup_fifos(fifo_merge);
+	dss_apply_fifo_merge(fifo_merge);
 
 	dss_write_regs();
 	dss_set_go_bits();
 
+	spin_unlock_irqrestore(&data_lock, flags);
+
+	/* wait until fifo config is in */
+	wait_pending_extra_info_updates();
+
+	/* step 2: enable the manager */
+	spin_lock_irqsave(&data_lock, flags);
+
 	if (!mgr_manual_update(mgr))
 		mp->updating = true;
 
@@ -1017,6 +1116,7 @@ void dss_mgr_disable(struct omap_overlay_manager *mgr)
 {
 	struct mgr_priv_data *mp = get_mgr_priv(mgr);
 	unsigned long flags;
+	bool fifo_merge;
 
 	mutex_lock(&apply_lock);
 
@@ -1031,8 +1131,16 @@ void dss_mgr_disable(struct omap_overlay_manager *mgr)
 	mp->updating = false;
 	mp->enabled = false;
 
+	fifo_merge = get_use_fifo_merge();
+	dss_setup_fifos(fifo_merge);
+	dss_apply_fifo_merge(fifo_merge);
+
+	dss_write_regs();
+	dss_set_go_bits();
+
 	spin_unlock_irqrestore(&data_lock, flags);
 
+	wait_pending_extra_info_updates();
 out:
 	mutex_unlock(&apply_lock);
 }
@@ -1284,6 +1392,7 @@ int dss_ovl_enable(struct omap_overlay *ovl)
 {
 	struct ovl_priv_data *op = get_ovl_priv(ovl);
 	unsigned long flags;
+	bool fifo_merge;
 	int r;
 
 	mutex_lock(&apply_lock);
@@ -1309,7 +1418,22 @@ int dss_ovl_enable(struct omap_overlay *ovl)
 		goto err2;
 	}
 
-	dss_setup_fifos();
+	/* step 1: configure fifos/fifomerge for currently enabled ovls */
+
+	fifo_merge = get_use_fifo_merge();
+	dss_setup_fifos(fifo_merge);
+	dss_apply_fifo_merge(fifo_merge);
+
+	dss_write_regs();
+	dss_set_go_bits();
+
+	spin_unlock_irqrestore(&data_lock, flags);
+
+	/* wait for fifo configs to go in */
+	wait_pending_extra_info_updates();
+
+	/* step 2: enable the overlay */
+	spin_lock_irqsave(&data_lock, flags);
 
 	op->enabling = false;
 	dss_apply_ovl_enable(ovl, true);
@@ -1319,6 +1443,9 @@ int dss_ovl_enable(struct omap_overlay *ovl)
 
 	spin_unlock_irqrestore(&data_lock, flags);
 
+	/* wait for overlay to be enabled */
+	wait_pending_extra_info_updates();
+
 	mutex_unlock(&apply_lock);
 
 	return 0;
@@ -1334,6 +1461,7 @@ int dss_ovl_disable(struct omap_overlay *ovl)
 {
 	struct ovl_priv_data *op = get_ovl_priv(ovl);
 	unsigned long flags;
+	bool fifo_merge;
 	int r;
 
 	mutex_lock(&apply_lock);
@@ -1348,14 +1476,34 @@ int dss_ovl_disable(struct omap_overlay *ovl)
 		goto err;
 	}
 
+	/* step 1: disable the overlay */
 	spin_lock_irqsave(&data_lock, flags);
 
 	dss_apply_ovl_enable(ovl, false);
+
 	dss_write_regs();
 	dss_set_go_bits();
 
 	spin_unlock_irqrestore(&data_lock, flags);
 
+	/* wait for the overlay to be disabled */
+	wait_pending_extra_info_updates();
+
+	/* step 2: configure fifos/fifomerge */
+	spin_lock_irqsave(&data_lock, flags);
+
+	fifo_merge = get_use_fifo_merge();
+	dss_setup_fifos(fifo_merge);
+	dss_apply_fifo_merge(fifo_merge);
+
+	dss_write_regs();
+	dss_set_go_bits();
+
+	spin_unlock_irqrestore(&data_lock, flags);
+
+	/* wait for fifo config to go in */
+	wait_pending_extra_info_updates();
+
 	mutex_unlock(&apply_lock);
 
 	return 0;
-- 
1.7.4.1


^ permalink raw reply related

* [PATCH 2/6] OMAPDSS: APPLY: add fifo merge support funcs
From: Tomi Valkeinen @ 2012-01-13 11:46 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, rob, Tomi Valkeinen
In-Reply-To: <1326455193-19716-1-git-send-email-tomi.valkeinen@ti.com>

Add mechanism to set/unset the DISPC fifo-merge:

Add new fields to dss_data, fifo_merge and fifo_merge_dirty. These are
similar to the other info/dirty flags in ovl_priv_data and ovl_mgr_data,
but fifo merge is a common attribute to all managers and thus outside
the ovl_mgr_data.

The fifo-merge field is used in the dss_write_regs_common, which handles
writing the register.

dss_apply_fifo_merge() can be used to set/unset the fifo merge field in
the dss_data.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/apply.c |   43 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index 052dc87..604737f 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -105,6 +105,9 @@ static struct {
 	struct ovl_priv_data ovl_priv_data_array[MAX_DSS_OVERLAYS];
 	struct mgr_priv_data mgr_priv_data_array[MAX_DSS_MANAGERS];
 
+	bool fifo_merge_dirty;
+	bool fifo_merge;
+
 	bool irq_enabled;
 } dss_data;
 
@@ -585,11 +588,40 @@ static void dss_mgr_write_regs(struct omap_overlay_manager *mgr)
 	}
 }
 
+static void dss_write_regs_common(void)
+{
+	const int num_mgrs = omap_dss_get_num_overlay_managers();
+	int i;
+
+	if (!dss_data.fifo_merge_dirty)
+		return;
+
+	for (i = 0; i < num_mgrs; ++i) {
+		struct omap_overlay_manager *mgr;
+		struct mgr_priv_data *mp;
+
+		mgr = omap_dss_get_overlay_manager(i);
+		mp = get_mgr_priv(mgr);
+
+		if (mp->enabled) {
+			if (dss_data.fifo_merge_dirty) {
+				dispc_enable_fifomerge(dss_data.fifo_merge);
+				dss_data.fifo_merge_dirty = false;
+			}
+
+			if (mp->updating)
+				mp->shadow_info_dirty = true;
+		}
+	}
+}
+
 static void dss_write_regs(void)
 {
 	const int num_mgrs = omap_dss_get_num_overlay_managers();
 	int i;
 
+	dss_write_regs_common();
+
 	for (i = 0; i < num_mgrs; ++i) {
 		struct omap_overlay_manager *mgr;
 		struct mgr_priv_data *mp;
@@ -659,6 +691,8 @@ void dss_mgr_start_update(struct omap_overlay_manager *mgr)
 
 	dss_mgr_write_regs(mgr);
 
+	dss_write_regs_common();
+
 	mp->updating = true;
 
 	if (!dss_data.irq_enabled && need_isr())
@@ -859,6 +893,15 @@ static void dss_apply_ovl_fifo_thresholds(struct omap_overlay *ovl,
 	op->extra_info_dirty = true;
 }
 
+static void dss_apply_fifo_merge(bool use_fifo_merge)
+{
+	if (dss_data.fifo_merge = use_fifo_merge)
+		return;
+
+	dss_data.fifo_merge = use_fifo_merge;
+	dss_data.fifo_merge_dirty = true;
+}
+
 static void dss_ovl_setup_fifo(struct omap_overlay *ovl)
 {
 	struct ovl_priv_data *op = get_ovl_priv(ovl);
-- 
1.7.4.1


^ permalink raw reply related

* [PATCH 1/6] OMAPDSS: FEAT: Add FIFO_MERGE feature
From: Tomi Valkeinen @ 2012-01-13 11:46 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, rob, Tomi Valkeinen
In-Reply-To: <1326455193-19716-1-git-send-email-tomi.valkeinen@ti.com>

Add feature flag for fifo merge. OMAP2 doesn't contain fifo merge, later
OMAPs do.

dispc_enable_fifomerge() checks for the flag when called, and gives a
WARN if fifo merge is being enabled when it is not supported.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dispc.c        |    5 +++++
 drivers/video/omap2/dss/dss_features.c |    9 +++++----
 drivers/video/omap2/dss/dss_features.h |    1 +
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index a5ec7f3..d711518 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1054,6 +1054,11 @@ void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high)
 
 void dispc_enable_fifomerge(bool enable)
 {
+	if (!dss_has_feature(FEAT_FIFO_MERGE)) {
+		WARN_ON(enable);
+		return;
+	}
+
 	DSSDBG("FIFO merge %s\n", enable ? "enabled" : "disabled");
 	REG_FLD_MOD(DISPC_CONFIG, enable ? 1 : 0, 14, 14);
 }
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index afcb593..c2456c5 100644
--- a/drivers/video/omap2/dss/dss_features.c
+++ b/drivers/video/omap2/dss/dss_features.c
@@ -370,7 +370,7 @@ static const struct omap_dss_features omap3430_dss_features = {
 		FEAT_LINEBUFFERSPLIT | FEAT_RESIZECONF |
 		FEAT_DSI_PLL_FREQSEL | FEAT_DSI_REVERSE_TXCLKESC |
 		FEAT_VENC_REQUIRES_TV_DAC_CLK | FEAT_CPR | FEAT_PRELOAD |
-		FEAT_FIR_COEF_V | FEAT_ALPHA_FIXED_ZORDER,
+		FEAT_FIR_COEF_V | FEAT_ALPHA_FIXED_ZORDER | FEAT_FIFO_MERGE,
 
 	.num_mgrs = 2,
 	.num_ovls = 3,
@@ -394,7 +394,7 @@ static const struct omap_dss_features omap3630_dss_features = {
 		FEAT_ROWREPEATENABLE | FEAT_LINEBUFFERSPLIT |
 		FEAT_RESIZECONF | FEAT_DSI_PLL_PWR_BUG |
 		FEAT_DSI_PLL_FREQSEL | FEAT_CPR | FEAT_PRELOAD |
-		FEAT_FIR_COEF_V | FEAT_ALPHA_FIXED_ZORDER,
+		FEAT_FIR_COEF_V | FEAT_ALPHA_FIXED_ZORDER | FEAT_FIFO_MERGE,
 
 	.num_mgrs = 2,
 	.num_ovls = 3,
@@ -419,7 +419,7 @@ static const struct omap_dss_features omap4430_es1_0_dss_features  = {
 		FEAT_DSI_DCS_CMD_CONFIG_VC | FEAT_DSI_VC_OCP_WIDTH |
 		FEAT_DSI_GNQ | FEAT_HANDLE_UV_SEPARATE | FEAT_ATTR2 |
 		FEAT_CPR | FEAT_PRELOAD | FEAT_FIR_COEF_V |
-		FEAT_ALPHA_FREE_ZORDER,
+		FEAT_ALPHA_FREE_ZORDER | FEAT_FIFO_MERGE,
 
 	.num_mgrs = 3,
 	.num_ovls = 4,
@@ -443,7 +443,8 @@ static const struct omap_dss_features omap4_dss_features = {
 		FEAT_DSI_DCS_CMD_CONFIG_VC | FEAT_DSI_VC_OCP_WIDTH |
 		FEAT_DSI_GNQ | FEAT_HDMI_CTS_SWMODE |
 		FEAT_HANDLE_UV_SEPARATE | FEAT_ATTR2 | FEAT_CPR |
-		FEAT_PRELOAD | FEAT_FIR_COEF_V | FEAT_ALPHA_FREE_ZORDER,
+		FEAT_PRELOAD | FEAT_FIR_COEF_V | FEAT_ALPHA_FREE_ZORDER |
+		FEAT_FIFO_MERGE,
 
 	.num_mgrs = 3,
 	.num_ovls = 4,
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h
index cd833bb..50caee9 100644
--- a/drivers/video/omap2/dss/dss_features.h
+++ b/drivers/video/omap2/dss/dss_features.h
@@ -58,6 +58,7 @@ enum dss_feat_id {
 	FEAT_FIR_COEF_V			= 1 << 25,
 	FEAT_ALPHA_FIXED_ZORDER		= 1 << 26,
 	FEAT_ALPHA_FREE_ZORDER		= 1 << 27,
+	FEAT_FIFO_MERGE			= 1 << 28,
 };
 
 /* DSS register field id */
-- 
1.7.4.1


^ permalink raw reply related

* [PATCH 0/6] OMAPDSS: naive fifomerge support
From: Tomi Valkeinen @ 2012-01-13 11:46 UTC (permalink / raw)
  To: linux-omap, linux-fbdev; +Cc: archit, rob, Tomi Valkeinen

This patch set implements fifomerge and a naive version for fifo threshold
calculation when fifomerge is in use. The strategy is simple: keep the low
threshold the same for both fifomerge and non-fifomerge cases, but calculate
the high threshold using the combined fifo size when fifomerge is in use.

This should give some power savings, as the usable fifo size is much larger
when only one overlay is in use. It probably won't help fifo underflow cases,
as the low threshold is kept the same.

Tested on OMAP4 Blaze (DSI cmd mode) and OMAP3 Overo (DPI).

 Tomi

Tomi Valkeinen (6):
  OMAPDSS: FEAT: Add FIFO_MERGE feature
  OMAPDSS: APPLY: add fifo merge support funcs
  OMAPDSS: APPLY: add fifo-merge support
  OMAPDSS: DISPC: print fifo threshold values in bytes
  OMAPDSS: DISPC: move fifo threhold calc to dispc.c
  OMAPDSS: DISPC: Add naive threshold calc for fifomerge

 drivers/video/omap2/dss/apply.c        |  221 +++++++++++++++++++++++++++-----
 drivers/video/omap2/dss/dispc.c        |   51 +++++++-
 drivers/video/omap2/dss/display.c      |   10 --
 drivers/video/omap2/dss/dsi.c          |    8 -
 drivers/video/omap2/dss/dss.h          |   10 +-
 drivers/video/omap2/dss/dss_features.c |    9 +-
 drivers/video/omap2/dss/dss_features.h |    1 +
 7 files changed, 244 insertions(+), 66 deletions(-)

-- 
1.7.4.1


^ permalink raw reply

* Re: [PATCH 3/15] i810: fix module_param bool abuse.
From: Florian Tobias Schandinat @ 2012-01-12 23:36 UTC (permalink / raw)
  To: Rusty Russell
  Cc: lkml - Kernel Mailing List, Antonino Daplas, linux-fbdev,
	Pawel Moll
In-Reply-To: <87sjjk34wx.fsf@rustcorp.com.au>

Hi Rusty,

On 01/12/2012 10:57 PM, Rusty Russell wrote:
> On Mon, 19 Dec 2011 23:16:04 +0000, Florian Tobias Schandinat <FlorianSchandinat@gmx.de> wrote:
>> On 12/15/2011 03:03 AM, Rusty Russell wrote:
>>> The driver says "module_param(ddc3, bool, 0);".  But it's not a used
>>> as a bool, it's used as a count.
>>>
>>> Make it a bool.
>>>
>>> Cc: Antonino Daplas <adaplas@gmail.com>
>>> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
>>> Cc: linux-fbdev@vger.kernel.org
>>> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
>>
>> Applied.
> 
> Hmm, I don't see this in Linus' tree yet, and it's a context-clash
> pre-requisite for part of the general driver bool conversion.  I want to
> push today since I have linux.conf.au next week, so I've split the i810
> conversion into a separate patch, below.

Sorry for the delay, but with an OMAP pull and a revert this merge window is not
as quiet as I wished.

> It's been over a week in linux-next, can you push this please?

Sure, I've taken it and also fixed the subject.


Best regards,

Florian Tobias Schandinat

> 
> From: Rusty Russell <rusty@rustcorp.com.au>
> Subject: module_param: make bool parameters really bool (drivers/vidio/i810)
> 
> module_param(bool) used to counter-intuitively take an int.  In
> fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
> trick.
> 
> It's time to remove the int/unsigned int option.  For this version
> it'll simply give a warning, but it'll break next kernel version.
> 
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> 
> diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
> --- a/drivers/video/i810/i810_main.c
> +++ b/drivers/video/i810/i810_main.c
> @@ -135,8 +135,8 @@ static struct pci_driver i810fb_driver >  static char *mode_option __devinitdata = NULL;
>  static int vram       __devinitdata = 4;
>  static int bpp        __devinitdata = 8;
> -static int mtrr       __devinitdata;
> -static int accel      __devinitdata;
> +static bool mtrr      __devinitdata;
> +static bool accel     __devinitdata;
>  static int hsync1     __devinitdata;
>  static int hsync2     __devinitdata;
>  static int vsync1     __devinitdata;
> @@ -144,9 +144,9 @@ static int vsync2     __devinitdata;
>  static int xres       __devinitdata;
>  static int yres;
>  static int vyres      __devinitdata;
> -static int sync       __devinitdata;
> -static int extvga     __devinitdata;
> -static int dcolor     __devinitdata;
> +static bool sync      __devinitdata;
> +static bool extvga    __devinitdata;
> +static bool dcolor    __devinitdata;
>  static bool ddc3      __devinitdata;
>  
>  /*------------------------------------------------------------*/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply

* Re: [PATCH 3/15] i810: fix module_param bool abuse.
From: Rusty Russell @ 2012-01-12 23:09 UTC (permalink / raw)
  To: Florian Tobias Schandinat
  Cc: lkml - Kernel Mailing List, Antonino Daplas, linux-fbdev,
	Pawel Moll
In-Reply-To: <4EEFC5B4.9000704@gmx.de>

On Mon, 19 Dec 2011 23:16:04 +0000, Florian Tobias Schandinat <FlorianSchandinat@gmx.de> wrote:
> On 12/15/2011 03:03 AM, Rusty Russell wrote:
> > The driver says "module_param(ddc3, bool, 0);".  But it's not a used
> > as a bool, it's used as a count.
> > 
> > Make it a bool.
> > 
> > Cc: Antonino Daplas <adaplas@gmail.com>
> > Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
> > Cc: linux-fbdev@vger.kernel.org
> > Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> 
> Applied.

Hmm, I don't see this in Linus' tree yet, and it's a context-clash
pre-requisite for part of the general driver bool conversion.  I want to
push today since I have linux.conf.au next week, so I've split the i810
conversion into a separate patch, below.

It's been over a week in linux-next, can you push this please?

From: Rusty Russell <rusty@rustcorp.com.au>
Subject: module_param: make bool parameters really bool (drivers/vidio/i810)

module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option.  For this version
it'll simply give a warning, but it'll break next kernel version.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -135,8 +135,8 @@ static struct pci_driver i810fb_driver  static char *mode_option __devinitdata = NULL;
 static int vram       __devinitdata = 4;
 static int bpp        __devinitdata = 8;
-static int mtrr       __devinitdata;
-static int accel      __devinitdata;
+static bool mtrr      __devinitdata;
+static bool accel     __devinitdata;
 static int hsync1     __devinitdata;
 static int hsync2     __devinitdata;
 static int vsync1     __devinitdata;
@@ -144,9 +144,9 @@ static int vsync2     __devinitdata;
 static int xres       __devinitdata;
 static int yres;
 static int vyres      __devinitdata;
-static int sync       __devinitdata;
-static int extvga     __devinitdata;
-static int dcolor     __devinitdata;
+static bool sync      __devinitdata;
+static bool extvga    __devinitdata;
+static bool dcolor    __devinitdata;
 static bool ddc3      __devinitdata;
 
 /*------------------------------------------------------------*/

^ permalink raw reply

* Re: [PATCH 1/2] atmel_lcdfb: Adjust HFP calculation so it matches the manual.
From: Florian Tobias Schandinat @ 2012-01-11 22:39 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <4F0AF7F8.8040300@atmel.com>

Hi Nicolas, Alexander,

On 01/09/2012 02:21 PM, Nicolas Ferre wrote:
> On 10/05/2011 09:59 AM, Alexander Stein :
>> In the AT91SAM9263 Manual the HFP part in LCDTIM2 is described as follows:
>>   * HFP: Horizontal Front Porch
>>   Number of idle LCDDOTCK cycles at the end of the line.
>>   Idle period is (HFP+2) LCDDOTCK cycles.
> 
> Hi Alexander,
> 
> Unfortunately this is not true for all the SoC that embed the
> atmel_lcdfb... So I may need to rework this patch but it is certainly
> not applicable in the current form.
> 
> Florian, can you please remove it from your git tree?

Done, I reverted this patch for now.
For the other patches, those that are currently in my tree, I will ask Linus to
pull them really soon. For the others I'll take care of them after the merge
window is closed.


Best regards,

Florian Tobias Schandinat

> 
> Thanks,
> 
> Best regards,
> 
>> It is only a minor issue. I also changed all boards using atmel_lcdfb
>> I found to respect the new calculation.
>>
>> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
>> ---
>>  arch/arm/mach-at91/board-cap9adk.c      |    2 +-
>>  arch/arm/mach-at91/board-neocore926.c   |    2 +-
>>  arch/arm/mach-at91/board-sam9261ek.c    |    4 ++-
>>  arch/arm/mach-at91/board-sam9263ek.c    |    2 +-
>>  arch/arm/mach-at91/board-sam9m10g45ek.c |    2 +-
>>  arch/arm/mach-at91/board-sam9rlek.c     |    2 +-
>>  drivers/video/atmel_lcdfb.c             |    4 ++--
>>  7 files changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c
>> index 679b0b7..ae962bf 100644
>> --- a/arch/arm/mach-at91/board-cap9adk.c
>> +++ b/arch/arm/mach-at91/board-cap9adk.c
>> @@ -304,7 +304,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
>>  		.xres		= 240,		.yres		= 320,
>>  		.pixclock	= KHZ2PICOS(4965),
>>  
>> -		.left_margin	= 1,		.right_margin	= 33,
>> +		.left_margin	= 1,		.right_margin	= 34,
>>  		.upper_margin	= 1,		.lower_margin	= 0,
>>  		.hsync_len	= 5,		.vsync_len	= 1,
>>  
>> diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c
>> index 9bc6ab3..583878e 100644
>> --- a/arch/arm/mach-at91/board-neocore926.c
>> +++ b/arch/arm/mach-at91/board-neocore926.c
>> @@ -235,7 +235,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
>>  		.xres		= 240,		.yres		= 320,
>>  		.pixclock	= KHZ2PICOS(5000),
>>  
>> -		.left_margin	= 1,		.right_margin	= 33,
>> +		.left_margin	= 1,		.right_margin	= 34,
>>  		.upper_margin	= 1,		.lower_margin	= 0,
>>  		.hsync_len	= 5,		.vsync_len	= 1,
>>  
>> diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
>> index 5096a0e..8dda83b 100644
>> --- a/arch/arm/mach-at91/board-sam9261ek.c
>> +++ b/arch/arm/mach-at91/board-sam9261ek.c
>> @@ -370,7 +370,7 @@ static struct fb_videomode at91_stn_modes[] = {
>>  		.xres           = 320,          .yres           = 240,
>>  		.pixclock       = KHZ2PICOS(1440),
>>  
>> -		.left_margin    = 1,            .right_margin   = 1,
>> +		.left_margin    = 1,            .right_margin   = 2,
>>  		.upper_margin   = 0,            .lower_margin   = 0,
>>  		.hsync_len      = 1,            .vsync_len      = 1,
>>  
>> @@ -431,7 +431,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
>>  		.xres		= 240,		.yres		= 320,
>>  		.pixclock	= KHZ2PICOS(4965),
>>  
>> -		.left_margin	= 1,		.right_margin	= 33,
>> +		.left_margin	= 1,		.right_margin	= 34,
>>  		.upper_margin	= 1,		.lower_margin	= 0,
>>  		.hsync_len	= 5,		.vsync_len	= 1,
>>  
>> diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
>> index ea8f185..e260070 100644
>> --- a/arch/arm/mach-at91/board-sam9263ek.c
>> +++ b/arch/arm/mach-at91/board-sam9263ek.c
>> @@ -258,7 +258,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
>>  		.xres		= 240,		.yres		= 320,
>>  		.pixclock	= KHZ2PICOS(4965),
>>  
>> -		.left_margin	= 1,		.right_margin	= 33,
>> +		.left_margin	= 1,		.right_margin	= 34,
>>  		.upper_margin	= 1,		.lower_margin	= 0,
>>  		.hsync_len	= 5,		.vsync_len	= 1,
>>  
>> diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
>> index ad234cc..5e9a5ca 100644
>> --- a/arch/arm/mach-at91/board-sam9m10g45ek.c
>> +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
>> @@ -197,7 +197,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
>>  		.xres		= 480,		.yres		= 272,
>>  		.pixclock	= KHZ2PICOS(9000),
>>  
>> -		.left_margin	= 1,		.right_margin	= 1,
>> +		.left_margin	= 1,		.right_margin	= 2,
>>  		.upper_margin	= 40,		.lower_margin	= 1,
>>  		.hsync_len	= 45,		.vsync_len	= 1,
>>  
>> diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
>> index 4f14b54..ad9e5c9 100644
>> --- a/arch/arm/mach-at91/board-sam9rlek.c
>> +++ b/arch/arm/mach-at91/board-sam9rlek.c
>> @@ -154,7 +154,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
>>  		.xres		= 240,		.yres		= 320,
>>  		.pixclock	= KHZ2PICOS(4965),
>>  
>> -		.left_margin	= 1,		.right_margin	= 33,
>> +		.left_margin	= 1,		.right_margin	= 34,
>>  		.upper_margin	= 1,		.lower_margin	= 0,
>>  		.hsync_len	= 5,		.vsync_len	= 1,
>>  
>> diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
>> index 817ab60..816d528 100644
>> --- a/drivers/video/atmel_lcdfb.c
>> +++ b/drivers/video/atmel_lcdfb.c
>> @@ -393,7 +393,7 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
>>  	var->lower_margin = min_t(u32, var->lower_margin,
>>  			ATMEL_LCDC_VFP);
>>  	var->right_margin = min_t(u32, var->right_margin,
>> -			(ATMEL_LCDC_HFP >> ATMEL_LCDC_HFP_OFFSET) + 1);
>> +			(ATMEL_LCDC_HFP >> ATMEL_LCDC_HFP_OFFSET) + 2);
>>  	var->hsync_len = min_t(u32, var->hsync_len,
>>  			(ATMEL_LCDC_HPW >> ATMEL_LCDC_HPW_OFFSET) + 1);
>>  	var->left_margin = min_t(u32, var->left_margin,
>> @@ -578,7 +578,7 @@ static int atmel_lcdfb_set_par(struct fb_info *info)
>>  	lcdc_writel(sinfo, ATMEL_LCDC_TIM1, value);
>>  
>>  	/* Horizontal timing */
>> -	value = (info->var.right_margin - 1) << ATMEL_LCDC_HFP_OFFSET;
>> +	value = (info->var.right_margin - 2) << ATMEL_LCDC_HFP_OFFSET;
>>  	value |= (info->var.hsync_len - 1) << ATMEL_LCDC_HPW_OFFSET;
>>  	value |= (info->var.left_margin - 1);
>>  	dev_dbg(info->device, "  * LCDTIM2 = %08lx\n", value);
> 
> 


^ permalink raw reply

* Re: [PATCH] video: s3c-fb: Add device tree support
From: Mark Brown @ 2012-01-11 17:40 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAJuYYwRSO9OuiLNddOa+KLSkGwOAp3yHcrQZXSk_k2+oxtEDPQ@mail.gmail.com>

On Wed, Jan 11, 2012 at 04:34:28PM +0530, Thomas Abraham wrote:
> On 10 January 2012 10:22, Mark Brown

> > This isn't terribly informative for the user - which GPIOs and in what
> > order are they specified?  Looking at the code it looks like pin mux
> > configuration so just some wording saying it's a list of pins to be used
> > for the framebuffer function.

> Ok. I will modify the sentence to mean that it is list of gpios used
> by framebuffer controller for data/timing interface with the lcd
> panel. Thanks for your review.

You probably want to mention that it's for pin muxing, the reason I
didn't get what it meant on first read was that normally GPIO means
specifically the sort of stuff handled by gpiolib.

^ permalink raw reply

* OMAP DSS2/PM on 3.2 broken?
From: Joe Woodward @ 2012-01-11 13:57 UTC (permalink / raw)
  To: linux-fbdev

[origianlly sent to the Linux OMAP mailing list, but forwarded as suggested (see http://marc.info/?l=linux-omap&m\x132611662919592&w=2)]

I'm running on a Gumstix Overo (OMAP3530) with an 24-bit LCD panel connected via the DSS2 DPI interface (using the generic panel driver).

Entering standby used to work just fine on 3.0, but on 3.2 I get the following:

# echo mem > /sys/power/state
[   23.186279] PM: Syncing filesystems ... done.
[   23.194244] Freezing user space processes ... (elapsed 0.01 seconds)
done.
[   23.219543] Freezing remaining freezable tasks ... (elapsed 0.02
seconds) done.
[   23.251037] Suspending console(s) (use no_console_suspend to debug)
[   23.554656] PM: suspend of devices complete after 296.417 msecs
[   23.561859] PM: late suspend of devices complete after 6.957 msecs
[   24.464813] Successfully put all powerdomains to target state
[   24.466674] ------------[ cut here ]------------
[   24.466857] WARNING: at drivers/video/omap2/dss/dss.c:713 0xc01350f8()
[   24.467010] Modules linked in:
[   24.467132] Backtrace:
[   24.467254] Function entered at [<c0010c3c>] from [<c02c4a60>]
[   24.467407]  r6:c02ffdaa r5:000002c9 r4:00000000 r3:00000000
[   24.467651] Function entered at [<c02c4a48>] from [<c00344d0>]
[   24.467803] Function entered at [<c003447c>] from [<c003450c>]
[   24.467926]  r8:00000000 r7:c0390a84 r6:c00288a4 r5:c037b85c
r4:fffffff3
[   24.468200] r3:00000009
[   24.468322] Function entered at [<c00344e8>] from [<c01350f8>]
[   24.468475] Function entered at [<c01350ac>] from [<c013595c>]
[   24.468597]  r4:dec50208 r3:c013594c
[   24.468780] Function entered at [<c013594c>] from [<c0182724>]
[   24.468902]  r6:c00288a4 r5:c037b85c r4:dec50208 r3:c013594c
[   24.469177] Function entered at [<c01826f0>] from [<c0028900>]
[   24.469299] Function entered at [<c00288a4>] from [<c01836f4>]
[   24.469421]  r4:dec50208 r3:00000000
[   24.469604] Function entered at [<c0183614>] from [<c0183d20>]
[   24.469726]  r9:c02d7044 r8:00000000 r6:dec5025c r5:00000010
r4:dec50208
[   24.470031] Function entered at [<c0183c54>] from [<c0063aa4>]
[   24.470153]  r8:c02ca888 r7:00000000 r6:00000003 r5:00000000
r4:00000000
[   24.470458] Function entered at [<c006391c>] from [<c0063c60>]
[   24.470581]  r7:00000004 r6:00000000 r5:c02ca87c r4:00000003
[   24.471130] Function entered at [<c0063b50>] from [<c0062ad4>]
[   24.471282]  r6:00000003 r5:00000003 r4:c6a87000 r3:0000006d
[   24.471557] Function entered at [<c0062a2c>] from [<c0117728>]
[   24.471679] Function entered at [<c011770c>] from [<c00e2ab0>]
[   24.471832] Function entered at [<c00e29a0>] from [<c0098c98>]
[   24.471954] Function entered at [<c0098be4>] from [<c0098f14>]
[   24.472076]  r8:00000004 r7:00000000 r6:00000000 r5:000ac750
r4:d8a70dc0
[   24.472412] Function entered at [<c0098ed0>] from [<c000dcc0>]
[   24.472534]  r8:c000de44 r7:00000004 r6:000ac750 r5:00000004
r4:000a8e38
[   24.472839] ---[ end trace 9f4f3053f6637dae ]---
[   24.475006] PM: early resume of devices complete after 8.666 msecs
[   25.040344] PM: resume of devices complete after 560.943 msecs
[   25.277801] Restarting tasks ... done.

At which point the screen either restarts, or sometimes flickers and I get the following:
[   22.578796] omapdss DISPC error: SYNC_LOST on channel lcd, restarting the output with video overlays disabled
[   23.391571] omapdss DISPC error: SYNC_LOST on channel lcd, restarting the output with video overlays disabled
[   24.391571] omapdss DISPC error: SYNC_LOST on channel lcd, restarting the output with video overlays disabled

It normally recovers after doing this for a while...

I'm assuming the problems started when DSS2 was adapted to runtime PM by Tomi as the warning comes from dss_runtime_get()?

Anyone have any ideas?

Cheers,
Joe




^ permalink raw reply

* Re: [PATCH] video: s3c-fb: Add device tree support
From: Thomas Abraham @ 2012-01-11 11:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <004401ccd041$c2f66100$48e32300$%han@samsung.com>

Dear Mr. Han,

On 11 January 2012 14:46, Jingoo Han <jg1.han@samsung.com> wrote:
> Hi, Thomas.
>
>> -----Original Message-----
>> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
>> Sent: Tuesday, January 10, 2012 5:02 AM
>> To: linux-fbdev@vger.kernel.org; devicetree-discuss@lists.ozlabs.org
>> Cc: FlorianSchandinat@gmx.de; grant.likely@secretlab.ca; rob.herring@calxeda.com; linux-arm-
>> kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; kgene.kim@samsung.com;
>> jg1.han@samsung.com; patches@linaro.org
>> Subject: [PATCH] video: s3c-fb: Add device tree support
>>
>> Add device tree based discovery support for Samsung's display controller.
>>
>> Cc: Grant Likely <grant.likely@secretlab.ca>
>> Cc: Rob Herring <rob.herring@calxeda.com>
>> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
>> ---
>>  .../devicetree/bindings/fb/samsung-fb.txt          |  103 ++++++++++
>>  drivers/video/s3c-fb.c                             |  209 +++++++++++++++++++-
>>  2 files changed, 304 insertions(+), 8 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/fb/samsung-fb.txt
>>
>> [...]
>>
>> +- samsung,fimd-bpp: Specifies the bits per pixel. Two values should be
>> +  specified in the following order.
>> +    - max-bpp: maximum required bpp for the overlay.
>> +    - default-bpp: bpp supported by the overlay.
>> [...]
>> +             fimd-overlay0 {
>> +                     samsung,fimd-htiming = <64 16 48 1024>;
>> +                     samsung,fimd-vtiming = <64 16 3 600>;
>> +                     samsung,fimd-bpp = <24 32>;
>> +             };
>> +
>> +             fimd-overlay1 {
>> +                     samsung,fimd-htiming = <64 16 48 200>;
>> +                     samsung,fimd-vtiming = <64 16 3 100>;
>> +                     samsung,fimd-bpp = <16 32>;
>> +             };
>> +     };
> In the above 'samsung-fb.txt', the order is defined as max-bpp and default-bpp.
> However, <24 32> and <16 32> seems to be wrong.
> It should be <32 24> and <32 16>, respectively.
> Max bpp would be 32bpp in s3c-fb.

You are right. I will change the order in the documentation as
default-bpp and then max-bpp. Thanks for correction.

Regards,
Thomas.

>
> Best regards,
> Jingoo Han
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] video: s3c-fb: Add device tree support
From: Thomas Abraham @ 2012-01-11 11:16 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20120110045219.GA5433@sirena.org.uk>

Hi Mark,

On 10 January 2012 10:22, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Tue, Jan 10, 2012 at 01:31:47AM +0530, Thomas Abraham wrote:
>
>> +Required properties:
>
>> +- gpios: The gpios used to interface with the external LCD panel.
>
> This isn't terribly informative for the user - which GPIOs and in what
> order are they specified?  Looking at the code it looks like pin mux
> configuration so just some wording saying it's a list of pins to be used
> for the framebuffer function.

Ok. I will modify the sentence to mean that it is list of gpios used
by framebuffer controller for data/timing interface with the lcd
panel. Thanks for your review.

Regards,
Thomas.

^ permalink raw reply

* RE: [PATCH] video: s3c-fb: Add device tree support
From: Jingoo Han @ 2012-01-11  9:16 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1326139307-25112-1-git-send-email-thomas.abraham@linaro.org>

Hi, Thomas.

> -----Original Message-----
> From: Thomas Abraham [mailto:thomas.abraham@linaro.org]
> Sent: Tuesday, January 10, 2012 5:02 AM
> To: linux-fbdev@vger.kernel.org; devicetree-discuss@lists.ozlabs.org
> Cc: FlorianSchandinat@gmx.de; grant.likely@secretlab.ca; rob.herring@calxeda.com; linux-arm-
> kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; kgene.kim@samsung.com;
> jg1.han@samsung.com; patches@linaro.org
> Subject: [PATCH] video: s3c-fb: Add device tree support
> 
> Add device tree based discovery support for Samsung's display controller.
> 
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
>  .../devicetree/bindings/fb/samsung-fb.txt          |  103 ++++++++++
>  drivers/video/s3c-fb.c                             |  209 +++++++++++++++++++-
>  2 files changed, 304 insertions(+), 8 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/fb/samsung-fb.txt
> 
> [...]
>
> +- samsung,fimd-bpp: Specifies the bits per pixel. Two values should be
> +  specified in the following order.
> +    - max-bpp: maximum required bpp for the overlay.
> +    - default-bpp: bpp supported by the overlay.
> [...]
> +		fimd-overlay0 {
> +			samsung,fimd-htiming = <64 16 48 1024>;
> +			samsung,fimd-vtiming = <64 16 3 600>;
> +			samsung,fimd-bpp = <24 32>;
> +		};
> +
> +		fimd-overlay1 {
> +			samsung,fimd-htiming = <64 16 48 200>;
> +			samsung,fimd-vtiming = <64 16 3 100>;
> +			samsung,fimd-bpp = <16 32>;
> +		};
> +	};
In the above 'samsung-fb.txt', the order is defined as max-bpp and default-bpp.
However, <24 32> and <16 32> seems to be wrong.
It should be <32 24> and <32 16>, respectively.
Max bpp would be 32bpp in s3c-fb.

Best regards,
Jingoo Han



^ permalink raw reply

* Re: [PATCH] atmel_lcdfb: support 16bit BGR:565 mode, remove
From: Russell King - ARM Linux @ 2012-01-10 21:06 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20120110140218.GB7180@jl-vm1.vm.bytemark.co.uk>

On Tue, Jan 10, 2012 at 02:02:18PM +0000, Jamie Lokier wrote:
> If you're connecting an RGB555 or RGB444 panel, don't you want the
> software using the framebuffer to know this so it will dither appropriately?
> 
> E.g. gradients look "bandy" if drawn in RGB565 then green's LSB is dropped.

This is why you use the bitfield stuff to tell userspace what the
actual properties of the framebuffer are.

(However, there are some userspace programs which ignore that
information and think they know better than the kernel about how a
frame buffer is organised - which is a constant pain in the butt when
you have a display which isn't BGR.  But that's really a userspace
bug in those silly programs.)

^ permalink raw reply

* Re: [PATCH] atmel_lcdfb: support 16bit BGR:565 mode, remove unsupported 15bit modes
From: Peter Korsgaard @ 2012-01-10 16:42 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20120110130146.GC2057@taskit.de>

>>>>> "Christian" = Christian Glindkamp <christian.glindkamp@taskit.de> writes:

Hi,

 >> So it doesn't really support RGB555 mode. The controller reads up to
 >> 32bit of framebuffer data and outputs 24bit on the LCD pins. You CAN
 >> wire up a RGB555 panel by just skipping the LSB green of a RGB565
 >> wiring, but that is independent of the framebufffer format.

 Christian> But the AT91SAM9261/AT91SAM9263 do not have a native RGB565
 Christian> format if it is configured for 16bit (so it does not read
 Christian> 32bit and output 24bit but just 16bit) but uses BGR555 with
 Christian> an additional intensity bit in the MSB like the palette
 Christian> where you also kept the BGR555 format. How can you get
 Christian> correct colors on these processors if this code above is
 Christian> removed?

I now had a look at the 9261/9263 datasheets, and don't find any
explicit mention of the bit layout of the 16bit/24bit modes. Just to be
completely sure:

- 16bit mode is IBGR-1555 (independently of little/big/wince mode?)
- 24bit is BGR-888 (packed) or XBGR-8888 (unpacked)

Right?

-- 
Bye, Peter Korsgaard

^ 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