Letux Kernel

Issue 945: etnaviv on OMAP5 not working with LPAE/4GB

Reported by daveshah, Jun 18, 2020

I have a WIP patch set for GC320 support for the OMAP5 and other 
improvements to enable xf86-video-armsoc-omap5: 
https://github.com/daveshah1/pyra-kernel-devel/compare/letux-5.6.y-da
ve

One of the major last issues is that the GC320 only works reliably 
on the 2GB, non-LPAE kernel. On a 4GB Prya with LPAE kernel, the 
pattern of allocations by etnaviv (a mix of small and large buffers, 
with some long-lasting small ones) cause the swiotlb to fragment and 
then swiotlb allocations to fail, crashing the driver.

Ideally etnaviv would just allocate from the lowest 2GB so the 
swiotlb performance hit isn't taken either.

Commit b72af445cd38a44553a5bcfcce5676155dcffcbb in 5.7 ( 
drm/etnaviv: request pages from DMA32 zone when needed) looks 
related, but aTc tested cherry-picking this onto the 5.6 tree on a 
4GB Pyra and it caused the etnaviv driver to not probe at all. I 
will need to investigate this further when I have Pyra hardware.

Comment 1 by daveshah, Jun 25, 2020

I tried to replicate the issue on my uEVM by creating a memory hole 
with some memory above the 4GB marker:

mem=900M@0x80000000 mem=500M@0x300000000 on the kernel command line

The above patch from 5.7 does seem to make the issue go away 
(whereas I can replicate the issue without that patch), although it 
wasn't a very conclusive test as something caused the kernel to go 
haywire and start corrupting my root filesystem (so don't try this 
at home!). But it remains a mystery why this patch caused the driver 
not to probe on the Pyra hardware.

Comment 2 by daveshah, Jul 23, 2020

Cherry-picking the above commit does seem to make it work on my 
Pyra, too. hns, please could you apply this to letux-5.6.y ?

Comment 3 by Nikolaus Schaller, Jul 23, 2020

"omap5: Enable etnaviv GC320 2D acceleration" is already 
picked into letux-5.6.y and letux-5.6.19:

https://git.goldelico.com/?p=letux-kernel.git;a=shortlog;h=refs/heads
/letux-5.6.y

Comment 4 by daveshah, Jul 23, 2020

Yeah, the other commit that is needed is "drm/etnaviv: request 
pages from DMA32 zone when needed" from upstream 5.7 in order 
to fix the issue with LPAE.

Created: 4 years 7 months ago by daveshah

Updated: 4 years 5 months ago

Status: New

Followed by: 1 person

Labels:
Type:Defect
Priority:Medium