Skip to contentSkip to conversation

arm64: defconfig: Increase CMA size for VC4

PATCH New Stefan Wahren 3 participants 6 messages May 2, 2018 – May 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: defconfig: Increase CMA size for VC4

The VC4 needs more memory than the default setting (16 MB):

vc4-drm soc:gpu: swiotlb: coherent allocation failed, size=16777216 [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
vc4_v3d 3fc00000.v3d: Failed to allocate memory for tile binning: -12.
You may need to enable CMA or give it more memory.
vc4-drm soc:gpu: failed to bind 3fc00000.v3d (ops vc4_v3d_ops [vc4]): -12 vc4-drm soc:gpu: master bind failed: -12
vc4-drm: probe of soc:gpu failed with error -12

So increase the value to 32 MB and fix this issue.

---

Hi,
i known it's a little bit late for 4.18 or should i rebase for 4.17?

Regards

 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index 7ca583e..0e1f6d7 100644
@@ -172,6 +172,7 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DMA_CMA=y
+CONFIG_CMA_SIZE_MBYTES=32
 CONFIG_MTD=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_M25P80=y
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 arm64: defconfig: Increase CMA size for VC4

Quoted 10 lines · Stefan Wahren

The VC4 needs more memory than the default setting (16 MB):

vc4-drm soc:gpu: swiotlb: coherent allocation failed, size=16777216 [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
vc4_v3d 3fc00000.v3d: Failed to allocate memory for tile binning: -12.
You may need to enable CMA or give it more memory.
vc4-drm soc:gpu: failed to bind 3fc00000.v3d (ops vc4_v3d_ops [vc4]): -12 vc4-drm soc:gpu: master bind failed: -12
vc4-drm: probe of soc:gpu failed with error -12

Quoted 3 lines

So increase the value to 32 MB and fix this issue.

If there was a way to check how big the CMA pool is, then we could probably have V3D disable itself when the pool was too small. It's not like V3D rendering is going to actually *work* with just a 32mb pool to play in.

That said, I'd also be fine with this patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180503/04dd6dce/attachment.sig>

#2 lore raw

PATCH 1/1 arm64: defconfig: Increase CMA size for VC4

Hi Florian,

Quoted 17 lines

Eric Anholt <[email protected]> hat am 3. Mai 2018 um 23:20 geschrieben:

Quoted 12 lines · Stefan Wahren

The VC4 needs more memory than the default setting (16 MB):

vc4-drm soc:gpu: swiotlb: coherent allocation failed, size=16777216 [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
vc4_v3d 3fc00000.v3d: Failed to allocate memory for tile binning: -12.
You may need to enable CMA or give it more memory.
vc4-drm soc:gpu: failed to bind 3fc00000.v3d (ops vc4_v3d_ops [vc4]): -12 vc4-drm soc:gpu: master bind failed: -12
vc4-drm: probe of soc:gpu failed with error -12

So increase the value to 32 MB and fix this issue.

Quoted 8 lines
Quoted 1 line

If there was a way to check how big the CMA pool is, then we could probably have V3D disable itself when the pool was too small. It's not like V3D rendering is going to actually *work* with just a 32mb pool to play in.

That said, I'd also be fine with this patch.

should i rebase my patch?

#3 lore raw

PATCH 1/1 arm64: defconfig: Increase CMA size for VC4

Quoted 27 lines · Stefan Wahren

Hi Florian,

Quoted 1 line

Eric Anholt <[email protected]> hat am 3. Mai 2018 um 23:20

geschrieben:

Quoted 7 lines
Quoted 3 lines · Stefan Wahren

The VC4 needs more memory than the default setting (16 MB):

vc4-drm soc:gpu: swiotlb: coherent allocation failed,

size=16777216

Quoted 2 lines
Quoted 2 lines

[drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
vc4_v3d 3fc00000.v3d: Failed to allocate memory for tile binning:

-12.

Quoted 2 lines
Quoted 2 lines

You may need to enable CMA or give it more memory.
vc4-drm soc:gpu: failed to bind 3fc00000.v3d (ops vc4_v3d_ops

[vc4]): -12

Quoted 9 lines
Quoted 6 lines

vc4-drm soc:gpu: master bind failed: -12
vc4-drm: probe of soc:gpu failed with error -12

So increase the value to 32 MB and fix this issue.

If there was a way to check how big the CMA pool is, then we could probably have V3D disable itself when the pool was too small. It's

Quoted 8 lines

not

Quoted 1 line

like V3D rendering is going to actually *work* with just a 32mb pool

to

Quoted 3 lines

play in.

That said, I'd also be fine with this patch.

should i rebase my patch?

I was expecting Eric to pick it up, but I can do this as well sorry about the miscommunication here. Let me queue this up and update the defconfig-arm64 pull request with this commit.

Signature · 1 line
Florian
#4 lore raw

PATCH 1/1 arm64: defconfig: Increase CMA size for VC4

In reply to Stefan Wahren

Le 05/02/18 ? 14:31, Stefan Wahren a ?crit?:

Quoted 10 lines

The VC4 needs more memory than the default setting (16 MB):

vc4-drm soc:gpu: swiotlb: coherent allocation failed, size=16777216 [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
vc4_v3d 3fc00000.v3d: Failed to allocate memory for tile binning: -12.
You may need to enable CMA or give it more memory.
vc4-drm soc:gpu: failed to bind 3fc00000.v3d (ops vc4_v3d_ops [vc4]): -12 vc4-drm soc:gpu: master bind failed: -12
vc4-drm: probe of soc:gpu failed with error -12

Quoted 3 lines

So increase the value to 32 MB and fix this issue.

Applied to defconfig-arm64/next, thanks!

Signature · 1 line
Florian
#5 lore raw

PATCH 1/1 arm64: defconfig: Increase CMA size for VC4

Quoted 15 lines

Florian Fainelli <[email protected]> hat am 13. Mai 2018 um 18:58 geschrieben:

Le 05/02/18 ? 14:31, Stefan Wahren a ?crit?:

Quoted 10 lines

The VC4 needs more memory than the default setting (16 MB):

vc4-drm soc:gpu: swiotlb: coherent allocation failed, size=16777216 [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
vc4_v3d 3fc00000.v3d: Failed to allocate memory for tile binning: -12.
You may need to enable CMA or give it more memory.
vc4-drm soc:gpu: failed to bind 3fc00000.v3d (ops vc4_v3d_ops [vc4]): -12 vc4-drm soc:gpu: master bind failed: -12
vc4-drm: probe of soc:gpu failed with error -12

Quoted 7 lines
Quoted 3 lines

So increase the value to 32 MB and fix this issue.

Applied to defconfig-arm64/next, thanks!

Signature · 1 line
Florian

Thank you, i will add a note next time.

Stefan