[Mesa-dev] Android + tegra + mesa

2019-01-17 Thread Artyom Bambalov
Hello, guys. I have device with tegra K1(T124). I try to get open source
graphical stack. What I use: mesa 3d(18.2-19.0), libdrm(2.4.96),
drm_hwcomposer(the latest), gbm_gralloc(the latest), 4.19 kernel by
google(tegra drm + nouveau). What I get: normal bootanimatin, but the
system UI is not displaying properly(look at pinned picture). I also tested
the kernel with linux distr and all works fine. So, I wanted to ask is it
possible to get a normal picture on android with nouveau on tegra K1(T124)?
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Android + tegra + mesa

2019-01-18 Thread Artyom Bambalov
Do you have some notes on how to reproduce your setup? I've been meaningto try this out but never found enough time to see it through. Having aset of simple instructions for getting this built and booted would helpreproduce the behavior and debug.My device is xiaomi mipad 1(codename is mocha). It's similar with with shieldtablet(tn8), but uses different lcd panel, pmic(tps65913 like in t114 instead of as3xxx) and some other secondary hardware. My device tree(lineage-16.0 branch): https://github.com/art/android_device_xiaomi_mocha_mainlineMy kernel(android-4.19_mocha-changes branch): https://github.com/Insei/linuxThat said, it looks like you've got a completely white display, whichusually means that you're getting page faults from the SMMU, so maybethat'd be an interesting place to look at. You should be seeing errorsfrom the SMMU in the kernel log in that case.The display can be white or black. It depends on real picture color. There was a brief period where the SMMU wasn't working properly withNouveau, which could be related to this, especially since it was aroundthe timeframe of 4.19. That issue was fixed with this commit:b59fb482b522 ("drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping")which was merged into v4.19, but maybe it's not in the tree from Googlethat you're using (for whatever reason).Come to think of it, that wouldn't really explain the white display,though, since that usually happens on SMMU faults for reads by thedisplay controller. In any case, the kernel log would hopefully containsome clues as to what could be wrong.ThierryI attached dmesg. It contains pretty much nouveau errors. [0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 
4.19.13-4.19_mocha-build27-17834-g07c6e936c512-dirty (art@eOS-5.0-Juno) 
(gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision 
d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05)) #1 SMP 
PREEMPT Sat Jan 12 00:27:20 MSK 2019
[0.00] CPU: ARMv7 Processor [413fc0f3] revision 3 (ARMv7), cr=10c5387d
[0.00] CPU: div instructions available: patching division code
[0.00] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[0.00] OF: fdt: Machine model: NVIDIA Tegra124 MOCHA
[0.00] Memory policy: Data cache writealloc
[0.00] cma: Reserved 64 MiB at 0xf940
[0.00] On node 0 totalpages: 513024
[0.00] Normal zone: 1728 pages used for memmap
[0.00] Normal zone: 0 pages reserved
[0.00] Normal zone: 196608 pages, LIFO batch:63
[0.00] HighMem zone: 316416 pages, LIFO batch:63
[0.00] psci: probing for conduit method from DT.
[0.00] psci: PSCIv0.2 detected in firmware.
[0.00] psci: Using standard PSCI v0.2 function IDs
[0.00] psci: MIGRATE_INFO_TYPE not supported.
[0.00] random: get_random_bytes called from start_kernel+0xa0/0x49c 
with crng_init=0
[0.00] percpu: Embedded 17 pages/cpu @(ptrval) s40844 r8192 d20596 
u69632
[0.00] pcpu-alloc: s40844 r8192 d20596 u69632 alloc=17*4096
[0.00] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[0.00] Built 1 zonelists, mobility grouping on.  Total pages: 511296
[0.00] Kernel command line: vpr_resize androidboot.selinux=permissive 
androidboot.hardware=tn8 buildvariant=userdebug tegraid=40.1.1.0.0 
mem=2006M@2048M memtype=0 tsec=32M@4064M 
otf_key=df908e015017cc8c8111a390a434436e tzram=4M@4058M ddr_die=1024M@2048M 
ddr_die=1024M@3072M section=128M commchip_id=0 usb_port_owner_info=0 
lane_owner_info=0 emc_max_dvfs=0 androidboot.serialno=1413E094 
androidboot.cpuid=17409C1470C000BFD00C0 androidboot.commchip_id=0 
androidboot.modem=none bl_version=1.0 syspart=system  touch_id=0@2150632068 
video=tegrafb no_console_suspend=1 console=none debug_uartport=hsport 
usbcore.old_scheme_first=1 lp0_vec=2896@0xfdfff000 
tegra_fbmem=25296896@0xad012000 nvdumper_reserved=0xfd70 core_edp_mv=1150 
core_edp_ma=4000 pmuboard=0x06c8:0x03e8:0x00:0x44:0x04 
displayboard=0x8038:0x:0x00:0x00:0x00 power_supply=Battery 
board_info=0x06f4:0x044c:0x03:0x41:0x07 tegraboot=sdmmc gpt gpt_sector=4095 
modem_id=0 androidboot.hwversion=1 panel_id=32 android.kerneltype=norma
[0.00] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[0.00] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[0.00] Memory: 1946400K/2052096K available (12288K kernel code, 982K 
rwdata, 4656K rodata, 1024K init, 304K bss, 40160K reserved, 65536K 
cma-reserved, 1200128K highmem)
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xffc0 - 0xfff0   (3072 kB)
[0.00] vmalloc : 0xf080 - 0xff80   ( 240 MB)
[0.00] lowmem  : 0xc000 - 0xf000   ( 768 MB)
[0.00] pkmap   : 0xbfe0 - 0xc000   (   2 MB)
[0.00] modules : 0xbf00 - 0xbfe0   (  14 MB)
[0.00] .te