mmind00 changed the topic of #linux-rockchip to: Rockchip development discussion | public log at https://libera.irclog.whitequark.org/linux-rockchip
naoki has joined #linux-rockchip
warpme has joined #linux-rockchip
warpme has quit [Ping timeout: 250 seconds]
qschulz has quit [Remote host closed the connection]
stikonas has quit [Remote host closed the connection]
qschulz has joined #linux-rockchip
<Dex2x> This was a good write up I think was shared on armbian with me https://github.com/ThomasKaiser/Knowledge/blob/master/articles/A1_and_A2_rated_SD_cards.md
warpme has joined #linux-rockchip
<Dex2x> dsimic, seems there is support https://forum.odroid.com/viewtopic.php?f=52&p=344423
warpme has quit [Ping timeout: 258 seconds]
warpme has joined #linux-rockchip
warpme has quit [Ping timeout: 250 seconds]
warpme has joined #linux-rockchip
warpme has quit [Ping timeout: 258 seconds]
sigmaris has quit [Server closed connection]
sigmaris has joined #linux-rockchip
warpme has joined #linux-rockchip
warpme has quit [Ping timeout: 260 seconds]
hexdump01 has quit [Ping timeout: 256 seconds]
hexdump01 has joined #linux-rockchip
warpme has joined #linux-rockchip
warpme has quit [Ping timeout: 250 seconds]
warpme has joined #linux-rockchip
warpme has quit [Ping timeout: 258 seconds]
warpme has joined #linux-rockchip
warpme has quit [Ping timeout: 244 seconds]
warpme has joined #linux-rockchip
warpme has quit [Ping timeout: 255 seconds]
<dsimic> Dex2x: I'm happy to help :)
<dsimic> I think I read the ThomasKaiser's article a while ago, it's a nice one
<dsimic> I'm unable to access the Odroid forum, for whatever reason... any chances for a summary, please?
<dsimic> is it, maybe, something like https://forums.raspberrypi.com/viewtopic.php?t=367459 ?
<dsimic> I'm not really sure what's going on there, and how can that apply to A2-rated cards... perhaps someone got the CQE mixed up with the host-side support that's limited to the controller support and eMMC chips only
<dsimic> there's been work to have it supported for A2-rated cards as well, but I'm unaware of that work progressing to the point where support is actually available in the mainline kernel
<dsimic> FTR, here's what I see for an eMMC chip, regarding the RPi forum thread linked above:
<dsimic> [ +0.064119] mmc2: Command Queue Engine enabled
<dsimic> [ +0.000028] mmc2: new HS200 MMC card at address 0001
<dsimic> [ +0.000772] mmcblk2: mmc2:0001 DA4128 116 GiB
warpme has joined #linux-rockchip
warpme has quit [Ping timeout: 258 seconds]
warpme has joined #linux-rockchip
warpme has quit [Ping timeout: 258 seconds]
warpme has joined #linux-rockchip
naoki has quit [Quit: naoki]
psydroid2 has joined #linux-rockchip
_walter_32 has joined #linux-rockchip
walter has quit [Ping timeout: 256 seconds]
_walter_32 has quit [Quit: Konversation terminated!]
walter has joined #linux-rockchip
walter has joined #linux-rockchip
raster has joined #linux-rockchip
Kwiboo has quit [Server closed connection]
Kwiboo has joined #linux-rockchip
maz has quit [Server closed connection]
maz has joined #linux-rockchip
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stikonas has joined #linux-rockchip
<diederik> unfortunately the improved patches for VDPU346 (rk3568) did not result in improvements on my tests :-/
chewitt has joined #linux-rockchip
<chewitt> diederik I've seen the same
<chewitt> so perhaps there are some register differences
<diederik> Ha, exactly what I was thinking about :)
<chewitt> I'll clone/adapt the h264/hevc/regs files and push an update to my branch
<chewitt> no initial functional change, but then we have something to experiment with
<diederik> ok
dsimic has quit [Ping timeout: 260 seconds]
stikonas has quit [Remote host closed the connection]
dsimic has joined #linux-rockchip
<Dex2x> dsimic, so it seems that there is support for A2 basically
<Dex2x> dsimic, on the edge kernel, but I think I need to relook, if it wasn't for the emmc on the board
<Kwiboo> chewitt, diederik: rk3568 may need a small hack to fix some decoding hw issue, see https://github.com/rockchip-linux/kernel/blob/develop-6.6/drivers/video/rockchip/mpp/hack/mpp_rkvdec2_hack_rk3568.c commit mention "Fix 3568 cabac/cavlc switch issue"
<Kwiboo> "workaround for rk356x, fix the hw bug of cabac/cavlc switch only in h264d"
<chewitt> hmm.. nice :)
<chewitt> so far I've not noticed any issues with playback, other than it seems limited in the bitrates it supports
<chewitt> but 3576 is the same
<diederik> I still see massive frame drops with BBB in 1080p in both x264 and x265 (>2000 in first 60 seconds)
<diederik> but great that there is a *known* issue ... and a 'fix'
<chewitt> I've not seen that at all
<chewitt> all your dodgy samples play :)
<diederik> My testing was on Debian with sway and a patched ffmpeg+mpv, so that could play a factor. Haven't tried it with LE, but previously I saw problems which were not or no where near as severe on LE
<Kwiboo> with vendor kernel on rk3568 the mpp driver will use devfreq/opp table to change clock rates from 297mhz to 400mhz, could be something that is needed for higher bitrates?
<diederik> I'm not as well versed in LE so I only detect things when there are visual artifacts. When playing with mpv on sway, mpv directly reports the frame drops (and possible audio sync issues)
<chewitt> Kwiboo I tried up-clocking the vdec but that didn't seem to have a noticeable effect
<chewitt> I've also spotted the two sets of rates
<chewitt> they don't appear to do that for 3576 though, it only has a single set, and same on 3588 (although no issue there)
catcream has quit [Server closed connection]
catcream has joined #linux-rockchip
<diederik> OTOH, my testing on rk3588 with amazing results was on the same setup, so that indicates the different 'environment' is not the (big) differentiator
franoosh has joined #linux-rockchip
_walter_32 has joined #linux-rockchip
walter has quit [Ping timeout: 244 seconds]
<dsimic> Dex2x: I'm not sure where does the support come from? any chances for summing up what you read about it?
<dsimic> what's written in the RPi forum thread, for example, is pretty much someone mixing the things up
_walter_32 has quit [Quit: Konversation terminated!]
walter has joined #linux-rockchip
franoosh has quit [Remote host closed the connection]
<Dex2x> well I need to verify, and see if I see that CQ show up in dmesg with an A2 card, it could just be in odroid , the forum linked to this https://github.com/tobetter/linux/blob/odroid-5.15.y/drivers/mmc/core/sd.c#L1538
<dsimic> nah, that's not it, see commit 045d705dc1fb (mmc: core: Enable the MMC host software queue for the SD card, 2020-02-12)
<dsimic> as I wrote above, people seem to mix up what's what
<dsimic> and what isn't :)
<chewitt> turns out adding more files for 346 h264/hevc/regs is more involved than I realised :)
<chewitt> the old dog needs to learn some new tricks
<Dex2x> dsimic, ah hmmmm. Would you see "CQHCI version 5.10" with an sdcard? And how do I know which mmc is the emmc or sdcard ? (this is a more general thing I struggle to see if both are inserted)
<dsimic> you need to have a look at the board DT to see what's what
<dsimic> for Rockchip DTs, there are nice aliases at the top of board DT files
<Dex2x> I thought this would be in kernel already
<dsimic> I've got "mmc2: CQHCI version 5.10" for an eMMC chip
<dsimic> sorry, WDYM?
<Dex2x> I thought by now, instead of having to use some overlay, that the kernel might have had support for A2
<dsimic> it isn't up to overlays, but about the driver support
<dsimic> let me repeat: there's been work to have it supported for A2-rated cards as well, but I'm unaware of that work progressing to the point where support is actually available in the mainline kernel
<Dex2x> ah gotcha
<dsimic> one of the crippling factors to have it supported in the mainline kernel is the lack of hardware support for command queueuing on the MMC interfaces that go to microSD card slots on various SBCs
<dsimic> thus, even when the support eventually lands into mainline, many SBCs will end up having next to no speed improvements :/
<dsimic> which is why A1-rated cards are a much safer choicea anyway
<dsimic> s/choicea/choice/
<dsimic> to sum it up, there are a few reasons why I recommended A1-rated cards from the beginning :)
<dsimic> it has also reminded me to go back to fixing some old bugs in the mmc drivers
<Dex2x> interesting with the emmc removed and just the sdcard I still see mmc0: CQHCI version 5.10
<dsimic> oh, and when you unmount a microSD card, don't eject it immediately... they may need some time to flush some internal caches, and the MMC specification allows the cards to do that at virtually any time... give it half a minute or so before ejecting
<dsimic> which board is that?
<Dex2x> orangepi 5 ultra
<Dex2x> want to see the dmesg output?
<Dex2x> dsimic, regarding the flush, does not `sync` not help?
<dsimic> just a moment, please...
<dsimic> running sync doesn't help, because cards manage their caches internally and invisibly
<dsimic> even when told to flush caches and prepare to be ejected, the spec for some strange reason allows them to not do that entirely
<dsimic> IOW, maybe most cards don't need time to simmer down, but the spec allows them to need some time
<Dex2x> the dmesg is very different with an edge kernel vs vendor
<Dex2x> dsimic, if you are curious to see the dmesg, of both vendor and edge https://paste.centos.org/view/3838df45
<dsimic> oh, thanks!
<dsimic> I'll get back to you a bit later
<dsimic> got sidetracked a bit
warpme has joined #linux-rockchip
stikonas has joined #linux-rockchip
cbeznea has quit [Remote host closed the connection]
cbeznea has joined #linux-rockchip
dsimic has quit [Ping timeout: 258 seconds]
dsimic has joined #linux-rockchip
<warpme> detlevc: i just updated rkvdec2 code to current https://gitlab.collabora.com/detlev/linux/-/commits/add-vdpu381-and-383-to-rkvdec-v3 head. Mpeg2/h264/hvec seems work ok but it looks i lost vp9 (gray screen; tested on rk3399). Previous v3 code (from 18.08.2025) was ok. may you pls confirm vp9 works ok for you?
cbeznea_ has joined #linux-rockchip
sigmaris_ has joined #linux-rockchip
_walter_32 has joined #linux-rockchip
hexdump02 has joined #linux-rockchip
Net147 has joined #linux-rockchip
Net147 has quit [Changing host]
Net147 has joined #linux-rockchip
cbeznea has quit [*.net *.split]
walter has quit [*.net *.split]
hexdump01 has quit [*.net *.split]
sigmaris has quit [*.net *.split]
alpernebbi has quit [*.net *.split]
Net147_ has quit [*.net *.split]
sigmaris_ is now known as sigmaris
alpernebbi has joined #linux-rockchip
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raster has quit [Quit: Gettin' stinky!]
stikonas has quit [Remote host closed the connection]
chewitt has quit [Quit: Zzz..]
<Dex2x> dsimic, so what seems curious is that some of the "official" raspberry pi sd cards, are A2 now
stikonas has joined #linux-rockchip
clarity has quit [Ping timeout: 256 seconds]
f_ has quit [Ping timeout: 256 seconds]
f_ has joined #linux-rockchip
anarsoul has quit [Ping timeout: 256 seconds]
clarity has joined #linux-rockchip
anarsoul has joined #linux-rockchip
_walter_32 has quit [Quit: Konversation terminated!]
psydroid2 has quit [Quit: KVIrc 5.2.6 Quasar http://www.kvirc.net/]
<dsimic> those aliases define what are actually mmc0 and mmc1 on the OrangePi 5 Ultra
<dsimic> mmc0 is the MMC interface that supports command queueuing, i.e. it supports eMMC 5.1
<dsimic> while mmc1 is the MMC interface intended for microSD cards, and it supports eMMC 4.51 only, so there's no command queueing on it
<dsimic> which also explains why are you getting "mmc0: CQHCI version 5.10" -- it's the same as for the MMC interface I'm getting it on
<dsimic> it just shows what the interface is capable of
<dsimic> the vendor kernel seemingly shows that regardless of the mmc0 interface being populated or not, which is somewhat confusing, but the mainline doesn't display that message when the interface isn't actually in use, so we're fine there
<dsimic> regarding why some of the official RPi microSD cards are A2-rated, who knows, maybe they're prepping for the future :)
<dsimic> also, maybe those cards actually satisfy the A1 rating even with no host-side support in place -- the RPi Foundation could have tested it and selected those cards carefully and accordingly
<dsimic> it would be very interesting to research does the MMC interfaces that the microSD cards are attached to on different RPis models actually support command queueuing, i.e. do they actually support the eMMC 5.1 standard
<dsimic> perhaps they do, because some RPi SoMs come with soldered eMMC chips, so it's reasonable to expect full support for eMMC 5.1 there; perhaps the same MMC interface is used for microSD cards on the Model-B RPis
<dsimic> s/RPis models/RPi models/
<dsimic> s/queueuing/queueing/
<dsimic> s/research does the/research do the/
<dsimic> sorry for the typos and fixes... got those messages edited before hitting <Enter>, but not entirely
<dsimic> actually, I'll probably have to work (yuck! :) with a couple of Raspberry Pi 4 boards soon, together with a couple of Kingston high-endurance A1-rated microSD cards, and I'll pay close attention to how do the cards end up working
<dsimic> perhaps there's just the "mmcX: CQHCI version 5.10" message printed, so people wrongly take that as A2 being supported
<CounterPillow> people still believe the RPi """Foundation""" thing? They're a corporation, the foundation is just there for accounting tricks to do tax evasion.
<dsimic> Dex2x: as I wrote above, that just shows what the controller is capable of, see also the link below
<dsimic> CounterPillow: ah, I've never believed in that, but I tend to use the official verbiage there :)
<Dex2x> so sdhci is the emmc?
<Dex2x> dsimic, let me know how the rpi4 stuff goes, I am curious :D
<dsimic> sdhci is, let's call it that way, the internal name of the MMC interface
<Dex2x> and sdmmc ?
<dsimic> while mmc0 is the "external" name exported to the userspace, so to speak
<Dex2x> infra structure vs data/presentation layer naming yeah
<dsimic> let's illustrate it with an excerpt from the RockPro64 dtsi:
<dsimic> 13 aliases {
<dsimic> 14 ethernet0 = &gmac;
<dsimic> 16 mmc1 = &sdmmc;
<dsimic> 15 mmc0 = &sdio0;
<dsimic> 17 mmc2 = &sdhci;
<dsimic> 18 };
<Dex2x> I am more asking between sdmmc and sdhci which is which
<Dex2x> which is the micro sdcard, and which is normally emmc
<dsimic> the mmcX names on the left are the visible names, while the names on the right are the internal names, coming from the hardware definitions
<Dex2x> dsimic, I understood the aliases
<dsimic> please read carefully what I wrote above, I already answered that question
<dsimic> to sum it up, sdhci supports eMMC 5.1, so that MMC interface virtually always goes to the MMC chip
<Dex2x> odd naming convention
<dsimic> while the sdmmc supports eMMC 4.51, so it goes to the microSD card
<Dex2x> I would have thought from the naming it's the other way around :/
<dsimic> it all comes from the actual design of the SoC, both the naming and the routing
<dsimic> yes, it's confusing indeed
<dsimic> I'll report back the findings from the RPis, of course
<dsimic> I'll be using the official RPi OS on those, so it will be as good as it gets :)
<dsimic> (or as bad, depending on the viewpoint :)
<Dex2x> eh last time I tried the official rpi os , was with an rpi2, and rpi os did not honor the config file AT ALL
<dsimic> I'll use it just as a quick and dirty way to make those RPis working
<dsimic> I actually wanted to use different SBCs for that purpose, but it turned out to be bot doable
<dsimic> so the RPis are just filling the gap
<dsimic> s/bot doable/not doable/
raster has joined #linux-rockchip
Kwiboo has quit [Ping timeout: 260 seconds]
Kwiboo has joined #linux-rockchip
naoki has joined #linux-rockchip
<dsimic> those microSD cards are indeed marketed as A2 rated
<dsimic> I'm now wondering where does one find the kernel source used in the RPi OS? :)
<diederik> dsimic: should be https://github.com/raspberrypi/linux/
<dsimic> Dex2x: unfortunately, that's for a different SoC
<dsimic> diederik: thanks, I'll poke around
raster has quit [Quit: Gettin' stinky!]
<dsimic> let me just record this here, as a note for the future (not the stuff we want):
<dsimic> Dex2x: diederik: believe it or not, :) the RPi kernel does enable A2 cards, and I'm unable to find those patches submitted anywhere for upstreaming
<Dex2x> o.0
<Dex2x> that much has then happened end of last year, start of this
<Dex2x> I wonder what speeds it gets
<dsimic> thus, this is a great opportunity to have those code additions researched further, possibly reworked a bit and, hopefully, submitted upstream, for everyone's benefit :)
<dsimic> only a couple of A2-rated cards are whitelisted for having the command queueing enabled, though
<Dex2x> oh so "vetted" ?
<Dex2x> Or just rpi , picking their brand?
<dsimic> I'll be happy to research all that further and work on getting all that upstreamed
<dsimic> yes, basically just the RPi cards are allowed to have that feature enabled
<Dex2x> I can test on a couple of orangepi 5's
<dsimic> I'm afraid we'll need boards that have command queuing available on their microSD slots
<dsimic> which means... RPis :/
<dsimic> but we'll see after I dive a bit deeper into all that
<dsimic> it's really, _really_ strange that those patches haven't been submitted upstream yet, but I guess that's how RPi "Foundtaion" operates
<dsimic> s/Foundtaion/Foundation/
<Dex2x> well.. given they only white listed their A2 cards : /
<dsimic> I'll also have to shell out some bucks to get a few A2-rated cards
<dsimic> yeah, seems they simply don't care much