* [PATCH 3/6] OMAPDSS: remove wrong HDMI HPD muxing
From: Tomi Valkeinen @ 2012-01-17 12:48 UTC (permalink / raw)
To: linux-omap, linux-fbdev, mythripk; +Cc: archit, x0132446, Tomi Valkeinen
In-Reply-To: <1326804542-22285-1-git-send-email-tomi.valkeinen@ti.com>
"hdmi_hpd" pin is muxed to INPUT and PULLUP, but the pin is not
currently used, and in the future when it is used, the pin is used as a
GPIO and is board specific, not an OMAP4 wide thing.
So remove the muxing for now.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
arch/arm/mach-omap2/display.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index ffd9bd9..d6e65e2 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -102,12 +102,8 @@ static void omap4_hdmi_mux_pads(enum omap_hdmi_flags flags)
u32 reg;
u16 control_i2c_1;
- /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
- omap_mux_init_signal("hdmi_hpd",
- OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("hdmi_cec",
OMAP_PIN_INPUT_PULLUP);
- /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
omap_mux_init_signal("hdmi_ddc_scl",
OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("hdmi_ddc_sda",
--
1.7.4.1
^ permalink raw reply related
* [PATCH 2/6] OMAP: 4430SDP/Panda: rename HPD GPIO to CT_CP_HPD
From: Tomi Valkeinen @ 2012-01-17 12:48 UTC (permalink / raw)
To: linux-fbdev
The GPIO 60 on 4430sdp and Panda is not HPD GPIO, as currently marked in
the board files, but CT_CP_HPD, which is used to enable/disable HPD
functionality.
This patch renames the GPIO.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
arch/arm/mach-omap2/board-4430sdp.c | 4 ++--
arch/arm/mach-omap2/board-omap4panda.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index d7017f2..ae0c09f 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -52,7 +52,7 @@
#define ETH_KS8851_QUART 138
#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
#define OMAP4_SFH7741_ENABLE_GPIO 188
-#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
+#define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
#define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */
#define DLP_POWER_ON_GPIO 40
@@ -596,7 +596,7 @@ static void __init omap_sfh7741prox_init(void)
}
static struct gpio sdp4430_hdmi_gpios[] = {
- { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" },
+ { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
{ HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
};
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index b9f90ba..133b5a7 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -51,7 +51,7 @@
#define GPIO_HUB_NRESET 62
#define GPIO_WIFI_PMENA 43
#define GPIO_WIFI_IRQ 53
-#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
+#define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
/* wl127x BT, FM, GPS connectivity chip */
@@ -479,7 +479,7 @@ int __init omap4_panda_dvi_init(void)
}
static struct gpio panda_hdmi_gpios[] = {
- { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" },
+ { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
{ HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
};
--
1.7.4.1
^ permalink raw reply related
* [PATCH 1/6] OMAP: 4430SDP/Panda: use gpio_free_array to free HDMI gpios
From: Tomi Valkeinen @ 2012-01-17 12:48 UTC (permalink / raw)
To: linux-omap, linux-fbdev, mythripk; +Cc: archit, x0132446, Tomi Valkeinen
In-Reply-To: <1326804542-22285-1-git-send-email-tomi.valkeinen@ti.com>
Instead of freeing the GPIOs individually, use gpio_free_array().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
arch/arm/mach-omap2/board-4430sdp.c | 3 +--
arch/arm/mach-omap2/board-omap4panda.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 4af874a..d7017f2 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -614,8 +614,7 @@ static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev)
static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev)
{
- gpio_free(HDMI_GPIO_LS_OE);
- gpio_free(HDMI_GPIO_HPD);
+ gpio_free_array(sdp4430_hdmi_gpios, ARRAY_SIZE(sdp4430_hdmi_gpios));
}
static struct nokia_dsi_panel_data dsi1_panel = {
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 00103e3..b9f90ba 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -497,8 +497,7 @@ static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev)
static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev)
{
- gpio_free(HDMI_GPIO_LS_OE);
- gpio_free(HDMI_GPIO_HPD);
+ gpio_free_array(panda_hdmi_gpios, ARRAY_SIZE(panda_hdmi_gpios));
}
static struct omap_dss_device omap4_panda_hdmi_device = {
--
1.7.4.1
^ permalink raw reply related
* [PATCH 0/6] OMAPDSS: HDMI PHY burnout fix
From: Tomi Valkeinen @ 2012-01-17 12:48 UTC (permalink / raw)
To: linux-omap, linux-fbdev, mythripk; +Cc: archit, x0132446, Tomi Valkeinen
The main patch in this set is the last one, which implements a fix for the HW
bug on OMAP4 which causes physical damage to the board if the HDMI cable is not
connected but HDMI output is enabled.
The preceding patches are small cleanups/fixes for HDMI GPIOs so that the fix
can be implemented.
Note that I haven't gotten a confirmation that using LDO_ON for the HDMI PHY
power fixes the issue. So whether the fix works or not is unclear.
Tomi
Tomi Valkeinen (6):
OMAP: 4430SDP/Panda: use gpio_free_array to free HDMI gpios
OMAP: 4430SDP/Panda: rename HPD GPIO to CT_CP_HPD
OMAPDSS: remove wrong HDMI HPD muxing
OMAP: 4430SDP/Panda: setup HDMI GPIO muxes
OMAP: 4430SDP/Panda: add HDMI HPD gpio
OMAPDSS: HDMI: PHY burnout fix
arch/arm/mach-omap2/board-4430sdp.c | 18 ++++++--
arch/arm/mach-omap2/board-omap4panda.c | 18 ++++++--
arch/arm/mach-omap2/display.c | 4 --
drivers/video/omap2/dss/hdmi.c | 3 +
drivers/video/omap2/dss/ti_hdmi.h | 4 ++
drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 68 +++++++++++++++++++++++++++--
include/video/omapdss.h | 5 ++
7 files changed, 104 insertions(+), 16 deletions(-)
--
1.7.4.1
^ permalink raw reply
* Re: [PATCH] video: s3c-fb: Add device tree support
From: Thomas Abraham @ 2012-01-17 5:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4F10A267.2020608@gmail.com>
Hi Sylwester,
On 14 January 2012 03:00, Sylwester Nawrocki <snjw23@gmail.com> wrote:
> 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]);
>>> +}
>
Yes, I agree that there is a problem here. DT bindings for
pinmux/pinconfig would solve this. But the sequence of of_get_gpio()
and gpio_request() in the above code will stay even when using the dt
bindings for pinmux/pinconfig. There will be only incremental changes
required to adapt to dt bindings for pinmux/pinconfig.
Thanks,
Thomas.
^ permalink raw reply
* Re: [PATCH] drivers/video: compile fixes for fsl-diu-fb.c
From: Timur Tabi @ 2012-01-16 16:12 UTC (permalink / raw)
To: Michael Neuling, Florian Tobias Schandinat
Cc: linuxppc-dev@ozlabs.org, linux-fbdev@vger.kernel.org
In-Reply-To: <21370.1326683320@neuling.org>
Michael Neuling wrote:
> 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>
Acked-by: Timur Tabi <timur@freescale.com>
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH] drivers/video: compile fixes for fsl-diu-fb.c
From: Timur Tabi @ 2012-01-16 16:12 UTC (permalink / raw)
To: Michael Neuling
Cc: linuxppc-dev@ozlabs.org, linux-fbdev@vger.kernel.org,
Florian Tobias Schandinat
In-Reply-To: <21370.1326683320@neuling.org>
Michael Neuling wrote:
> drivers/video/fsl-diu-fb.c: In function 'fsl_diu_suspend':
> drivers/video/fsl-diu-fb.c:1435: error: incompatible type for argument 1 of 'disable_lcdc'
> drivers/video/fsl-diu-fb.c:592: note: expected 'struct fb_info *' but argument is of type 'struct fb_info'
> drivers/video/fsl-diu-fb.c: In function 'fsl_diu_resume':
> drivers/video/fsl-diu-fb.c:1445: error: incompatible type for argument 1 of 'enable_lcdc'
> drivers/video/fsl-diu-fb.c:583: note: expected 'struct fb_info *' but argument is of type 'struct fb_info'
I figured out what the problem is. I never compiled a configuration with
CONFIG_PM enabled. For some reason, CONFIG_PM is disabled when SMP is
enabled, and I only tested with mpc85xx_smp_defconfig.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH 5/6] OMAPDSS: DISPC: move fifo threhold calc to dispc.c
From: Archit @ 2012-01-16 10:11 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev, archit, rob
In-Reply-To: <1326707861.1875.1.camel@deskari>
On Monday 16 January 2012 03:27 PM, Tomi Valkeinen wrote:
> On Sat, 2012-01-14 at 01:30 +0530, Archit wrote:
>> 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?
>
> That's true. I had it in mind at some point, but I seem to have
> forgotten it.
>
> The problem with OMAP3, DSI and fifo thresholds was never cleared, and I
> haven't seen an errata about it, so there's a slim chance that it was
> only a problem with the particular setup.
>
> Are you back at the office yet? If I recall right, you had an OMAP3 DSI
> cmd mode board?
Not yet, I'll try it out when I get back.
>
> Anyway, I guess it's safest if I add a hack there, which tunes the
> thresholds a bit differently for OMAP3 DSI.
Yes, you could have that, we have to rewrite the whole threshold
calculation later on anyway.
Archit
>
> Tomi
>
^ permalink raw reply
* Re: [PATCH 5/6] OMAPDSS: DISPC: move fifo threhold calc to dispc.c
From: Tomi Valkeinen @ 2012-01-16 9:57 UTC (permalink / raw)
To: Archit; +Cc: linux-omap, linux-fbdev, archit, rob
In-Reply-To: <4F108D7A.4010802@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1553 bytes --]
On Sat, 2012-01-14 at 01:30 +0530, Archit wrote:
> 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?
That's true. I had it in mind at some point, but I seem to have
forgotten it.
The problem with OMAP3, DSI and fifo thresholds was never cleared, and I
haven't seen an errata about it, so there's a slim chance that it was
only a problem with the particular setup.
Are you back at the office yet? If I recall right, you had an OMAP3 DSI
cmd mode board?
Anyway, I guess it's safest if I add a hack there, which tunes the
thresholds a bit differently for OMAP3 DSI.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH] drivers/video: compile fixes for fsl-diu-fb.c
From: Michael Neuling @ 2012-01-16 3:08 UTC (permalink / raw)
To: Tabi Timur-B04825
Cc: linuxppc-dev@ozlabs.org, linux-fbdev@vger.kernel.org,
Florian Tobias Schandinat
In-Reply-To: <4F138CBB.1080901@freescale.com>
In message <4F138CBB.1080901@freescale.com> you wrote:
> Michael Neuling wrote:
> > 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
>
> Tomorrow, when I get into the office, I'll take a look. But my code has
> always compiled. Can you give me the output of your compiler?
drivers/video/fsl-diu-fb.c: In function 'fsl_diu_suspend':
drivers/video/fsl-diu-fb.c:1435: error: incompatible type for argument 1 of 'disable_lcdc'
drivers/video/fsl-diu-fb.c:592: note: expected 'struct fb_info *' but argument is of type 'struct fb_info'
drivers/video/fsl-diu-fb.c: In function 'fsl_diu_resume':
drivers/video/fsl-diu-fb.c:1445: error: incompatible type for argument 1 of 'enable_lcdc'
drivers/video/fsl-diu-fb.c:583: note: expected 'struct fb_info *' but argument is of type 'struct fb_info'
>
> > 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 *o> fdev)
> > 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]));
>
> I prefer this:
>
> disable_lcdc(data->fsl_diu_info);
>
> Your change makes sense. I don't understand why it compiles on my system.
> Something strange is going on.
Sure.
Mikey
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..6af3f16 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);
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);
return 0;
}
^ permalink raw reply related
* Re: [PATCH] drivers/video: compile fixes for fsl-diu-fb.c
From: Tabi Timur-B04825 @ 2012-01-16 2:34 UTC (permalink / raw)
To: Michael Neuling
Cc: linuxppc-dev@ozlabs.org, linux-fbdev@vger.kernel.org,
Florian Tobias Schandinat
In-Reply-To: <21913.1326675139@neuling.org>
Michael Neuling wrote:
> 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
Tomorrow, when I get into the office, I'll take a look. But my code has
always compiled. Can you give me the output of your compiler?
> 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]));
I prefer this:
disable_lcdc(data->fsl_diu_info);
Your change makes sense. I don't understand why it compiles on my system.
Something strange is going on.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* 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
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox