Re: [PATCH v8 3/4] media: coda: use genalloc API

2013-02-05 Thread javier Martin
Hi Philipp,
thank you for preserving compatibility for platform data.

For the coda sources:

Acked-By: Javier Martin 

On 4 February 2013 12:32, Philipp Zabel  wrote:
> This patch depends on "genalloc: add devres support, allow to find
> a managed pool by device", which provides the of_get_named_gen_pool
> and dev_get_gen_pool functions.
>
> Signed-off-by: Philipp Zabel 
> ---
> Changes since v7:
>  - In the platform data case, retrieve gen_pool by device instead of
>by physical address. The information about the SRAM pool can't be
>provided via memory resource, so add a platform data struct that
>contains a pointer to the SRAM device.
>  - Add device tree binding documentation.
> ---
>  Documentation/devicetree/bindings/media/coda.txt |   30 +++
>  drivers/media/platform/Kconfig   |1 -
>  drivers/media/platform/coda.c|   45 
> +++---
>  include/linux/platform_data/coda.h   |   18 +
>  4 files changed, 79 insertions(+), 15 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/media/coda.txt
>  create mode 100644 include/linux/platform_data/coda.h
>
> diff --git a/Documentation/devicetree/bindings/media/coda.txt 
> b/Documentation/devicetree/bindings/media/coda.txt
> new file mode 100644
> index 000..2865d04
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/coda.txt
> @@ -0,0 +1,30 @@
> +Chips&Media Coda multi-standard codec IP
> +
> +
> +Coda codec IPs are present in i.MX SoCs in various versions,
> +called VPU (Video Processing Unit).
> +
> +Required properties:
> +- compatible : should be "fsl,-src" for i.MX SoCs:
> +  (a) "fsl,imx27-vpu" for CodaDx6 present in i.MX27
> +  (b) "fsl,imx53-vpu" for CODA7541 present in i.MX53
> +  (c) "fsl,imx6q-vpu" for CODA960 present in i.MX6q
> +- reg: should be register base and length as documented in the
> +  SoC reference manual
> +- interrupts : Should contain the VPU interrupt. For CODA960,
> +  a second interrupt is needed for the MJPEG unit.
> +- clocks : Should contain the ahb and per clocks, in the order
> +  determined by the clock-names property.
> +- clock-names : Should be "ahb", "per"
> +- iram : phandle pointing to the SRAM device node
> +
> +Example:
> +
> +vpu: vpu@63ff4000 {
> +   compatible = "fsl,imx53-vpu";
> +   reg = <0x63ff4000 0x1000>;
> +   interrupts = <9>;
> +   clocks = <&clks 63>, <&clks 63>;
> +   clock-names = "ahb", "per";
> +   iram = <&ocram>;
> +};
> diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
> index 05d7b63..bbf83c1 100644
> --- a/drivers/media/platform/Kconfig
> +++ b/drivers/media/platform/Kconfig
> @@ -145,7 +145,6 @@ config VIDEO_CODA
> depends on VIDEO_DEV && VIDEO_V4L2 && ARCH_MXC
> select VIDEOBUF2_DMA_CONTIG
> select V4L2_MEM2MEM_DEV
> -   select IRAM_ALLOC if SOC_IMX53
> ---help---
>Coda is a range of video codec IPs that supports
>H.264, MPEG-4, and other video formats.
> diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
> index 20827ba..b931c2a 100644
> --- a/drivers/media/platform/coda.c
> +++ b/drivers/media/platform/coda.c
> @@ -14,6 +14,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -23,7 +24,7 @@
>  #include 
>  #include 
>  #include 
> -#include 
> +#include 
>
>  #include 
>  #include 
> @@ -43,6 +44,7 @@
>  #define CODA7_WORK_BUF_SIZE(512 * 1024 + CODA_FMO_BUF_SIZE * 8 * 1024)
>  #define CODA_PARA_BUF_SIZE (10 * 1024)
>  #define CODA_ISRAM_SIZE(2048 * 2)
> +#define CODADX6_IRAM_SIZE  0xb000
>  #define CODA7_IRAM_SIZE0x14000 /* 81920 bytes */
>
>  #define CODA_MAX_FRAMEBUFFERS  2
> @@ -128,7 +130,10 @@ struct coda_dev {
>
> struct coda_aux_buf codebuf;
> struct coda_aux_buf workbuf;
> +   struct gen_pool *iram_pool;
> +   long unsigned int   iram_vaddr;
> long unsigned int   iram_paddr;
> +   unsigned long   iram_size;
>
> spinlock_t  irqlock;
> struct mutexdev_mutex;
> @@ -1926,6 +1931,9 @@ static int coda_probe(struct platform_device *pdev)
> const struct of_device_id *of_id =
> of_match_device(of_match_ptr(coda_dt_ids), 
> &pdev->dev);
> const 

Re: [PATCH] dmaengine: imx-dma: Disable use of hw_chain to fix sg_dma transfers.

2013-01-04 Thread javier Martin
On 30 October 2012 16:58, Javier Martin  wrote:
> HW chaining is currently broken in imx-dma. It can be easily reproduced doing
> intensive accesses to a external MMC card and checking how the file system
> is corrupted.
>
> Preventing the driver to use HW chaining solves these issues.
>
>
> Signed-off-by: Javier Martin 
> ---
>  drivers/dma/imx-dma.c |5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
> index 5084975..03f3b64 100644
> --- a/drivers/dma/imx-dma.c
> +++ b/drivers/dma/imx-dma.c
> @@ -643,9 +643,8 @@ static int imxdma_control(struct dma_chan *chan, enum 
> dma_ctrl_cmd cmd,
> break;
> }
>
> -   imxdmac->hw_chaining = 1;
> -   if (!imxdma_hw_chain(imxdmac))
> -   return -EINVAL;
> +   imxdmac->hw_chaining = 0;
> +
> imxdmac->ccr_from_device = (mode | IMX_DMA_TYPE_FIFO) |
> ((IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR) << 2) |
> CCR_REN;
> --
> 1.7.9.5
>

Hi Vinod,
I see you missed this patch for 3.7. Could you please apply it as a fix for 3.8?

Regards.

-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4 1/3] ARM: imx27_visstrim_m10: Do not reserve DMA pools on board file

2012-11-23 Thread javier Martin
; sizeof(iclink_tvp5150));
> gpio_led_register_device(0, &visstrim_m10_led_data);
> -   visstrim_deinterlace_init();
> +   platform_device_register(&visstrim_deinterlace);
> visstrim_camera_init();
> -   visstrim_coda_init();
> +   imx27_add_coda();
>  }
>
>  static void __init visstrim_m10_timer_init(void)
> @@ -562,7 +503,6 @@ static struct sys_timer visstrim_m10_timer = {
>
>  MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
> .atag_offset = 0x100,
> -   .reserve = visstrim_reserve,
> .map_io = mx27_map_io,
> .init_early = imx27_init_early,
> .init_irq = mx27_init_irq,
> --
> 1.7.9.5
>
>



-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] dmaengine: imx-dma: Disable use of hw_chain to fix sg_dma transfers.

2012-10-30 Thread Javier Martin
HW chaining is currently broken in imx-dma. It can be easily reproduced doing
intensive accesses to a external MMC card and checking how the file system
is corrupted.

Preventing the driver to use HW chaining solves these issues.


Signed-off-by: Javier Martin 
---
 drivers/dma/imx-dma.c |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index 5084975..03f3b64 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -643,9 +643,8 @@ static int imxdma_control(struct dma_chan *chan, enum 
dma_ctrl_cmd cmd,
break;
}
 
-   imxdmac->hw_chaining = 1;
-   if (!imxdma_hw_chain(imxdmac))
-   return -EINVAL;
+   imxdmac->hw_chaining = 0;
+
imxdmac->ccr_from_device = (mode | IMX_DMA_TYPE_FIFO) |
((IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR) << 2) |
CCR_REN;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [ASoC] Fix: Revert 'ASoC: imx-ssi: Remove mono support'.

2012-09-04 Thread javier Martin
On 4 September 2012 08:35, Gaëtan Carlier  wrote:
> Hi Javier,
>
> On 09/03/2012 10:27 AM, Javier Martin wrote:
>>
>> The following commit should be reverted:
>> 0865a75d4166bddc533fd50831829ceefb94f9b0
>>
>> The bug this patch is meant to solve doesn't occur in Visstrim_M10 boards.
>> Furthermore, after applying this patch sound in Visstrim_M10 is played
>> at slower rates.
>>
>> Signed-off-by: Javier Martin 
>> ---
>> diff --git b/sound/soc/fsl/imx-ssi.c a/sound/soc/fsl/imx-ssi.c
>> index ac337ac..28dd76c 100644
>> --- b/sound/soc/fsl/imx-ssi.c
>> +++ a/sound/soc/fsl/imx-ssi.c
>> @@ -380,13 +380,13 @@ static int imx_ssi_dai_probe(struct snd_soc_dai
>> *dai)
>>   static struct snd_soc_dai_driver imx_ssi_dai = {
>> .probe = imx_ssi_dai_probe,
>> .playback = {
>> -   .channels_min = 2,
>> +   .channels_min = 1,
>> .channels_max = 2,
>> .rates = SNDRV_PCM_RATE_8000_96000,
>> .formats = SNDRV_PCM_FMTBIT_S16_LE,
>> },
>> .capture = {
>> -   .channels_min = 2,
>> +   .channels_min = 1,
>> .channels_max = 2,
>> .rates = SNDRV_PCM_RATE_8000_96000,
>> .formats = SNDRV_PCM_FMTBIT_S16_LE,
>>
> When applied on linux-next-20120824, the patch failed because original
> imx-ssi.c file looks like :
>
> static struct snd_soc_dai_driver imx_ssi_dai = {
> .probe = imx_ssi_dai_probe,
> .playback = {
> /* The SSI does not support monaural audio. */
>
> .channels_min = 2,
> .channels_max = 2,
> .rates = SNDRV_PCM_RATE_8000_96000,
> .formats = SNDRV_PCM_FMTBIT_S16_LE,
> },
> .capture = {
> .channels_min = 2,
> .channels_max = 2,
> .rates = SNDRV_PCM_RATE_8000_96000,
> .formats = SNDRV_PCM_FMTBIT_S16_LE,
> },
> .ops = &imx_ssi_pcm_dai_ops,
> };
>
> The comment line is missing in your patch. Here is the right patch :
>
> @@ -378,18 +378,17 @@ static int imx_ssi_dai_probe(struct snd_soc_dai *dai)
>
>  }
>
>  static struct snd_soc_dai_driver imx_ssi_dai = {
> .probe = imx_ssi_dai_probe,
> .playback = {
> -   /* The SSI does not support monaural audio. */
>
> -   .channels_min = 2,
> +   .channels_min = 1,
> .channels_max = 2,
> .rates = SNDRV_PCM_RATE_8000_96000,
> .formats = SNDRV_PCM_FMTBIT_S16_LE,
> },
> .capture = {
> -   .channels_min = 2,
> +       .channels_min = 1,
> .channels_max = 2,
> .rates = SNDRV_PCM_RATE_8000_96000,
> .formats = SNDRV_PCM_FMTBIT_S16_LE,
> },
> .ops = &imx_ssi_pcm_dai_ops,
>
> Regards,
> Gaëtan Carlier.


Mark,
could you pick up the fixed patch sent by Gaëtan?

Regards.

-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[ASoC] Fix: Revert 'ASoC: imx-ssi: Remove mono support'.

2012-09-03 Thread Javier Martin
The following commit should be reverted: 
0865a75d4166bddc533fd50831829ceefb94f9b0

The bug this patch is meant to solve doesn't occur in Visstrim_M10 boards.
Furthermore, after applying this patch sound in Visstrim_M10 is played
at slower rates.

Signed-off-by: Javier Martin 
---
diff --git b/sound/soc/fsl/imx-ssi.c a/sound/soc/fsl/imx-ssi.c
index ac337ac..28dd76c 100644
--- b/sound/soc/fsl/imx-ssi.c
+++ a/sound/soc/fsl/imx-ssi.c
@@ -380,13 +380,13 @@ static int imx_ssi_dai_probe(struct snd_soc_dai *dai)
 static struct snd_soc_dai_driver imx_ssi_dai = {
.probe = imx_ssi_dai_probe,
.playback = {
-   .channels_min = 2,
+   .channels_min = 1,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_96000,
.formats = SNDRV_PCM_FMTBIT_S16_LE,
},
.capture = {
-   .channels_min = 2,
+   .channels_min = 1,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_96000,
.formats = SNDRV_PCM_FMTBIT_S16_LE,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] dma: imx-dma: Fix kernel crash due to missing clock conversion

2012-07-31 Thread javier Martin
On 31 July 2012 13:38, Fabio Estevam  wrote:
> On Tue, Jul 31, 2012 at 3:46 AM, Vinod Koul  
> wrote:
>
>> This patch will appear in 3.7-rc2 when I send the fixes to Linus post
>> rc1,  I guess early next week.
>
> I guess you mean 3.6-rc2, right?
>
>> Stable guys will pick this and apply to 3.6.X version.
>
> I guess you mean 3.5.x, right?

Ditto.


-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] dma: imx-dma: Fix kernel crash due to missing clock conversion

2012-07-30 Thread javier Martin
On 30 July 2012 13:31, javier Martin  wrote:
> Hi,
>
> On 27 July 2012 13:37, Fabio Estevam  wrote:
>> On Fri, Jul 27, 2012 at 12:17 AM, Vinod Koul  
>> wrote:
>>
>>>> Reported-by: Javier Martin 
>>>> Signed-off-by: Fabio Estevam 
>>> Applied thanks (to fixes-for 3.7)
>>
>> You mentioned that you would also copy stable. Would it be applied
>> into stable soon too?
>
> I agree with Fabio, this patch should also be applied to stable.
>
> Regards.

I almost forgot,
Vinod, I am a bit confused about the branch you've used to merge this
patch. The branch is called 'fixes_for-3.7'. Does this mean that the
patch won't be applied for 3.6? I've seen you've added the line ' Cc:
sta...@vger.kernel.org' which ensures the patch will appear in 3.5.X
but what about 3.6?

Regards.
-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] dma: imx-dma: Fix kernel crash due to missing clock conversion

2012-07-30 Thread javier Martin
Hi,

On 27 July 2012 13:37, Fabio Estevam  wrote:
> On Fri, Jul 27, 2012 at 12:17 AM, Vinod Koul  
> wrote:
>
>>> Reported-by: Javier Martin 
>>> Signed-off-by: Fabio Estevam 
>> Applied thanks (to fixes-for 3.7)
>
> You mentioned that you would also copy stable. Would it be applied
> into stable soon too?

I agree with Fabio, this patch should also be applied to stable.

Regards.

-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] dma: imx-dma: Fix kernel crash due to missing clock conversion

2012-07-26 Thread javier Martin
Who is responsible of applying this patch?

It seems 3.5 has been released without it.

-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/