ChanServ changed the topic of #linux-rockchip to: Rockchip development discussion | IRC log http://irclog.whitequark.org/linux-rockchip | Community GH https://github.com/linux-rockchip | Rockchip GH https://github.com/rockchip-linux | ML https://groups.google.com/group/linux-rockchip
field^Zzz4 has quit [Ping timeout: 250 seconds]
imsherlock has quit [Read error: Connection reset by peer]
imsherlock has joined #linux-rockchip
fALSO has quit [Ping timeout: 276 seconds]
stikonas has quit [Remote host closed the connection]
stikonas_ has quit [Remote host closed the connection]
<TomTheDragon> AndreVallestero: I've gotten mpp and vanilla ffmpeg to build
<TomTheDragon> native build, though
<AndreVallestero> TomTheDragon: And it properly uses the VPU?
<TomTheDragon> VPU yes, RGA no. I'd love an rga_scale filter
<TomTheDragon> I can only use mpv with the framebuffer egl fullscreen, which is very limiting.
<AndreVallestero> What are your build flags for mpp and ffmpeg. Also did you get the "aarch64 is unknown" error?
<TomTheDragon> I built mpp for debian
<TomTheDragon> so check out the rules file for that
<TomTheDragon> #define FFMPEG_CONFIGURATION "--enable-rkmpp --enable-nonfree --enable-opengl --enable-libdrm --enable-version3 --enable-shared --disable-static --prefix=/opt/rkmpp --enable-openssl"
<TomTheDragon> I put all my custom stuff in /opt/rkmpp. you may choose to do otherwise, but I like having my distro ffmpeg as a fallback
<TomTheDragon> I used latest stable, 4.2.1
<AndreVallestero> This is for the rk3399 correct?
<TomTheDragon> any rkmpp but yes I am on rk3399
<TomTheDragon> also, are you using 4.4 kernel?
<AndreVallestero> I'm on kernel 5.4
<AndreVallestero> Manjaro ARM
<TomTheDragon> Wow... nice. My rockpro64 did not work with PCIe and audio using Armbian 5.4
<TomTheDragon> and I had some display setup issues.. but may be because I'm using a cheap chinese HDMI to VGA
<AndreVallestero> I'm getting an ioctl segfault and vcodec / device identification errors. Not really sure what's causing it but I suspect it has somethign to do with VPU drivers.
<AndreVallestero> I have all my work posted here: https://github.com/AndreVallestero/vidware
<TomTheDragon> there may still be mainline issues
<AndreVallestero> There are several branches for the rk3399 since I'm not sure what's causing the errors.
<AndreVallestero> Yeah, the VPU drivers aren't even in mainline. They're in staging.
<TomTheDragon> ah, I see
<TomTheDragon> yeah, it's kernel side issues
<TomTheDragon> I'm hoping either the mainline will improve, and rockchip will rebase to a later kernel
<AndreVallestero> Yeah, me too.
<TomTheDragon> but not surprising... rockchip is not really targeted to mobile devices and is considered a budget processor
<AndreVallestero> I don't even know how to verify for sure if my issues are within the VPU drivers. lsmod shows that hantro_vpu is loaded. I feel like h264 decoding would have been the first thing they had working so I'm optimistic that the issue is on my end.
<TomTheDragon> what is your actual board?
<AndreVallestero> Pinebook Pro
<TomTheDragon> ah, that's definitely a different board from mine. have others gotten it working on specifically the Pinebook Pro?
<TomTheDragon> with mainline
<AndreVallestero> Not that I know of.
<AndreVallestero> There are a few people trying to get it working on Armbian but as far as I know, I'm the only one working on mpp + ffmpeg on the PBP for Manjaro ARM
<hanetzer> I wonder about that a bit. I wonder how pants it would be to port coreboot to those
<TomTheDragon> I've found that bcm made things really easy compared to rockchip
<hanetzer> bcm? like, broadcom?
<TomTheDragon> yeah
<hanetzer> fuck those guys
<TomTheDragon> however, the rk3399 is pretty impressive compared to any of the raspberry pi SOCs
<AndreVallestero> That's cause Broadcom used v4l2 and OMX which already has community support
<AndreVallestero> MPP is something rockchip made for themselves, no one else uses it so it has no community other than rockchip device owners
<AndreVallestero> I would have prefered if they used v4l2 and OMX since we would have been able to leverage alot of community knowledge and infrastructure
<TomTheDragon> the RGA would be awesome with proper software support. it's pretty limited, but it's actually capable of 2D acceleration - a rarity for any machine with 3D
<hanetzer> true on that front, but the state of foss for the raspi stuff's boot stack is next to nonexistant last I looked.
<TomTheDragon> that's true
<hanetzer> mpp at least has open code someone can use to derive a proper v4l2 setup
<TomTheDragon> for playing 4k videos right now all I can really do is set --vf="fps=fps=15" in mpv.
<hanetzer> aside from stuff not on the soc itself rockchip based devices have some of the best fossability of anything out there. yeah, there's some vendor shitware but its at least open shitware :P
<TomTheDragon> yeah, that's true
<hanetzer> like, my gru chromebook. only thing on there which is not on a fast-track to foss is the wifi
<TomTheDragon> anyone know if there's a backport of panfrost GPU kernel-side stuff?
<hanetzer> backport to what?
<TomTheDragon> backport to a legacy vendor kernel
<hanetzer> what do you need from the vendor kernel?
<hanetzer> it may be easier to front-port that ;P
<TomTheDragon> well, things might have improved since I tried mainline, but I had no audio and no PCIe
<TomTheDragon> No audio is kind of problematic, and PCIe is -the- reason I picked the rockchip
<AndreVallestero> TomTheDragon: Have you benchmarked your system with ffmpeg?
<TomTheDragon> how?
<TomTheDragon> using rkmpp?
<AndreVallestero> ffmpeg -benchmark -vcodec h264_rkmpp -i $INPUTFILE -f null -
<AndreVallestero> I use Big Buck Bunny native res 60fps
<AndreVallestero> as my benchmark file
<TomTheDragon> oh, it's turbo fast with -f null. because it's NULL!
<TomTheDragon> it doesn't go anywhere. doesn't have to convert to a compatible color format, or scale, or anything
<AndreVallestero> Which input file did you use?
<hanetzer> hehehe. yeah. /dev/null encryption is the best ;p
<TomTheDragon> it doesn't even have to -download- the frames from the vpu!
<AndreVallestero> Oh wait, it needs -map 0:v:0
<TomTheDragon> AndreVallestero: what's that? maybe that would improve things?
<AndreVallestero> I'm not sure what map does but people use it for benchmarking
<urjaman> as far as i know, the VPU doesnt have a seperate memory so saying "download" about reading it's output seems weird
<TomTheDragon> not sure what hwdownload does, but it seems to be necessary for something
<TomTheDragon> mpv always claims "HW-downloading" when I display to x11egl
<TomTheDragon> maybe that is necessary for doing any manipulation on the frame, like cropping?
<TomTheDragon> let me show an example of -f null and output to an actual video like AVI
<urjaman> well there can be a bunch of reasons it wouldnt be able to zero-copy it...
<urjaman> but i have no experience with the VPU so *shrug*
<urjaman> waiting for the RK3288 patches to get to mainline :P
<hanetzer> AndreVallestero: map maps streams to streams.
<TomTheDragon> what's that actually mean, though
<TomTheDragon> what if I only have a video stream and an audio stream in my input - which is my most common case
<hanetzer> hard to explain... like, some video players (vlc), if I record game audio and mike audio as separate streams for editing purposes, it thinks of stream1 as being lang1 and stream2 as being lang2
<hanetzer> so, ffmpeg the raw in and move the audio streams around to import both into kdenlive and cut the duplicated video stream
<hanetzer> erm, mic
<TomTheDragon> here's the issue I get when I try a simple transcode: https://termbin.com/rcakn
<AndreVallestero> with software decoding only I get ~ 23fps on a 4k60 h264 video.
<AndreVallestero> ffmpeg -benchmark -i bbb_sunflower_native_60fps_normal.mp4 -map 0:v:0 -f null -
<AndreVallestero> the mali v550 should able to do 4k at 120fps
<TomTheDragon> Apparently, ffmpeg wants to do a pixel format conversion, which involves a copy.
<TomTheDragon> I think that might be why my real performance is so much lower than benchmark.
<wens> not all rk3399 defconfigs have CONFIG_ROCKCHIP_SPL_RESERVE_IRAM updated :/
<wens> couldn't this have a sane default for RK3399 in Kconfig?
vstehle has quit [Ping timeout: 268 seconds]
AndreVallestero has quit [Remote host closed the connection]
LargePrime has joined #linux-rockchip
LargePrime has quit [Quit: Leaving]
vstehle has joined #linux-rockchip
PhoenixMage has joined #linux-rockchip
elektirnis has quit [Read error: Connection reset by peer]
elektirnis has joined #linux-rockchip
elektirnis has quit [Read error: Connection reset by peer]
elektirnis has joined #linux-rockchip
elektrinis has joined #linux-rockchip
elektirnis has quit [Ping timeout: 245 seconds]
elektrinis has quit [Read error: Connection reset by peer]
elektrinis has joined #linux-rockchip
_whitelogger has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 268 seconds]
kevery1 is now known as kevery
elektirnis has joined #linux-rockchip
elektrinis has quit [Ping timeout: 265 seconds]
matthias_bgg has joined #linux-rockchip
ldevulder_ is now known as ldevulder
field^Zzz4 has joined #linux-rockchip
<PhoenixMage> Anyone been able to get the kernel boot messages outputted to the console on a Rock Pi 4 with a mainline u-boot? It has an RK3399
<sigmaris> PhoenixMage: by console do you mean serial console? Do the u-boot messages appear on there?
<PhoenixMage> sigmaris: Yeah serial console, I can interact with u-boot on it fine
<PhoenixMage> The second it starts the kernel I lose contact
<sigmaris> what arguments do you have on the kernel command line?
<PhoenixMage> earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1 coherent_pool=1m earlyprintk console=ttyS2,1500000n8 rw root=PARTUUID=B921B045-1DF0-41C3-AF44-4C6F280D3FAE rootfstype=ext4 init=/sbin/init rootwait
<PhoenixMage> I got that from the wiki
<PhoenixMage> ttyFIQ0 doesnt work either though
<PhoenixMage> Which is what it comes up as in u-boot
<sigmaris> I have a rockpro64 rather than a rock pi 4, and I use earlycon=uart8250,mmio32,0xff1a0000 console=ttyS2,1500000n8 too, which works for me...
<PhoenixMage> Makes me think I am missing something from my kernel but I have the same issue using their kernel
<sigmaris> I've been using mainline 5.3 and 5.4 kernels
<PhoenixMage> I just compiled for 5.4
<sigmaris> I can't remember if having that in the DT obsoletes the console=ttyS2,1500000n8 argument or not, I have both
<sigmaris> Also another thing I'd try is removing the earlyprintk arg, since I don't have that
<PhoenixMage> I do have a line like that
<PhoenixMage> ok will try that
<sigmaris> I do remember I tried one USB-UART dongle and it couldn't really handle the 1.5Mbps baud rate that seems to be standard for rockchip stuff
<PhoenixMage> No dice
<sigmaris> so I switched to using the UART on a Raspberry Pi and using picocom, which works fine
<sigmaris> hmm well short of trying other UARTs as the "client" and maybe trying picocom I'm out of ideas, sorry
<PhoenixMage> What u-boot command should I be using for booting? booti?
<PhoenixMage> Thanks anyway
<PhoenixMage> Do you have CONFIG_TTY_PRINTK set in your kernel?
<sigmaris> Nope, # CONFIG_TTY_PRINTK is not set
<sigmaris> I just use the default command for booting in u-boot, "run distro_bootcmd"
<PhoenixMage> thanks
<sigmaris> afaict distro_bootcmd looks on eMMC then SD card for /boot/extlinux.conf, boot.scr.uimg, boot.scr, and EFI binaries
<sigmaris> sorry, that should be /boot/extlinux/extlinux.conf. Anyway I put that file in place in the root partition and it reads the kernel, cmdline, initrd etc from there
<PhoenixMage> Yeah have the same issue if I boot from there, I dont have anything but extlinux.conf in there though
<PhoenixMage> Did you just write the idbloader.img and u-boot.itb for your u-boot?
<sigmaris> yeah, I build u-boot and get idbloader.img and u-boot.itb, write idbloader.img to sector 64, and write u-boot.itb to sector 16384
<sigmaris> on the eMMC or sdcard
<PhoenixMage> ok so I have done the same
<PhoenixMage> hmmm
<PhoenixMage> Odd
<sigmaris> if it helps my mainline u-boot build script is here: https://github.com/sigmaris/u-boot/blob/ci-armbian-atf-patches/azure-pipelines.yml
<PhoenixMage> cheers
<sigmaris> then I use this debos recipe to build the full SD card image: https://github.com/sigmaris/rockpro64-img-build/blob/master/recipes/buster-rockpro64.yaml
<PhoenixMage> Do you need arm-trusted-firmware if you are using u-boot mainline? I thought you only needed it for miniloader?
<sigmaris> It is always needed
<PhoenixMage> What would happen if you didnt have it?
<PhoenixMage> Theoritically :p
<sigmaris> at the very least, some basic functions like rebooting wouldn't work, I am not sure if the board would boot at all.
<sigmaris> Never actually tried leaving it out as I'm pretty sure it's required
<PhoenixMage> Well I havent compiled it and I get u-boot working, I wonder if my kernel is not booting at all and that is why
<sigmaris> yes I would suspect without ATF the kernel will not boot properly at all
chewitt has joined #linux-rockchip
<PhoenixMage> Interestingly now I dont get the option to get the u-boot command line
<sigmaris> do you get the kernel booting properly instead? :)
<sigmaris> assuming you've built u-boot with ATF now
<PhoenixMage> No I dont think so and yes
<sigmaris> I think once u-boot proper loads, you should see a "Hit any key to stop autoboot:" with a countdown
<PhoenixMage> Yeah which it didnt once I added the ATF
<PhoenixMage> Will try recompiling
<sigmaris> yeah sounds like something is wrong with your u-boot build now
<PhoenixMage> I get "Trying to boot from MMC1" then nothing now
<PhoenixMage> fml
<sigmaris> That message's from the u-boot SPL, I think
<PhoenixMage> It is
<sigmaris> I do remember something about changes in the memory location of ATF requiring some changes in u-boot's memory layout config
<PhoenixMage> Interesting dl31 wont recompile if you have the var set
<sigmaris> this change was needed to u-boot to make it compatible: https://lists.denx.de/pipermail/u-boot/2019-October/385958.html
<sigmaris> I would try building from latest master branch of both, since I'm more confident in them working together
<PhoenixMage> I am compiling from both latest gits
warpme_ has joined #linux-rockchip
<PhoenixMage> Seems that commit may not have been merged though
<PhoenixMage> into bl21
<PhoenixMage> bl31
<PhoenixMage> Actually I didnt pull it from github
<robmur01> IIRC "MMC1" means eMMC, and mainline doesn't seem to like booting off that at the moment
<robmur01> I hit the same thing on NanoPC-T4; moving everything onto SD card with "same-as-spl" boot order worked for me
<PhoenixMage> I think its board dependent
<PhoenixMage> I know on Rock Pi 4 mmc1 is definitely uSD
<PhoenixMage> On my Olimex Lime2 it is emmc
matthias_bgg has quit [Quit: Leaving]
<sigmaris> fwiw on my rockpro64, I am using eMMC, I see "Trying to boot from MMC2" from the SPL, and then u-boot proper calls the eMMC "mmc0", quite confusing
<sigmaris> but it does boot successfully off eMMC using mainline
chewitt has quit [Quit: Zzz..]
<sigmaris> oh and then to complete the picture, Linux calls the eMMC "mmc1"
<robmur01> ah, right, spl_decode_boot_device() also confirms that my memory is wrong :)
<PhoenixMage> I have the emmc chips I just havent installed them yet
matthias_bgg has joined #linux-rockchip
<PhoenixMage> And I have liftoff
<PhoenixMage> Thanks sigmaris it was an ATF problem
<sigmaris> great, glad it's working :)
<PhoenixMage> Me too, was doing my head in lol
<PhoenixMage> Next challenge is to get it in SPI
<sigmaris> ahh, I was trying that at the weekend, with no luck :(
<sigmaris> with a *lot* of hacking I got it to load the SPL, but then it hangs loading ATF or u-boot.itb from SPI
<sigmaris> I saw this post https://forum.loverpi.com/discussion/861/upstream-u-boot-status and decided I'd wait for someone more competent than me to implement it in upstream for roc-rk3399-pc
<sigmaris> and then just try and copy that for rockpro64 :D
<PhoenixMage> I am pretty sure its working for Rock Pi 4 because you can now boot from NVMe if you have SPI
chewitt has joined #linux-rockchip
nashpa has quit [Ping timeout: 268 seconds]
JohnDoe_71Rus has joined #linux-rockchip
nashpa has joined #linux-rockchip
<TomTheDragon> is there any x11 video playback that performs well for 4k? not 4k display resolution, but 4k original video resolution.
chewitt has quit [Quit: Zzz..]
<tuxd3v> you guys already have uboot + atf booting rk3399?
<tuxd3v> I am reading correctly?
<sigmaris> tuxd3v: using mainline of both, yes
nsaenz has joined #linux-rockchip
nsaenz has quit [Client Quit]
matthias_bgg has quit [Read error: Connection reset by peer]
matthias_bgg has joined #linux-rockchip
daniels has quit []
daniels has joined #linux-rockchip
elektrinis has joined #linux-rockchip
elektirnis has quit [Ping timeout: 245 seconds]
imsherlock has quit []
nsaenz has joined #linux-rockchip
nsaenz has quit [Client Quit]
imsherlock has joined #linux-rockchip
warpme_ has quit [Quit: Connection closed for inactivity]
matthias_bgg has quit [Quit: Leaving]
asciilifeform has joined #linux-rockchip
asciilifeform has left #linux-rockchip [#linux-rockchip]
stikonas has joined #linux-rockchip
<tuxd3v> sigmaris, very nice :)
<tuxd3v> thanks
warpme_ has joined #linux-rockchip
JohnDoe_71Rus has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
tuxd3v has quit [Quit: Leaving]
tuxd3v has joined #linux-rockchip
<tuxd3v> sigmaris, I sill have problems with mainline atf+ uboot
<tuxd3v> I am flashing to the stadard addresses..
ldevulder_ has joined #linux-rockchip
<tuxd3v> stadard -> standard
ldevulder has quit [Ping timeout: 268 seconds]