All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: sunxi_defconfig: Enable CMA
@ 2018-01-19 13:32 ` Maxime Ripard
  0 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2018-01-19 13:32 UTC (permalink / raw)
  To: Chen-Yu Tsai, Maxime Ripard, arm; +Cc: linux-arm-kernel, stable

The DRM driver most notably, but also out of tree drivers (for now) like
the VPU or GPU drivers, are quite big consumers of large, contiguous memory
buffers. However, the sunxi_defconfig doesn't enable CMA in order to
mitigate that, which makes them almost unusable.

Enable it to make sure it somewhat works.

Cc: <stable@vger.kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---

Hi Arnd, Olof,

Could you queue that patch as a fix?

Thanks!
Maxime

 arch/arm/configs/sunxi_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig
index 5caaf971fb50..df433abfcb02 100644
--- a/arch/arm/configs/sunxi_defconfig
+++ b/arch/arm/configs/sunxi_defconfig
@@ -10,6 +10,7 @@ CONFIG_SMP=y
 CONFIG_NR_CPUS=8
 CONFIG_AEABI=y
 CONFIG_HIGHMEM=y
+CONFIG_CMA=y
 CONFIG_ARM_APPENDED_DTB=y
 CONFIG_ARM_ATAG_DTB_COMPAT=y
 CONFIG_CPU_FREQ=y
@@ -33,6 +34,7 @@ CONFIG_CAN_SUN4I=y
 # CONFIG_WIRELESS is not set
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_DMA_CMA=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_ATA=y
 CONFIG_AHCI_SUNXI=y
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] ARM: sunxi_defconfig: Enable CMA
@ 2018-01-19 13:32 ` Maxime Ripard
  0 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2018-01-19 13:32 UTC (permalink / raw)
  To: linux-arm-kernel

The DRM driver most notably, but also out of tree drivers (for now) like
the VPU or GPU drivers, are quite big consumers of large, contiguous memory
buffers. However, the sunxi_defconfig doesn't enable CMA in order to
mitigate that, which makes them almost unusable.

Enable it to make sure it somewhat works.

Cc: <stable@vger.kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---

Hi Arnd, Olof,

Could you queue that patch as a fix?

Thanks!
Maxime

 arch/arm/configs/sunxi_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig
index 5caaf971fb50..df433abfcb02 100644
--- a/arch/arm/configs/sunxi_defconfig
+++ b/arch/arm/configs/sunxi_defconfig
@@ -10,6 +10,7 @@ CONFIG_SMP=y
 CONFIG_NR_CPUS=8
 CONFIG_AEABI=y
 CONFIG_HIGHMEM=y
+CONFIG_CMA=y
 CONFIG_ARM_APPENDED_DTB=y
 CONFIG_ARM_ATAG_DTB_COMPAT=y
 CONFIG_CPU_FREQ=y
@@ -33,6 +34,7 @@ CONFIG_CAN_SUN4I=y
 # CONFIG_WIRELESS is not set
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_DMA_CMA=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_ATA=y
 CONFIG_AHCI_SUNXI=y
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] ARM: sunxi_defconfig: Enable CMA
  2018-01-19 13:32 ` Maxime Ripard
@ 2018-01-19 15:08   ` Arnd Bergmann
  -1 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2018-01-19 15:08 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Chen-Yu Tsai, arm-soc, Linux ARM, # 3.4.x

On Fri, Jan 19, 2018 at 2:32 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> The DRM driver most notably, but also out of tree drivers (for now) like
> the VPU or GPU drivers, are quite big consumers of large, contiguous memory
> buffers. However, the sunxi_defconfig doesn't enable CMA in order to
> mitigate that, which makes them almost unusable.
>
> Enable it to make sure it somewhat works.
>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Applied to fixes, thanks!

      Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] ARM: sunxi_defconfig: Enable CMA
@ 2018-01-19 15:08   ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2018-01-19 15:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 19, 2018 at 2:32 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> The DRM driver most notably, but also out of tree drivers (for now) like
> the VPU or GPU drivers, are quite big consumers of large, contiguous memory
> buffers. However, the sunxi_defconfig doesn't enable CMA in order to
> mitigate that, which makes them almost unusable.
>
> Enable it to make sure it somewhat works.
>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Applied to fixes, thanks!

      Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] ARM: sunxi_defconfig: Enable CMA
  2018-01-19 13:32 ` Maxime Ripard
@ 2018-01-20  3:37   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 10+ messages in thread
From: Chen-Yu Tsai @ 2018-01-20  3:37 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: arm-soc, linux-arm-kernel, stable

On Fri, Jan 19, 2018 at 9:32 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> The DRM driver most notably, but also out of tree drivers (for now) like
> the VPU or GPU drivers, are quite big consumers of large, contiguous memory
> buffers. However, the sunxi_defconfig doesn't enable CMA in order to
> mitigate that, which makes them almost unusable.
>
> Enable it to make sure it somewhat works.

IIRC the default size for CMA pretty much limits it to small tablet
screen resolutions. Is this something we want to leave up to the
user?

Thanks
ChenYu

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] ARM: sunxi_defconfig: Enable CMA
@ 2018-01-20  3:37   ` Chen-Yu Tsai
  0 siblings, 0 replies; 10+ messages in thread
From: Chen-Yu Tsai @ 2018-01-20  3:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 19, 2018 at 9:32 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> The DRM driver most notably, but also out of tree drivers (for now) like
> the VPU or GPU drivers, are quite big consumers of large, contiguous memory
> buffers. However, the sunxi_defconfig doesn't enable CMA in order to
> mitigate that, which makes them almost unusable.
>
> Enable it to make sure it somewhat works.

IIRC the default size for CMA pretty much limits it to small tablet
screen resolutions. Is this something we want to leave up to the
user?

Thanks
ChenYu

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] ARM: sunxi_defconfig: Enable CMA
  2018-01-20  3:37   ` Chen-Yu Tsai
@ 2018-01-22  7:34     ` Maxime Ripard
  -1 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2018-01-22  7:34 UTC (permalink / raw)
  To: Chen-Yu Tsai; +Cc: arm-soc, linux-arm-kernel, stable

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

Hi,

On Sat, Jan 20, 2018 at 11:37:28AM +0800, Chen-Yu Tsai wrote:
> On Fri, Jan 19, 2018 at 9:32 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > The DRM driver most notably, but also out of tree drivers (for now) like
> > the VPU or GPU drivers, are quite big consumers of large, contiguous memory
> > buffers. However, the sunxi_defconfig doesn't enable CMA in order to
> > mitigate that, which makes them almost unusable.
> >
> > Enable it to make sure it somewhat works.
> 
> IIRC the default size for CMA pretty much limits it to small tablet
> screen resolutions. Is this something we want to leave up to the
> user?

That's one of the pain points of CMA in our case. The amount of memory
you need depends on the resolution itself, but also the number of
multiple buffers you want to use, and even the number of planes you
want to use.

And then, you have to trade that off with the amount of RAM you have
on your board in order to still have something that's usable.

tl;dr: I don't really see how to define a value good enough for
everyone.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] ARM: sunxi_defconfig: Enable CMA
@ 2018-01-22  7:34     ` Maxime Ripard
  0 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2018-01-22  7:34 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Sat, Jan 20, 2018 at 11:37:28AM +0800, Chen-Yu Tsai wrote:
> On Fri, Jan 19, 2018 at 9:32 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > The DRM driver most notably, but also out of tree drivers (for now) like
> > the VPU or GPU drivers, are quite big consumers of large, contiguous memory
> > buffers. However, the sunxi_defconfig doesn't enable CMA in order to
> > mitigate that, which makes them almost unusable.
> >
> > Enable it to make sure it somewhat works.
> 
> IIRC the default size for CMA pretty much limits it to small tablet
> screen resolutions. Is this something we want to leave up to the
> user?

That's one of the pain points of CMA in our case. The amount of memory
you need depends on the resolution itself, but also the number of
multiple buffers you want to use, and even the number of planes you
want to use.

And then, you have to trade that off with the amount of RAM you have
on your board in order to still have something that's usable.

tl;dr: I don't really see how to define a value good enough for
everyone.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180122/29f29666/attachment.sig>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] ARM: sunxi_defconfig: Enable CMA
  2018-01-22  7:34     ` Maxime Ripard
@ 2018-01-23  6:19       ` Chen-Yu Tsai
  -1 siblings, 0 replies; 10+ messages in thread
From: Chen-Yu Tsai @ 2018-01-23  6:19 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: arm-soc, linux-arm-kernel, stable

On Mon, Jan 22, 2018 at 3:34 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi,
>
> On Sat, Jan 20, 2018 at 11:37:28AM +0800, Chen-Yu Tsai wrote:
>> On Fri, Jan 19, 2018 at 9:32 PM, Maxime Ripard
>> <maxime.ripard@free-electrons.com> wrote:
>> > The DRM driver most notably, but also out of tree drivers (for now) like
>> > the VPU or GPU drivers, are quite big consumers of large, contiguous memory
>> > buffers. However, the sunxi_defconfig doesn't enable CMA in order to
>> > mitigate that, which makes them almost unusable.
>> >
>> > Enable it to make sure it somewhat works.
>>
>> IIRC the default size for CMA pretty much limits it to small tablet
>> screen resolutions. Is this something we want to leave up to the
>> user?
>
> That's one of the pain points of CMA in our case. The amount of memory
> you need depends on the resolution itself, but also the number of
> multiple buffers you want to use, and even the number of planes you
> want to use.
>
> And then, you have to trade that off with the amount of RAM you have
> on your board in order to still have something that's usable.
>
> tl;dr: I don't really see how to define a value good enough for
> everyone.

Yeah, that's what I thought. On the other hand, I don't think any
of the kernelci boards have display enabled? So either way we won't
see any automated tests fail.

ChenYu

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] ARM: sunxi_defconfig: Enable CMA
@ 2018-01-23  6:19       ` Chen-Yu Tsai
  0 siblings, 0 replies; 10+ messages in thread
From: Chen-Yu Tsai @ 2018-01-23  6:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 22, 2018 at 3:34 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi,
>
> On Sat, Jan 20, 2018 at 11:37:28AM +0800, Chen-Yu Tsai wrote:
>> On Fri, Jan 19, 2018 at 9:32 PM, Maxime Ripard
>> <maxime.ripard@free-electrons.com> wrote:
>> > The DRM driver most notably, but also out of tree drivers (for now) like
>> > the VPU or GPU drivers, are quite big consumers of large, contiguous memory
>> > buffers. However, the sunxi_defconfig doesn't enable CMA in order to
>> > mitigate that, which makes them almost unusable.
>> >
>> > Enable it to make sure it somewhat works.
>>
>> IIRC the default size for CMA pretty much limits it to small tablet
>> screen resolutions. Is this something we want to leave up to the
>> user?
>
> That's one of the pain points of CMA in our case. The amount of memory
> you need depends on the resolution itself, but also the number of
> multiple buffers you want to use, and even the number of planes you
> want to use.
>
> And then, you have to trade that off with the amount of RAM you have
> on your board in order to still have something that's usable.
>
> tl;dr: I don't really see how to define a value good enough for
> everyone.

Yeah, that's what I thought. On the other hand, I don't think any
of the kernelci boards have display enabled? So either way we won't
see any automated tests fail.

ChenYu

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-01-23  6:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-19 13:32 [PATCH] ARM: sunxi_defconfig: Enable CMA Maxime Ripard
2018-01-19 13:32 ` Maxime Ripard
2018-01-19 15:08 ` Arnd Bergmann
2018-01-19 15:08   ` Arnd Bergmann
2018-01-20  3:37 ` Chen-Yu Tsai
2018-01-20  3:37   ` Chen-Yu Tsai
2018-01-22  7:34   ` Maxime Ripard
2018-01-22  7:34     ` Maxime Ripard
2018-01-23  6:19     ` Chen-Yu Tsai
2018-01-23  6:19       ` Chen-Yu Tsai

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.