ChanServ changed the topic of #aarch64-laptops to: Linux support for AArch64 Laptops (Asus NovaGo TP370QL - HP Envy x2 - Lenovo Mixx 630 - Lenovo Yoga C630)
<steev> bamse: still not working, but does https://github.com/steev/linux/commit/9628c7af75a115615d2c318a9d426032ed09b2ca look correct(ish) ?
<steev> actually, different commit, i noticed a whitespace issue
<steev> not as many smmu faults with that, so i guess that's a start, but still just get the suspend/resume cycles, so i'm guessing rob is right that maybe it's just not detecting a connected display but i have nfi
<steev> nfi how to debug/fix that
<robclark> steev: I'd worry about display first before you worry about gpu ;-)
<davidebeatrici[m]> When attempting to boot Linux on my PiPO W12:... (full message at https://matrix.org/_matrix/media/r0/download/matrix.org/StQYXGytmlAkvduIRMCWHOBs)
<davidebeatrici[m]> Any clues?
<davidebeatrici[m]> It hands there for a few seconds and then reboots.
<davidebeatrici[m]> s/hands/hangs/
<davidebeatrici[m]> Please note that I'm using the mainline kernel.
<steev> robclark: we get display already, we lack gpu, when adding gpu… I lose display
<steev> davidebeatrici[m]: try adding earlycon=efifb video=efifb
<steev> And my debugging skills aren’t up to snuff to get more debug output out of drm or even msm to see what it’s doing
<davidebeatrici[m]> Trying right now, for reference here's the original content of `grub.cfg`:... (full message at https://matrix.org/_matrix/media/r0/download/matrix.org/jwLTUODaFhHmlqRfSKJoDTdr)
<steev> just throw those options at the end of the kernel command line
<steev> oh, also add pd_ignore_unused and clk_ignore_unused
<davidebeatrici[m]> Exact same behavior unfortunately.
<steev> oh, you might want to pass the actual dtb file as well, under initrd you'd pass something like devicetree /path/to/wherever/mandriva/installs/the/dtbs/sdm850-blahblahblah.dtb
<davidebeatrici[m]> `/boot/dtb-5.19-server-0.rc6.1omv4090/qcom/sdm850-samsung-w737.dtb`
<steev> then that
<steev> so it should look something like
<steev> linux /boot/vmlinuz-5.19-server-0.rc6.1omv4090 root=LABEL=OMVAA64 rw rootwait rd.timeout=120 console=tty1 earlycon=efifb video=efifb clk_ignore_unused pd_ignore_unused
<steev> initrd /boot/initrd-5.19-server-0.rc6.1omv4090.img
<steev> devicetree /boot/dtb-5.19-server-0.rc6.1omv4090/qcom/sdm850-samsung-w737.dtb
<davidebeatrici[m]> No luck.
<steev> try switching, for giggles, to sdm850-lenovo-yoga-c630.dtb
<davidebeatrici[m]> Same.
<davidebeatrici[m]> Consider that I have working Windows 11 on the eMMC, I can extract any needed info from that.
<steev> i'd expect it to do SOMETHING more than just show exiting the efi services
<davidebeatrici[m]> Me too.
<steev> maybe try yanking out the console=tty1
<steev> prior to the samsung dtb being available, when i'd use the yoga's dtb, it would at least reach a point, somewhere around memory, before it would kick the bucket
<davidebeatrici[m]> Do you perhaps have an image or a guide to build one?
<davidebeatrici[m]> At this point I'm not wanting a specific distribution, we can care about that once it boots something successfully.
<steev> https://github.com/aarch64-laptops/debian-cdimage/releases was what i used, or tried to use, i should say - but that kernel is older and doesn't have the samsung thing in it
<davidebeatrici[m]> I would expect the Yoga DTB to work anyway.
<davidebeatrici[m]> Is there anything I need to do other than writing the ISO to the USB drive?
<steev> it has been a long time since i used it, i can't recall if you have to specify the dtb or not, but it wouldn't hurt to do so
<davidebeatrici[m]> Hold on, it isn't a live image?
<davidebeatrici[m]> Ah, it doesn't even boot through UEFI...
<steev> it is an installer image, yes, but, we just want to see it boot... more? do you have secureboot turned off?
<davidebeatrici[m]> Yep.
<steev> what do you mean by it doesn't even boot through uefi though?
<davidebeatrici[m]> The BIOS itself warns about boot failure.
<davidebeatrici[m]> As if the EFI partition was broken basically.
<davidebeatrici[m]> Maybe I'm doing something wrong?
<davidebeatrici[m]> `sudo dd if=debian-unstable-arm64-DVD-1_20210314.iso of=/dev/sdc conv=fdatasync status=progress`
<davidebeatrici[m]> Same behavior with Fedora's AArch64 ISO: https://alt.fedoraproject.org/alt
<leezu> robclark: Here is a firefox nightly build with the pci fixes that fixes the hardware acceleration
<leezu> It does print "glxtest: VA-API test failed: failed to initialise VAAPI connection" at startup. If I recall correctly, you mentioned VA-API is expected to not be available and V4L2 should be tested for instead?
<robclark> yeah, no libva.. it is all v4l2.. I'm not really sure what to expect from ffox as far as v4l2 support.. for chrome/ium all the support that is there is done w/ focus on chromebooks and I wouldn't be entirely surprised if too much of it is behind `#ifdef CrOS` type stuff
<leezu> There is also https://github.com/bootlin/libva-v4l2-request which seems to translate the VA-API requests to v4l2
<steev> davidebeatrici[m]: that's all i did, and it worked fine here
<davidebeatrici[m]> Here's the problem.
<steev> i don't know anything about fedora so i'm not sure why that is broken
<robclark> there should be some gst and I think ffmpeg support for qc things.. which might work..linaro folks might know more what the current state of it but I have seen it working w/ browsers on older 96board things.. no idea if that invovled some special browser build
<robclark> keep in mind, w/ v4l2 there are two different "things"
<davidebeatrici[m]> steev: I'm going to try to write the Debian image again.
<robclark> qc uses v4l2 stateful api.. mtk and perhaps other things use vl42 stateless api, which might map more easily to libva
<davidebeatrici[m]> This cannot work, `dd` is writing the ISO itself instead of the content.
<steev> that is what dd does
<steev> did you partprobe after writing it?
<davidebeatrici[m]> Nope.
<davidebeatrici[m]> I was right: `bootiso` wrote the image successfully.
<davidebeatrici[m]> The Debian Installer booted in graphical mode without any apparent issues.
<davidebeatrici[m]> Aside from the Wi-Fi interface not being found.
<steev> try using bootiso to write the mandriva one then?
<davidebeatrici[m]> That was a pure IMG with the partitions inside though.
<davidebeatrici[m]> Interestingly, Fedora seems to do the same thing, but without any output on the screen.
<steev> the wifi interface won't be found because it requires extra services which won't be started/available on the installer
<davidebeatrici[m]> No problem, I'm already happy it booted.
<davidebeatrici[m]> How can I build a live image?
<steev> use the installer and install onto a different usb device, might work
<davidebeatrici[m]> I actually have a big SD card, the problem is that the BIOS does not seem to support booting from that...
<davidebeatrici[m]> I need a hub, as there's only a Type C port.
<steev> i use those usb keys that have usb-c on one side, and usb-a on the other
<davidebeatrici[m]> Cool, I need to get one of those.
<steev> i use the 32gb ones because lenovo broke booting > 32gb on the last bios update before the EOL'd the c630
<davidebeatrici[m]> Shame on them.
<steev> agreed
hexdump0815 has joined #aarch64-laptops
<steev> i even asked them to fix it before eol, and they said they'd bring it to someone's attention but nada
hexdump01 has quit [Ping timeout: 480 seconds]
<davidebeatrici[m]> I would perform a diff of the last two BIOS versions, out of curiosity.
<harvestz[m]> I've been pretty happily using the terminal in linux on my x13s - thanks everyone ☮️. Working out a few kinks with my arch setup
<leezu> robclark: Do you have a guess who from linaro may know more about the state of gst and ffmpeg support for qc? Regarding the browser, do you recall if chromium or firefox?
<steev> HdkR: remind me, you have touchscreen but no 5G?
<HdkR> Correct
<steev> HdkR: can you pastebin your dmesg again please?
<robclark> leezu: memories from linaro demo's 5+ yrs ago are a bit fuzzy.. but I guess bamse or ndec should at least know who knows more about current state of things
<HdkR> steev: Looks like the battery is so flat that it will won't turn on, will need to wait ten minutes or something
<steev> HdkR: heh
<bamse> leezu: video encode/decode?
<robclark> yeah, I think leezu was wanting to know how to get that working (although tbh sw enc/dec should be pretty workable.. hw is more about power saving these days)
<bamse> leezu: we got a v4l driver for the video hardware in several qualcomm platforms, among the laptop platforms i think it's only sdm845 though...should be quite straight forward to enable on both sc8180x and sc8280xp though, as they seem to be the same generation of firmware interface as others that are supported
<bamse> robclark: i see, i haven't tested it in a long time and back then we had the red-tint when trying to use it in the browser (iirc)
<robclark> but what is the current way to get that working with non-cros builds of browser?
<bamse> i don't know, i remember it was a hazzle last time i tried
<bamse> but there's been plenty of water under the bridge since then, so perhaps it just works today ;)
<robclark> I know chrome can use v4l2 directly these days.. but I wouldn't be entirely surprised if that was unnecessarily tied to "am I chromeos" type build flags
<robclark> because unreasonable assumption that linux-desktop==x86
<robclark> steev, bamse: taking a quick peek at downstream kernel.. extra things I see for a690 support: a690_hwcg_regs, a690_protected_regs, and this:
<robclark> otherwise other a690 things seem to be in common with a660
<bamse> i thought i had that in the pieces that i shared with steev
<bamse> but perhaps i'm missing some parts of it
<robclark> only reason I was mentioning it ;-)
<bamse> yeah, thanks for taking a look
<bamse> i just had some patches laying around from some early hackings...before i jumped onto display work instead
<robclark> np..was just a quick look.. I meant to look earlier but didn't find time
<robclark> it is a bit weird that adding gpu kills display (afaiu that is the current state)
<steev> the last one is in the kernel, the other 2 don't seem to be
<steev> no wait
<steev> GBIF is
<steev> sorry, LPAC is not, the other one is
<robclark> hmm, ok.. I guess you have some patches that I'm not aware of ;-)
<steev> the GBIF one comes from jmarek
<steev> f6d62d091cfd1
<robclark> LPAC is a thing that is kinda there.. in that a660 gen things need to program some LPAC related things to keep it from getting int the way (but otherwise doesn't do anything useful yet)
<robclark> I expect that is same as a660 and "7c3"
<steev> i suppose i could add that in as well
<robclark> I'd expect a690 needs roughly the same lpac programming as a660 modulo any special if(a690) things that don't also cover 660 and other 6xx gen4 things
<bamse> robclark: and just my understanding, it's still a valid test to just cat /dev/dri/card0 right? to see that the thing fires up?
<robclark> yeah, that should be enough to kick gpu to try to light up (assuming that is what you meant)
<bamse> right
<bamse> less moving part in that test, than trying to launch something real
<bamse> and it's useful without any additional userspace
<robclark> right.. that is my first step as far as gpu bringup
<steev> i don't have that
<bamse> what don't you have?
<steev> at least, once it tries to do gpu stuff, i get no /dev/dri
<bamse> then the driver probably didn't probe
<steev> hm
<robclark> anything is userspace that opens the dev file (card or render) will trigger trying to find fw and then bring up gpu (assuming you get that far.. if if no /dev/dri you didn't get that far)
<steev> i dunno how to get it that far
<steev> robclark: are those 3 things above gonna need the a6xx.xml.h file to be updated?
<robclark> so, if disp things didn't probe, ou won't get that far
<robclark> I don't expect so
<steev> they probe when i don't have gpu stuff in the dts :(
<steev> drivers/gpu/drm/msm/adreno/a6xx_gpu.c:1234:18: error: ‘REG_A6XX_RBBM_LPAC_GBIF_CLIENT_QOS_CNTL’ undeclared (first use in this function); did you mean ‘REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL’?
<steev> oh
<steev> i need to add it to the catalog too?
<davidebeatrici[m]> Quick question: which kernel repo/branch should I attempt to build for my PiPO W12 (similar to Lenovo Yoga C630)?
<steev> mainline should be fine
<steev> but if you want a bunch of misc stuffs
<robclark> hmm, so adding things to dt might result in more sub-components needing to bind
<davidebeatrici[m]> Very well, thanks!
<steev> that's the dt stuff i added
<robclark> steev: hmm, has gpucc been updated for a690?
<robclark> anyways, I'd try adding those nodes one by one
<robclark> and see which one blocks things
<bamse> steev: i think i booted my branch on the adp and checked that i got a /dev/dri/card0 that i could poke before i shared it with you
<bamse> steev: so you should be good if you just transplant the adp.dts diff onto your x13s dts
<steev> that's what i did :D
<bamse> hmm
<steev> well except the gpu firmware
<steev> because i don't have that a690_zap.mdt file
<bamse> note though that i didn't test it with display...
<robclark> gmu != zap..
<robclark> although you'll need both.. but neither should block display
<steev> well
<steev> i didn't have sc8280xp-smmu in smmu
<steev> or something, i'm in the middle of a reboot
<steev> i probably shouldn't work on the kernel on the device, but meh
<robclark> yolo kernel dev! :-P
<steev> it works in my life, might as well extend it to kernel development!
<robclark> heheh
<steev> okay, so that sc8280xp-mdss to the arm-smmu-qcom does get rid of the fault, so that's good
<steev> so i guess... i should get rid of gpu first, and keep gmu
<steev> i did just update to the latest gpu firmware on the windows partition as well, but still blank
<robclark> only on that is signed and has to come from windows (if missing from l-f) is zap
<robclark> and that on is only needed to take gpu out of secure mode ant pwr on
<robclark> s/ant/at/
<steev> hm
<steev> robclark: and so enabling one by one wise... adreno smmu -> gpucc -> gmu -> gpu ?
<steev> ah, okay not you
<bamse> steev: you can do that and see that they each probe, yes
<bamse> steev: but they pretty much won't do anything (which is still a good test)...until you get the gpu in, so you get the /dev/dri
<steev> erm
<steev> but i get /dev/dri before that
<steev> okay, so i get display *until* i add the gpu bit
<steev> so
<steev> this is with adreno_smmu, gpucc, gmu all enabled, and gpu *not* - https://paste.debian.net/1249158
<steev> [ 6.317703] msm-dp-display aea0000.displayport-controller: supply vdda-1p2 not found, using dummy regulator
<steev> this line never shows up once i enable gpu
<steev> or the other supply
<steev> [ 6.330436] msm_dpu ae01000.mdp: bound aea0000.displayport-controller (ops dp_display_comp_ops [msm])
<steev> that one either
<steev> so the issue is likely mdp?
<steev> nothing is deferred
<bamse> if you have amd,imageon among the compatibles for the gpu, you should be able to just status = "disable" the &mdss node
<bamse> run gpu without the display
<steev> oh i do
<bamse> if you do run them together, you need to make sure you don't ahve amd,imageon in the compatible list
<steev> oh
<steev> i actually am kinda thankful for the blinky light when the remote procs start
<steev> i know that its actually getting to the remote procs when there is nothing on the screen
<HdkR> :D
falk689 has quit [Remote host closed the connection]
falk689 has joined #aarch64-laptops
klardotsh has quit [Ping timeout: 480 seconds]
iivanov has quit [Quit: Leaving...]
iivanov has joined #aarch64-laptops
_kbingham is now known as kbingham
Penguinpee has joined #aarch64-laptops
<leezu> bamse: you mentioned you got the v4l driver for sdm845 (Adreno 630) and it should be easy to extend to both sc8180x (Adreno 675) and sc8280xp (Adreno 680). What about sc7180 (Adreno 618)? v4l2-cli does show me a Qualcomm Venus video decoder / encoder device on /dev/video2 and /dev/video3 respectively. Did your browser effort include exposing VA-API for those, eg via
<leezu> https://github.com/bootlin/libva-v4l2-request? Or were you able to directly interact with v4l2?
<leezu> robclark: There's interest in the firefox channel on adding v4l2 support, at least they consider it as "definitely needed". I'll file a bug to track it, but if you have pointers to CrOS v4l2 use, that would be helpful to include. https://matrix.to/#/!wbEUPKmXGxodKqLlZL:mozilla.org/$NWQYwT8U336BYAI7XrlIHmwuD81zPcoR4xsofE6oPBg?via=mozilla.org&via=matrix.org&via=igalia.com
<robclark> ok, I'll ask the video folks on our side
matthias_bgg has joined #aarch64-laptops
<leezu> There's also the consideration to have the decoding wired up to the vulkan drivers and only support that in FF, instead of implementing both stateless and stateful v4l2 support
<bamse> leezu: despite being described as one component in acpi, the venus hardware is completely independent from adreno
<bamse> leezu: and yes i didn't think of sc7180 and sc7280, they belong with sdm845 in the list of platforms with working venus support
<robclark> I'm not familiar enough w/ vk video stuff to know if it is possible to have a vk driver that *only* supports video and not any actual gpu things.. or if the api is suitable to layer on top of a stateful decoder.. something like gstreamer is probably a better option if you want a common video enc/dec api
<steev> but also, 845 is a640, sc8180x is a680 and sc8280xp is a690
<steev> robclark: the reason i asked about the xml file is your paste has A6XX_RBBM_LPAC_GBIF_CLIENT_QOS_CNTL in it, and converting it (i assume) to mainline to be REG_A6XX_RBBM_LPAC_GBIF_CLIENT_QOS_CNTL it fails to compile saying it doesn't know about it
<steev> it's 0x0 though so does that mean, unused/set to 0? or am i misreading because i have no idea
<robclark> steev: #define A6XX_RBBM_LPAC_GBIF_CLIENT_QOS_CNTL 0x5ff
<steev> added it in, hopefully i did it correctly, but still no luck, i'll push everything later if others want to give it a shot
matthias_bgg has quit [Ping timeout: 480 seconds]
matthias_bgg has joined #aarch64-laptops
matthias_bgg has quit [Ping timeout: 480 seconds]
<robclark> leezu: I was pointed at https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/drm-tests/v4l2_stateful_decoder.c and told that would be a lot easier to understand than piles of chrome abstraction layers :-P
<robclark> hmm, but maybe that doesn't cover the v4l2 stateless decode case like you'd get on some other non-qc things
pierro78 has joined #aarch64-laptops
<clover[m]> WSLg is so cool. Year of linux laptop lol
<leezu> robclark: A potential driver issue https://gitlab.freedesktop.org/mesa/mesa/-/issues/6988
<robclark> hmm, might be worth trying valgrand or asan, that sort of crash should be unpossible
<bamse> shawnguo9: ^^ does this looks good to you as well?
<steev> it looks right, let me pull it down and check the shasums
<leezu> robclark: It may also be due to Firefox doing something unsupported. I'm trying to disable the DMABUF_SURFACE_EXPORT feature for Qualcomm, as this feature is only known to work on Nvidia GPUs so far.. https://phabricator.services.mozilla.com/D153660
<robclark> hmm, not entirely sure what that feature does.. but I'd expect it to work if it works on any other mesa driver.. and likewise not work if it doesn't work on any other mesa driver ;-)
<davidebeatrici[m]> steev: I don't see `CONFIG_EFI_STUB` in `defconfig`, nor `distro_defconfig`:... (full message at https://matrix.org/_matrix/media/r0/download/matrix.org/UKTuybrlcpjuRjGTxogdgkmh)
<steev> davidebeatrici[m]: probably because i don't use or need efi_stub - i'm familiar, but use grub
<davidebeatrici[m]> I think it's the cause for the boot failure in my case.
<steev> defconfig though, you can yell at bamse, or even better, submit a patch to enable it - i'll do a distro_defconfig bump though to add it
<davidebeatrici[m]> If it actually fixes my issue I'll submit a patch for sure, thanks!
<steev> if whatever you're using is trying it boot the kernel directly, it would be, yeah.
<szclsya[m]> I'm not entirely sure if grub uses efistub but it should be no harm enabling it?
<steev> szclsya[m]: we do on the thinkpad kernel, he's using my c630/flex5g stuff
<steev> steev@x13s:~/kernel/torvalds$ grep EFI .config
<steev> CONFIG_EFI_STUB=y
<szclsya[m]> ah sorry, wrong topic
pierro78 has quit [Remote host closed the connection]
<davidebeatrici[m]> Ah, okay.
<steev> the defconfig is used across the board though, not just qcom
<steev> but i've been using my c630 for... years without it, and grub as the bootloader
<steev> hm
<davidebeatrici[m]> Yes, consider that I'm attempting to boot OpenMandriva now though. The Debian installer image booted without any apparent issues.
<davidebeatrici[m]> I think the one provided by Fedora suffers from the similar issue, as it reboots after a few seconds without any text output.
<steev> that's odd too, i *thought* robclark had a c630 but maybe he only has those silly chromebooks
<robclark> I do have a c630.. but never got a working grub setup
<robclark> also, use the chromebook more because sometimes having serial debug cable and console-ramoops is useful ;-)
<leezu> I'm trying to verify that the OpenGL Vendor string on SC7180 is Qualcomm. But glxinfo hangs on "futex(0x5698f9e5a0, FUTEX_WAIT_PRIVATE, 2, NULL" and does not provide any output besides "name of display: :0". Have you seen this issue before?
<steev> bamse: sorry, got side tracked
<robclark> leezu: ^^^
<steev> bamse: the gpu firmware is different, checking if it's mine or the repo that is incorrect, checking now
<steev> bamse: the gpu firmware posted is from jun 9, and there's a newer one from jun 27
<steev> i think i might have given you the wrong one's shasum last night; the correct one should be from ./qcdx8280.inf_arm64_63259a3d733dcbd7/qcdxkmsuc8280.mbn and the md5sum is e30aecc6332b077df37eb63d83db316b
<steev> robclark: oh, interesting, maybe it is the missing efi_stub then? idk what fedora and mandriva do different from debian wrt grub
<robclark> zap fw is only used to take gpu out of secure mode whenever we power it up (for some reason it power on state is secure mode).. we don't rely on zap for much (and if what we do use it for fails it is probably insta-reboot
<robclark> yeah, I guess it was issue with fedora's grub.. which ofc might be fixed by now
<steev> i suppose i probably should have put it under a690 specific, but still, not testing it on a660
<steev> robclark: if that's all it's used for, why they need to update it so often?
<robclark> I expect windows actually supports things like netflix ;-)
<robclark> meaning they actually use secure mode for something
<steev> oh, right
<steev> i suppose it doesn't really matter too much then which version is installed
<steev> the finger print thingie on the c630 is spi