* [PATCH] ARM: EXYNOS4: Setup consistent dma size at boot time
@ 2011-09-12 5:55 Tushar Behera
2011-09-12 15:02 ` Subash Patel
2011-10-13 5:04 ` Tushar Behera
0 siblings, 2 replies; 5+ messages in thread
From: Tushar Behera @ 2011-09-12 5:55 UTC (permalink / raw)
To: linux-samsung-soc; +Cc: kgene.kim, linaro-dev, patches, Jon Medhurst
Some of the boards under mach-exynos4 initialize frame-buffers
for which the memory requirement is more than 2MB (Nuri board requires
around 4MB, Origen requires around 2.6MB), hence the default dma pool
allocation size of 2MB is not sufficient. The consistent dma size is
hence increased to successfully allocate memory for those boards.
Depends on "ARM: Add init_consistent_dma_size()"
by Jon Medhurst (99d1717dd7fecf2b10195b0d864323b952b4eba0).
CC: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
arch/arm/mach-exynos4/cpu.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
index 2d8a40c..45d8bfa 100644
--- a/arch/arm/mach-exynos4/cpu.c
+++ b/arch/arm/mach-exynos4/cpu.c
@@ -10,6 +10,7 @@
#include <linux/sched.h>
#include <linux/sysdev.h>
+#include <linux/dma-mapping.h>
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
@@ -136,6 +137,7 @@ static void exynos4_idle(void)
void __init exynos4_map_io(void)
{
iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc));
+ init_consistent_dma_size(SZ_8M);
/* initialize device information early */
exynos4_default_sdhci0();
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] ARM: EXYNOS4: Setup consistent dma size at boot time
2011-09-12 5:55 [PATCH] ARM: EXYNOS4: Setup consistent dma size at boot time Tushar Behera
@ 2011-09-12 15:02 ` Subash Patel
2011-09-13 3:30 ` Tushar Behera
2011-10-13 5:04 ` Tushar Behera
1 sibling, 1 reply; 5+ messages in thread
From: Subash Patel @ 2011-09-12 15:02 UTC (permalink / raw)
To: Tushar Behera
Cc: linux-samsung-soc, kgene.kim, linaro-dev, patches, Jon Medhurst
Hi Tushar,
On 09/12/2011 11:25 AM, Tushar Behera wrote:
> Some of the boards under mach-exynos4 initialize frame-buffers
> for which the memory requirement is more than 2MB (Nuri board requires
> around 4MB, Origen requires around 2.6MB), hence the default dma pool
> allocation size of 2MB is not sufficient. The consistent dma size is
> hence increased to successfully allocate memory for those boards.
>
> Depends on "ARM: Add init_consistent_dma_size()"
> by Jon Medhurst (99d1717dd7fecf2b10195b0d864323b952b4eba0).
>
> CC: Jon Medhurst<tixy@yxit.co.uk>
> Signed-off-by: Tushar Behera<tushar.behera@linaro.org>
> ---
> arch/arm/mach-exynos4/cpu.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
> index 2d8a40c..45d8bfa 100644
> --- a/arch/arm/mach-exynos4/cpu.c
> +++ b/arch/arm/mach-exynos4/cpu.c
> @@ -10,6 +10,7 @@
>
> #include<linux/sched.h>
> #include<linux/sysdev.h>
> +#include<linux/dma-mapping.h>
>
> #include<asm/mach/map.h>
> #include<asm/mach/irq.h>
> @@ -136,6 +137,7 @@ static void exynos4_idle(void)
> void __init exynos4_map_io(void)
> {
> iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc));
> + init_consistent_dma_size(SZ_8M);
>
I think CMA is being used to allocate the FB in origen machine. In that
case, increasing the consistent memory is not useful. If the memory is
increased in the consistent DMA area, how can that be useful to s3cfb?
Regards,
Subash
> /* initialize device information early */
> exynos4_default_sdhci0();
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] ARM: EXYNOS4: Setup consistent dma size at boot time
2011-09-12 15:02 ` Subash Patel
@ 2011-09-13 3:30 ` Tushar Behera
2011-09-13 4:42 ` Subash Patel
0 siblings, 1 reply; 5+ messages in thread
From: Tushar Behera @ 2011-09-13 3:30 UTC (permalink / raw)
To: Subash Patel
Cc: linux-samsung-soc, kgene.kim, linaro-dev, patches, Jon Medhurst
Hi Subash,
On Monday 12 September 2011 08:32 PM, Subash Patel wrote:
> Hi Tushar,
>
> On 09/12/2011 11:25 AM, Tushar Behera wrote:
>> Some of the boards under mach-exynos4 initialize frame-buffers
>> for which the memory requirement is more than 2MB (Nuri board requires
>> around 4MB, Origen requires around 2.6MB), hence the default dma pool
>> allocation size of 2MB is not sufficient. The consistent dma size is
>> hence increased to successfully allocate memory for those boards.
>>
>> Depends on "ARM: Add init_consistent_dma_size()"
>> by Jon Medhurst (99d1717dd7fecf2b10195b0d864323b952b4eba0).
>>
>> CC: Jon Medhurst<tixy@yxit.co.uk>
>> Signed-off-by: Tushar Behera<tushar.behera@linaro.org>
>> ---
>> arch/arm/mach-exynos4/cpu.c | 2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
>> index 2d8a40c..45d8bfa 100644
>> --- a/arch/arm/mach-exynos4/cpu.c
>> +++ b/arch/arm/mach-exynos4/cpu.c
>> @@ -10,6 +10,7 @@
>>
>> #include<linux/sched.h>
>> #include<linux/sysdev.h>
>> +#include<linux/dma-mapping.h>
>>
>> #include<asm/mach/map.h>
>> #include<asm/mach/irq.h>
>> @@ -136,6 +137,7 @@ static void exynos4_idle(void)
>> void __init exynos4_map_io(void)
>> {
>> iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc));
>> + init_consistent_dma_size(SZ_8M);
>>
>
> I think CMA is being used to allocate the FB in origen machine. In that
> case, increasing the consistent memory is not useful. If the memory is
> increased in the consistent DMA area, how can that be useful to s3cfb?
>
We are using dma_alloc_writecombine to allocate frame buffer memory.
Ref: linux/drivers/video/s3c-fb.c:s3c_fb_alloc_memory().
CMA is not yet part of the mainline kernel and hence there is no way the
FB can use CMA for memory allocation.
> Regards,
> Subash
>
>
>> /* initialize device information early */
>> exynos4_default_sdhci0();
--
Tushar Behera
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] ARM: EXYNOS4: Setup consistent dma size at boot time
2011-09-13 3:30 ` Tushar Behera
@ 2011-09-13 4:42 ` Subash Patel
0 siblings, 0 replies; 5+ messages in thread
From: Subash Patel @ 2011-09-13 4:42 UTC (permalink / raw)
To: Tushar Behera
Cc: linux-samsung-soc, kgene.kim, linaro-dev, patches, Jon Medhurst
My bad. I am still referring to drivers/video/samsung/s3cfb_main.c in
Linaro-3.0 kernel. Thanks for the pointer. This makes sense now.
Also, we will not be able to use CMA directly, even after it gets
mainlined. It needs to be called from the dma_alloc_*() with appropriate
attributes.
Regards,
Subash
On 09/13/2011 09:00 AM, Tushar Behera wrote:
> Hi Subash,
>
> On Monday 12 September 2011 08:32 PM, Subash Patel wrote:
>> Hi Tushar,
>>
>> On 09/12/2011 11:25 AM, Tushar Behera wrote:
>>> Some of the boards under mach-exynos4 initialize frame-buffers
>>> for which the memory requirement is more than 2MB (Nuri board requires
>>> around 4MB, Origen requires around 2.6MB), hence the default dma pool
>>> allocation size of 2MB is not sufficient. The consistent dma size is
>>> hence increased to successfully allocate memory for those boards.
>>>
>>> Depends on "ARM: Add init_consistent_dma_size()"
>>> by Jon Medhurst (99d1717dd7fecf2b10195b0d864323b952b4eba0).
>>>
>>> CC: Jon Medhurst<tixy@yxit.co.uk>
>>> Signed-off-by: Tushar Behera<tushar.behera@linaro.org>
>>> ---
>>> arch/arm/mach-exynos4/cpu.c | 2 ++
>>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
>>> index 2d8a40c..45d8bfa 100644
>>> --- a/arch/arm/mach-exynos4/cpu.c
>>> +++ b/arch/arm/mach-exynos4/cpu.c
>>> @@ -10,6 +10,7 @@
>>>
>>> #include<linux/sched.h>
>>> #include<linux/sysdev.h>
>>> +#include<linux/dma-mapping.h>
>>>
>>> #include<asm/mach/map.h>
>>> #include<asm/mach/irq.h>
>>> @@ -136,6 +137,7 @@ static void exynos4_idle(void)
>>> void __init exynos4_map_io(void)
>>> {
>>> iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc));
>>> + init_consistent_dma_size(SZ_8M);
>>>
>>
>> I think CMA is being used to allocate the FB in origen machine. In that
>> case, increasing the consistent memory is not useful. If the memory is
>> increased in the consistent DMA area, how can that be useful to s3cfb?
>>
> We are using dma_alloc_writecombine to allocate frame buffer memory.
> Ref: linux/drivers/video/s3c-fb.c:s3c_fb_alloc_memory().
>
> CMA is not yet part of the mainline kernel and hence there is no way the
> FB can use CMA for memory allocation.
>> Regards,
>> Subash
>>
>>
>>> /* initialize device information early */
>>> exynos4_default_sdhci0();
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: EXYNOS4: Setup consistent dma size at boot time
2011-09-12 5:55 [PATCH] ARM: EXYNOS4: Setup consistent dma size at boot time Tushar Behera
2011-09-12 15:02 ` Subash Patel
@ 2011-10-13 5:04 ` Tushar Behera
1 sibling, 0 replies; 5+ messages in thread
From: Tushar Behera @ 2011-10-13 5:04 UTC (permalink / raw)
To: linux-samsung-soc; +Cc: kgene.kim, linaro-dev, patches, Jon Medhurst
Hi Kukjin,
On Monday 12 September 2011 11:25 AM, Tushar Behera wrote:
> Some of the boards under mach-exynos4 initialize frame-buffers
> for which the memory requirement is more than 2MB (Nuri board requires
> around 4MB, Origen requires around 2.6MB), hence the default dma pool
> allocation size of 2MB is not sufficient. The consistent dma size is
> hence increased to successfully allocate memory for those boards.
>
> Depends on "ARM: Add init_consistent_dma_size()"
> by Jon Medhurst (99d1717dd7fecf2b10195b0d864323b952b4eba0).
>
> CC: Jon Medhurst<tixy@yxit.co.uk>
> Signed-off-by: Tushar Behera<tushar.behera@linaro.org>
> ---
> arch/arm/mach-exynos4/cpu.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
> index 2d8a40c..45d8bfa 100644
> --- a/arch/arm/mach-exynos4/cpu.c
> +++ b/arch/arm/mach-exynos4/cpu.c
> @@ -10,6 +10,7 @@
>
> #include<linux/sched.h>
> #include<linux/sysdev.h>
> +#include<linux/dma-mapping.h>
>
> #include<asm/mach/map.h>
> #include<asm/mach/irq.h>
> @@ -136,6 +137,7 @@ static void exynos4_idle(void)
> void __init exynos4_map_io(void)
> {
> iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc));
> + init_consistent_dma_size(SZ_8M);
>
> /* initialize device information early */
> exynos4_default_sdhci0();
Would you please consider this patch for 3.2?
--
Tushar Behera
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-13 5:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-12 5:55 [PATCH] ARM: EXYNOS4: Setup consistent dma size at boot time Tushar Behera
2011-09-12 15:02 ` Subash Patel
2011-09-13 3:30 ` Tushar Behera
2011-09-13 4:42 ` Subash Patel
2011-10-13 5:04 ` Tushar Behera
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.