#
…

2021-10-17

00:08j_eycool maz reviewed my code and then provided me a patch with all their suggestions
00:09alyssaj_ey: don't get any ideas for me doing code review like that ;-p
00:09j_eyalyssa: :P
00:22hspak has quit [Quit: The Lounge - https://thelounge.chat]
00:23hspak has joined #asahi
01:33alyssa has quit [Quit: leaving]
01:52___nick___ has quit []
01:55___nick___ has joined #asahi
01:55chadmednsklaus: firmware/pre-linux stuff does an asston of hardware initialisation on x86 too, its just that its all proprietary and you dont get to see it happening
02:20phiologe has joined #asahi
02:23PhilippvK has quit [Ping timeout: 480 seconds]
03:05___nick___ has quit [Ping timeout: 480 seconds]
03:10nico_32and on server class hardware
03:11nico_32you've very strange thing happening
03:11nico_32dell uefi calling into the idrac to do firmware upgrade
03:12nico_32'(iDrac that boot with uboot)
03:18marvin24_ has joined #asahi
03:19marvin24 has quit [Ping timeout: 480 seconds]
03:31kov has quit [Quit: Coyote finally caught me]
03:31kov has joined #asahi
04:41nehsou^ has joined #asahi
07:26xorly[m] has joined #asahi
07:31xorly[m] has quit []
07:31xorly[m] has joined #asahi
07:40chadmed has quit [Quit: Konversation terminated!]
07:41Glanzmann has quit [Quit: leaving]
07:44chadmed has joined #asahi
08:03nehsou^ has quit [Ping timeout: 480 seconds]
08:04nehsou^ has joined #asahi
08:16xorly[m] has quit [Quit: Reconnecting]
08:16xorly[m] has joined #asahi
08:17tertu2 has joined #asahi
08:22tertu has quit [Ping timeout: 480 seconds]
08:33marcan< nsklaus> marcan may need to that too <- yeah...
08:34marcannsklaus: firmware's job is to get the system into a sane state
08:34marcanm1n1's job is to get the system into a sane state for Linux
08:34marcan(partially by fixing insanity that iBoot leaves behind)
08:35marcanm1n1 is best compared to part of UEFI/FSP on PCs
08:35marcanit is not really a bootloader, it's even less of a bootloader than UEFI
08:36j_eylinux's job is to get the system into a usuable state for the user
08:38marcanspeaking of, I have a few TODOS I should get into m1n1
08:38marcanpmgr cleanup and cpufreq init for one
08:54nsklausmarcan: (and chadmed too): my comments were not criticism about m1n1 specificaly, and may have been motivated by a lack of comprehension of how things actualy work, on x86 too. on x86 the bios probably did the same kind of hardware initialisation jobs and i didn't get to see it either, even in the lilo days. but at that time it didn't seems strange to me.
08:55chadmedyeah thats totally understandable. i dont think anyone was trying to have a go at you :)
08:55nsklauseven though it's probably the same things that m1n1 does
08:55nsklausyes, no problem
08:55nsklausi was just trying to justify myself, and why i said what i said. there may have been a part of ignorance from me,
08:56chadmedits hard to accustom yourself to the quirks and procedures of other platforms if all youve known for the past 20 years is x86, as is probably the case for most people
08:56nsklausabout this whole part of the boot process
08:57nsklausmy question and comments might look sometimes like criticism, but they're not really that. it's just the way i ask questions to get a better understanding
08:58nsklauschadmed: yes, indeed
09:04nsklausabout getting used to a different platform, its differences and quirks, as you were saying, on mac i find it too bad there's no interface to customize settings (like bios on pc)
09:05nsklausbut well.. if linux can just boot, and i can finally get a sane env and ditch maacos i'll just be happy
09:05chadmedyeah, most non-x86 platforms lack that. if we ever see x86 supplanted in a large way in the enthusiast space i suspect we will see firmware implementations that take care of that. if AMD/Intel ever decide to abandon it they will probably make sure that nothing about the PC platform changes except the ISA in the chips, as its vital to their revenue
09:06chadmedi.e. you will have an $ISA platform with ACPI, UEFI, "BIOS" settings, etc
09:06j_eymost of the times I need to go into BIOS, something wasnt working, and I was annoyed :P
09:06nsklausthat would be nice
09:08nsklausj_ey: in a bios with simple interface, one could set boot order, or boot security levels for example or toggle some hardware features on/off
09:08chadmedadditionally, theres nothing stopping current ARM/RISC-V vendors from offering a platform like that. in fact, in the server space ARM machines commonly have ACPI or UEFI. theres just not been a need for any of that in the traditional non-x86 markets (i.e. mobile devices, SBCs, embedded, etc)
09:09nsklauson mac we need to boot the whole bloated macos to be able to have some form of control over those example i gave
09:09aleasto has joined #asahi
09:10chadmedyeah, and its likely that this will continue since thats how apple likes their platform. try not to think of the new macs as PC-equivalent, but rather idevices with a higher tdp, because thats essentially what the platform is
09:11nsklauswhat is "tdp" ?
09:11chadmedthermal design power, basically how much thermal energy the chip is designed to disspiate (measured in W) under "normal" operating conditions
09:11nsklausi see, thanks for telling
09:12chadmedit has traditionally been a pretty decent proxy for chip power consumption, but is becoming increasingly meaningless because of boosting algorithms and how TDP is calculated by chip designers
09:13nsklausyes, i actually like m1 arch so far, lots of crunch power, without hardware heat, and very low power consumption.
09:13nsklausi have a 2015 intel macbookpro with arch linux on it, just having the darn thing on makes it warm
09:14chadmedyeah its insane, the entire M1 mac mini pulls something like 30W at the wall under full load which is ridiculous considering it is performance competitive with PCs double its price
09:14chadmedwhich under similar conditions would guzzle down hundreds of Watts
09:17marcanand on monday we're getting new Macs with 2x the performance...
09:17marcanand I totally see a 4x version dropping at some point...
09:18marcanit's almost scary, but Apple is really doing something crazy here
09:18nsklausand hopefully no more touchbar :) return of magsafe, and more ports too
09:18j_eygot the scoop right here ^
09:18j_eymarcan: soo tuesday stream m1x bringup? :P
09:18marcannew magsafe that's just USB Type C with most of the pins removed :D
09:18chadmedthe touchbar being gone has been confirmed for a while now. good riddance imo
09:18marcanj_ey: the *announcement* is tuesday morning for me :p
09:18nsklauschadmed: truely
09:18marcanalso I don't think they ship *that* quickly
09:19chadmedgonna go to the gym and grab an energy drink in a little while so i can stay up for the event. 3am? childs play.
09:19marcanonly sad thing about the touchbar is M1 MBP owners are likely going to be stuck with a dead ecosystem
09:19marcanI somehow doubt anyone's going to add any kind of integration with desktop environments to support one machine model...
09:19marcanso we'll have soft keys and that's about it, is my guess
09:19marcan(well, no different from boot camp on the x86 Macs)
09:20nsklausi'm thinking of exchanging my m1 for a m1x just for the touchbar being gone, but i wouldn't mind the 2x perfs bump too :)
09:21chadmedi have a cruddy A1708 macbook pro you can have, no touchbar :P
09:21nsklausi think i'll pass on that offer :)
09:23nsklausmonday announcemnt should be wild, with tons of hype words
09:24sorearincreasingly of the opinion ISA is a bad proxy for anything platform related
09:32svenhm... let's see if i can justify buying another m1x then :D
09:32sveni think a mac mini with 32gb ram would be tempting
09:33nsklausthe only problem i have with m1 so far, is about the gpu side, on macos i mean, it seems it's tailored for metal api, and it seems it's lacking some functionality compared to opengl and vulkan. the result is that games running through wine don't display well or refuse to run completely for missign feature.
09:33j_eysven: you need one for dartv2 compatible :P
09:33marcannsklaus: that's just because apple doesn't support opengl properly
09:33nsklausi'm wondering how that will turn out on asahi once the gpu driver will progress enough
09:34chadmednsklaus: yeah the gpu lacks some hardware implementations of opengl/vulkan functions that some games will assume. hopefully we get some software emulation of this missing functionality at some point but that wont be coming from official sources
09:34nsklausi mean, if full vulkan and opengl will be able to run at all, or not. i'm fearing limitations in the gpu itself
09:35chadmedif you think that's bad, just remember that x86 chips didnt have integrated FPUs until the the 486
09:36j_eynsklaus: well alyssa is passing most of the opengl tests isnt she?
09:37nsklauson moltenvk git, cdavis (i think he's one of the lead dev of that project) hinted he would resort to tricks and emulations of said missing feature too, but so far that hasn't happened yet, i compile moltenvk and run it bleeding edge each time i see a commit on their github, but so far result in-game is always the same
09:37chadmedoh theyll definitely be able to run, theyll just require some software emulation of functionality that vulkan/opengl have that metal does not. fortunately though, at the end of the day stuff like that is just abstractions of math concepts, and because all GPUs do virtually the same maths even though the hardware has no explicit support for vulkan/opengl its hardware should be able to handle most of both APIs fairly well
09:38marcanthe GPU has hardware support for some OpenGL-specific features already
09:39marcanand lots of things are done in shaders, so it seems unlikely we'd run into any horrible showstoppers
09:40nsklausfrom my (limited) understanding, one of the most problematic missing feature so far is the lack of " transform feedback"
09:41mazj_ey: quite often, it is more painful to review the code and explain what it should be like rather than just hack the damn thing and provide the patch, retrospectively writing the review.
09:41nsklausfallout4 running on wine on macos looks very bland and many objects and lights are not showing correctly
09:42marcanI'll defer to alyssa on that specific feature
09:42nsklauscuriously enough, running the same fallout4 under paralells (macos virtualization app) produce exactly the same errors, so i guess paralells uses moltenvk too for the graphic stack
09:42j_eymaz: :) it compiles at least! will test this afternoon. gotta go for a bike ride while its still dry out!
09:42chadmednsklaus: fallout 4 (or any creation engine game) probably isnt the best tool to use to test an API's stability just saying ;)
09:43chadmedyoud be lucky to get fo4 to look anything but bland/incorrect even on a windows machine with directx
09:43nsklauschadmed: i tested many games, like witcher3 too and many other, and i see similar errors
09:44nsklauson x86 linux, with fully supported vulkan and dxvk all those games, including fallout4 and witcher3 they run fine
09:44nsklausi think the problem is with macos only partially supporting vulkan through moltenvk
09:44chadmedi mean yeah its probably moltenvk i just wanted to make a joke about how awfully optimised bethesda games are
09:45nsklausmany missing extensions
09:45nsklausbut i agree bethesda games are full of bugs, problems and bloat, unoptimised and all
09:46chadmedbut these are definitely questions best directed to alyssa, whether or not moltenvk's level of support can be used as a yardstick to predict how complete our opengl/vulkan implementation will be is something i cant answer for you
09:46nsklausresident evil 2 remake won't run too on macos + wine , while on x86 linux it runs fine
09:47chadmedconsider also that there may be bugs with rosetta 2 that prevent the game engine from doing what it needs to do on the cpu
09:47mazj_ey: well, compilation is the only thing I tested!
09:47nsklausthere might be that too, but on those issue i suspect moltenvk missing some extension primarily
09:47chadmedagain, not really something im gonna pretend to know how to answer. i am a dumb hardware jock and embarrassingly incompetent at anything software
09:47nsklaus(about rosetta2)
09:49VinDuvhonestly I’m impressed that the combination wine + moltenvk + rosetta2 even works at all :)
09:50chadmedeven more impressive is that some games are playable. gtav 60+ fps on a macbook air, csgo 100+fps on the same
09:50nsklausVinDuv: performance-wise, it works surprisingly well, considering all the multiple levels of encapsulations and layer the software run through
09:52nsklausfallout4 and witcher3 for example, are AAA titles, and they run fast
09:52chadmedcounter strike is especially impressive because it contains an in-engine implementation of toGL, so its dx9-->toGL-->moltenvk-->metal all on rosetta 2
09:53nsklausmy hope though is that we will be having direct vulkan and opengl support without the need for that moltenvk layer
09:56nsklausthose missing gpu features point, it will mean either linux port of moltenvk, or reimplementation of what it does.. either way that will be a tricky part
09:58marcanmoltenvk makes no sense on linux
09:58marcanagain, this is not a "metal" GPU
09:58marcanif it's missing GL features they can be emulated, but that has nothing to do with VK on Metal
09:59nsklausi mean, there's no metal on linux obviously, but i'm talking about glue code for working around missing gpu features and ending with a working vulkan
09:59marcanyes, but that code is going to look completely different on top of metal and on top of bare hardware
10:00nsklausthat should be an interesting milestone to watch, once we reach it.
10:01nsklausi mean, once the gpu driver reach the point where it need to consider how it will tackle this problem, watch the road it will choose
10:01nsklaus*watching
10:49pugguu has joined #asahi
10:52pugguu has quit [Remote host closed the connection]
11:13kettenissven: the mailbox driver still has the code to enable clocks
11:18svengood point. let me drop that
11:21ketteniswant me to reply on the mailing list?
11:21svencan't hurt i guess
11:21kettenissuch that patchwork records it?
11:22svenotherwise i'd just be a note in the cover letter for v3
11:23kettenisoh wait, you didn't send out v3 yet
11:23svenevery now and then my laziness is actually useful ;)
11:32kettenisheh, well, I could have told you about this earlier ;)
11:38nsklaus_ has joined #asahi
11:40nsklaus has quit [Ping timeout: 480 seconds]
11:41svenalright. submitted v3 now
11:43j_eysven: "This is the second version of my series", v3 is the 2nd series? :P
11:43sven*sigh*
11:43j_eysecond version after the first version
11:56chadmeduh ok so i just realised that the event isnt until the 19th in UTC+10... aaaand its 10pm and i just had an energy drink thinking that the event was this evening...
11:56j_eychadmed: lol
11:56svenhaha :D
11:57chadmedsomeone please remind me never to do things XD
11:57mazsven: talking about reposting stuff... have you reposted your 4K series?
11:58svenuhh... not yet. but good point
11:58sveni think the other series i was waiting for that fixed some swiotlb/iommu interaction has been merged at this point
11:59chadmednsklaus: the gpu doesnt "speak" metal, it "speaks" AGX. when we say that it implements "metal" features all that means is that the hardware has optimised blocks to do the maths associated with those functions.
11:59j_eyasahi/dart/4kpgsize is so old it has the DART driver cherry-picked!
12:00svenit also won't apply anymore at this point :D
12:01mazyou want to keep Robin entertained.
12:01chadmedconsider an "rt core" on an Ampere or Turing gpu. the core doesnt "trace rays" or anything, its just highly optimised for calculating the intersections of matrices, in the case of ray tracing (specifically BVH/culling) that would be the vector representing the ray emitted by the light source, and the matrix representing the coordinates of the bounding volume of whatever the ray is intersecting
12:02j_eyI have yet to meet Robin, he wasn't at the office when I went in
12:02mazj_ey: you're missing out. he's awesome.
12:03j_eymaz: when I went to the office, I couldnt find my desktop machine, I could ping and ssh it, but I wasnt sure where it was :P
12:04chadmedyou could, feasibly, use "rt core" hardware to speed up any similar matrix operations, just as the "metal" hardware in the apple gpu can be used just fine for opengl/vulkan features that do the same maths. for others, you can just build a software model of the maths that the particular opengl/vulkan feature does and run it. we will not need to translate metal to vulkan on linux at all.
12:04mazj_ey: ah! that's because you didn't have a TX2 as a desktop. reboot the box, and you immediately know where it is, thanks to the fan basting out a tornado until EFI takes over.
12:05mazof course, with a mini as a desktop, you immediately lose it under the crap that lands on the desk...
12:07j_eysince I just moved office, I have a clean desk, I will try keep it that way :P
12:07mazI'd have to move office every two weeks...
12:13svenwhat is this office thing you speak of? i have faint memories of such a place :P
12:14j_eysven: it was pretty weird going back
12:14sveni think i've been in my office uhh... twice since i switched jobs earlier this year
12:15mazI went into the office quite regularly lately. it really felt good being able to design stuff around a white board with actual human beings.
12:17svenin my case it doesn't help that my office right now is ~1.5 hours away because i've been too lazy to actually move closer
12:17mazfor me, the past 18 months have shown that I *can* work fully remotely. but it has also demonstrated that I don't *want* it.
12:17mazyeah, same thing for me. I now have to commute to London, which is a total pain. and I have no intention to relocate there!
12:18mazI'm happy to go in 2/3 days a week. so far, it feels like a balance I can live with.
12:19j_eyi thought engineers were meant to be antisocial!!
12:20mazI can be antisocial face-to-face!
12:21svenyeah, 2/3 days per week sounds perfect on average.
12:21j_eymaz: lol
12:21svenlet's see if my employers agrees with that once they go back to "normal". otherwise i'll just switch again.
12:21marcanmaz: I was with human beings and a white board earlier, we were discussing chord progressions during the jazz jam ;)
12:21marcanI haven't been to an actual office since march 2020...
12:22mazmarcan: :D
12:22etaI've never had a job in an office
12:22eta...then again, I only started working in 2020 :p
12:22eta<maz> yeah, same thing for me. I now have to commute to London, which is a total pain. and I have no intention to relocate there! ← enjoy spending shitloads on train fares
12:23j_eyit's either that or a shitload on a house in london :P
12:23marcanis it worse than tokyo these days? :p
12:23mazeta: the nice thing is that you lay a lot for trains that don't show up.
12:23etaoh, I know
12:23mazs/lay/pay/
12:23etamaz, you can get money back for those ones though
12:23marcanat least the trains are on time here
12:24etaI just went up to Glasgow
12:24sven.jp trains are pretty awesome in general
12:24etaboth trains were ~30 minutes late >.>
12:24etain general the UK is pretty good for punctuality though
12:24etaand there's delay repay, so you can claim money back for delays
12:27mazeta: compared to other European countries, the UK trains are pretty crap. even France does better, even with the strikes! ;-)
12:28eta"we did it first, and now we're the worst"
12:33chadmedwhat a rousing success the neoliberal experiment has been :-{
12:37j_eyis it normal to just do review comments you agree with, without replying to everyone?
12:38sveni usually try to at least try to reply to everyone
12:39svenremove one "try to" there :D
12:39j_eysven: like your interrupt-cells example comment.. I'll just do it and mention it in the 'changes' line for v4..
12:40svenoh, sure
12:59svenalright, sent the cursed usb quirk series as well
12:59sventime for 4k pages now i guess
13:01j_eysven: did you send a cover letter for the quirk? (might just be slow to reach lore.kernel..)
13:01sveni feel like the explanation in the commit is enough
13:02svenand i'd just repeat it in the cover letter
13:09yuyichao has quit [Ping timeout: 480 seconds]
14:33alyssa has joined #asahi
14:37alyssaOkay, that's enough...
14:37alyssaairing dirty laundry
14:40alyssaor is it an example of money laundry?
14:41etasounds soggy
15:28VinDuvstd::launder(std::get_money(…))
15:31sven(for trusted devices only for now since untrusted ones require some slightly annoying changes to swiotlb due to min_align_mask)
15:33svenand yay, looks like the mailbox binding fails some new check introduce in 5.13 *sigh*
15:33sven*introduced
15:36j_eysven: i assume your dev machine is fast enough.. but geert made this patch to speed up running the bindings check https://paste.gg/p/anonymous/a4b28a344c054e4c908c31f50cc6a5e8
15:36j_eyif you run the dt_binding_check with DT_SCHEMA_FILES=Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
15:36svenoh, that looks useful
15:37sveni think i just need to drop the "minItems: 4"
15:37j_eyoh ok, when I was tryin to figure out how I messed up the pinctrl bindings, that patch took runtime to 2s from 2mins lol
15:39svenhuh, why doesn't it want to apply that patch to my tree :/
15:39j_eythe ++s probably
15:39j_eyit's from git stash
15:41svenyeah, dropping minItems fixes it
15:41j_eyI incorporated maz's patch and put v4 here https://gitlab.arm.com/linux-arm/jg-open/-/commits/pinctrl_apple_v4/ not sent it to the list just yet
16:12alyssasven: any plan for DCP with 4k pages?
16:12svendepends on what you end up using there
16:12alyssathe get_sgtable thing I think will be ok once I drop down to IOMMU API like robin wanted
16:12alyssalocked DART though...?
16:12sventhat doesn't matter
16:13svenyou'll just need a new function to allocate a unmanaged domain that allows larger IOMMU pages
16:14alyssathanks for volunteering
16:14svenuh. that function is literally three lines of code, so sure
16:38doggkruse has joined #asahi
16:39doggkruse has quit []
16:55j_eymarcan: doing more testing.. not sure if this is a typo? https://paste.gg/p/anonymous/7dd3e8ba1845403094151dd90b3d8437
16:56marcanthaaat's a typo alright
16:56marcannow I'm surprised I've never hit that
16:56marcancertainly explains it
16:57j_eyfeel free to give me a reported-by or something tag :P
16:57marcansend a PR? :D
16:59j_eyseems to fix my issues, no panics yet..
16:59j_eyafter 5+ boots
17:08marcanyou could probably pinpoint the exact moment in the "let me just make the HV do SMP" stream where I copypasta'd that and neglected to edit it :)
17:10svenFixes: youtube.com/watch?v=whatever&t=123s :D
17:16j_eymarcan: that was done off stream I think :p
17:16marcanhmm, was it
17:30povikj_ey: nice, will check if that fixes my panics also
17:30poviksomething about CPU crosscall timeout, is that the same you were having?
17:33j_eypovik: yes
17:39povikwell great then
18:23Glanzmann has joined #asahi
18:23Glanzmannalyssa: I just wanted to try the hdmi hotplug branch, but I'm unable to find it. https://pbot.rmdir.de/GuNOZ7a7OG_wN_fZCm76ow What am I doing wrong?
18:24j_eyGlanzmann: git checkout 20211015 ?
18:25j_eygit branch only shows local branches
18:25j_eyso it wont show until you checkout it
18:25alyssaj_ey: git branch --remote
18:25j_eyGlanzmann: ^ git branch -r or git branch -a to show remote stuff
18:26Glanzmannj_ey: Thanks, will keep that in mind, I thought when I do a git pull it will mention new branches, but maybe I have already pulled before ...
18:26* Glanzmannis ashamed as a git early adopter who once wrote is own frontend to git ...
18:27j_eyGlanzmann: ok I see what you mean, yeah I think you probably just had it already
18:34Glanzmannalyssa: Witht he 20211015 branch, X does not longer start for me: https://ab34.de/u/Xorg.0.log
18:35GlanzmannBut this is with a different monitor, with a Eizo FlexScan S2431W-GY hellgrau, 24", 1920x1200, analog/digital, Audio
18:35GlanzmannI'm trying with my other monitor now.
18:36j_eyhellgrau o_O
18:37svenprobably the color of the screen :)
18:37Glanzmannyes, to fit the corporate identity (I just cut an pasted it from my how file): https://pbot.rmdir.de/VxgILdXoqnBsHPOUjmtffg
18:38rohin has joined #asahi
18:38Glanzmannalyssa: I unplugged the eizo S2431W-GY and plugged, EV2780 and have no picture, rebooting now.
18:39j_eysven: pale gray, makes sense if you speak german :P
18:39svenj_ey: yeah :D
18:42GlanzmannI also applied all Debian testing updates.
18:43alyssaGlanzmann: kernel seems fine to me...
18:43alyssadoes modetest work?
18:44Glanzmannalyssa: How do I do modetest?
18:44alyssaactually, easier question
18:44alyssadoes weston work?
18:44alyssa# apt install weston ; $ weston
18:44GlanzmannI can also give you ssh access to the machine, if that helps.
18:46Glanzmannalyssa: weston does not work: https://ab34.de/u/weston.txt
18:47GlanzmannReuploaded https://ab34.de/u/weston.txt since the file was emptry - please reload
18:47GlanzmannThat is the outpt of the weston command (that is the wayland server?)
18:47alyssaokay that's instructive.
18:47alyssahow did I manage to break things
18:47GlanzmannThis is with 20211015, should I try the newer branch (I saw there is one newer)
18:48Glanzmannorigin/20210816
18:48j_eythats not newer :P
18:48j_eythats august!
18:49GlanzmannOh, sorry, thank you for pointing out.
18:49alyssaIt looks like the DCP is coming up but the display subsystem is not.
18:49alyssaI'm... vaguely aware the dance we do for the display subsystem is racy.
18:50alyssaIf you could sprinkle some printks in apple_platform_probe it might help
18:50alyssa(Right at the start, at each iteration of the loop, before each PROBE_DEFER return, and before the ENODEV return)
18:53GlanzmannWorking on it.
18:56GlanzmannWith the printk, the startx works.
18:57Glanzmannalyssa: Once X comes up, hdmi hotplug also works.
18:58* alyssarubs temples
18:59alyssasven: what's the right way to do subsystem stuff?
18:59alyssaapparently the EPROBE_DEFER dance is racy ^^
19:00alyssaGlanzmann: re the oops, I would appreciate if you could narrow down what in dcp_flush is doing the deref
19:00alyssadcp_flush+0x2a0/0x400 is not something I can understand off hand ;)
19:00alyssaOoh, I wonder if that's lookup_mode returning NULL
19:00GlanzmannHow do I do that, do I have to recompile the kernel with debugging symbles or will gdb help me with that.
19:01alyssausually i just sprinkle printk >_>
19:01GlanzmannI can do that.
19:03alyssaNot wanting the kernel to oops when plugging in monitors, so demanding :-p
19:03j_eyGlanzmann: ./scripts/faddr2line vmlinux dcp_flush+..etx
19:04svenalyssa: "subsystem stuff"?
19:07Glanzmannj_ey: You certainly teach an old dog some new tricks. :-) (infra) [/scratch/linux-allysa] ./scripts/faddr2line vmlinux dcp_flush+0x2a0/0x400 | pbot -
19:07alyssaj_ey: nice :)
19:07GlanzmannThat would be: .color_mode_id = mode->color_mode_id,
19:07alyssa...yeah.
19:07alyssado I want to type out a patch for you that I can't test right now
19:08Glanzmannj_ey: Only thing is that I already started with the printk orgy and than I came back to irc to try the trick. :-)
19:08Glanzmannalyssa: Whatever works for you.
19:09alyssathis should "fix" the oops in exchange for a scary WARN
19:09alyssabut I'm not clear how you get down that code path
19:11alyssaIn theory that sort of nonsense is supposed to be avoided with the mode_valid callback
19:11Glanzmannalyssa: You will not like that but with the patch, when I boot, my monitor gets blank: dmesg: https://pbot.rmdir.de/Xh_UIvU6YSlqwRnBN2WsaA
19:12GlanzmannThat is with the Eizo FlexScan S2431W-GY - 1920x1200
19:12GlanzmannTrying other monitor now.
19:12alyssai don't like that indeed
19:12alyssasven: subsystem stuff.
19:12sveni don't know what that means
19:13alyssai wish irc had typing indicators
19:13svenwhat are you trying to do?
19:13* alyssais typing
19:13etaIRC does have typing indicators if your server and client supports them :p
19:13GlanzmannI hate typing indicators.
19:13* etaeven hacked support for this into the XMPP bridge she uses
19:13GlanzmannGood news is with the new flexscan, it works.
19:14alyssaThere are two DCPs. Each DCP has its own drm_crtc object, but we want a single drm_device object for both that contains both drm_crtc's.
19:14GlanzmannSwitching monitors now
19:14alyssaThat is, we want to present userspace the impression of dual monitors on one graphics card, in oldspeak.
19:15alyssaIt's tempting to model this as 3 nodes in the device tree:
19:15alyssadcp { compatible="dcp" }
19:15alyssadcpext { compatible="dcp" }
19:15alyssadisplay-subsystem { compatible="apple-display"; coprocessors = <&dcp, &dcpext> }
19:16alyssabut then how do you ensure the display subsystem doesn't probe until both coprocessors boot?
19:16alyssaThe "obvious" way is to have an "is_booted()" call on the DCP driver
19:16alyssaand in the apple-display driver probe(), check if all the coprocessors from the DT are booted and if not return -EPROBE_DEFER
19:16alyssaand then the core logic will try again later when the DCPs come up
19:17j_eyI dont under DEFER, how does it know when to reprobe?
19:17alyssaThis is racy-- the core logic will stop trying to probe after a while if you DEFER too many times. Depending how fast the DCPs come up, this can be racy
19:17j_ey*understand
19:17alyssaj_ey: it just keeps trying
19:17sveniirc EPROBE_DEFER effectively moves the device to a "wait list". and whenever another device has successfully probed everything from that "wait list" is tried again
19:18alyssasven: so it's sae to DEFER on "another device has probe()d" ubut not safe to DEFER on "another device has booted after probing"
19:18svenuh... maybe? :D
19:18alyssathat makes sense
19:18alyssathank you
19:18j_eythe display could maybe have a timeout? / check N times
19:19Glanzmannalyssa: I tried to boot again with the older monitor, now it comes up alright.
19:20svenso it's more or less what i said above
19:21Glanzmannalyssa: Did you improve the DCP code? I think the tiering in firefox is gone or might it be because I currently don't have my display rotated?
19:23rohin has quit [Ping timeout: 480 seconds]
19:24Glanzmannalyssa: no even with a rotated display no tiering.
19:24jmr2 has joined #asahi
19:24j_eyGlanzmann: tearing
19:25GlanzmannOkay, when I scroll with the mouse I have tearing. But with the page up/down, I don't.
19:25Glanzmannj_ey: yep. :-)
19:33aleasto has quit [Quit: Konversation terminated!]
19:40jmr2alyssa: for when you'll be bored ;) I hink you'll find this interesting.
19:40jmr2I spent some time looking at that "failed to parse display attribs" error on the Air. With http://paste.debian.net/plainh/70634ed9 I get http://paste.debian.net/plainh/79bd9b08
19:43Glanzmannalyssa: I hit bed now, if you have anything for me to try, let me know and I'll do so.
19:53alyssajmr2: parse tag is destructive, that won't work
19:54alyssa(skip is also destructive)
19:54alyssajmr2: anyway, i'll need the actual dumps of what we're trying to parse
20:09jmr2Ah. OK, thanks. I tried :)
20:17alyssaYou did! :)
20:42rohin has joined #asahi
20:59rross101 has joined #asahi
21:00rross101FWIW I've documented what it took for me to get from scratch to a login prompt. This is all really basic but might be useful for other newcomers like me. Thanks Glanzmann and j_ey for their help. https://gist.github.com/rross101/84def12f02e1476a4e6d2fd28a89b1a0
21:02alyssaerasing the mac is definitely not necessary
21:03rross101Fiar enough! I started with a Mac that had too much data on it to partition. And I figured I needed to be prepared to lose all the data.
21:07povikalyssa: is there any chance the DCP driver as-is will cope with kexec? (assuming both old and new kernel probe the DCP)
21:08svennope. anything that uses the rtkit library right now will likely not work
21:08svennvme definitely won't
21:08steevrross101: if you -b 20211013 to your git clone line, it'll automatically do the checkout
21:08povikdarn, was afraid that is the case
21:09j_eysven: how does that work with uboot loading stuff off nvme?
21:09poviknvme is important in my use case as you can guess
21:09svenj_ey: i don't think it does (unless i commited a hack) but that's fixable at least
21:09steevrross101: also, if you're just gonna accept the default answers, you can use the "olddefconfig" and it should use the defaults instead of prompting you
21:10sventhe "proper" way is to shutdown the nvme co-processor and then use that reset provider marcan implemented
21:10sventhat'll work for ANS, but i think it didn't work for DCP because DCP then probably speaks the iBoot protocol which we don't know about
21:11rross101steev: Thanks - didn't know either of those things. First time using git branches and compiling a kernel.
21:11j_eysteev: what does oldconfig do?
21:11j_eyoldconfig - Update current config utilising a provided .config as base, dont really get that
21:12steevit means "show me all the new entries available since this config was used"
21:12steevso your .config is the base, and if there are any new options, it will prompt you for what you want to do with them
21:12j_eyI seem to get that anyway
21:12rross101so the second time around it wouldn't ask all the questions
21:13svenpovik: what exactly is your use case?
21:13povikpetitboot
21:13steevif you do "make olddefconfig" it's like saying, use this as the base, and any new options, just take their default settings
21:13j_eyI have to get to grips with config management, it's a mess rn
21:13rross101more importantly - were there any of those questions I should have answered differently?
21:13steevlet me clone the kernel stuff and take a looksie
21:14svenpovik: so petitboot is another linux kernel? or how does that work?
21:14poviki have already made NixOS play nicely with petitboot on another arm64 board
21:14j_eyrross101: probably not
21:14povikand haven't yet dropped the idea of making it work here also
21:14j_eypovik: which arm board?
21:14poviksven: petitboot is effectively an kexec-based bootloader
21:14steevbtw, typo rross101 - 'wget curl https://ab34.de/u/0001-compile-fixes.patch' - you might want to either wget, or curl, but otherwise it'll try to wget the file curl :)
21:14j_eyn2 cool
21:15rross101good spot
21:15rross101cut and paste problem
21:15svenpovik: what does that mean? does it use a literal linux kernel which would probe DCP, ANS and everything else? or does it just implement the kexec protocol?
21:16steevrross101: you could also "git am 0001-compile-fixes.patch" instead of patch -p1, not that it truly matters since it's unlikely most people will keep the kernel sources around :)
21:17povikwell depends on what features and DT nodes i enable in the interim kernel
21:17povikit would be useful by being a linux kernel with minimal userspace appended to m1n1 and fixed in the m1's boot policy
21:17j_eypovik: but petitboot is based on the linux kernel right?
21:17povikj_ey: yeah
21:18svenok. that's what i was asking :D
21:18j_eyis it just a normal userspace program?
21:18povikj_ey: yeah
21:18svenokay. so that's not impossible but it's going to be bit messy right now
21:18steevwow this linux repo is friggin huge
21:19svenif you send the right commands to e.g. ANS2 it will go to hibernation/deep-sleep mode and then the next linux kernel would be able to wake it up again
21:19j_eysteev: 'this'? all linux repos are :P
21:19svenor, if you wanna do it the proper way, send the commands to shutdown ANS2 and then adjust the nvme driver to issue a reset
21:20alyssapovik: It's worth noting I explicitly think using DCP in the bootloader is... a bit silly.
21:20steevj_ey: nah, it's at 2.83gb and only 53% cloned, my torvalds checkout with built files is only 5.9 and it has 11 remotes
21:20alyssaThere is a way to make all of this work of course (1TR -> macOS)
21:20alyssabut for the typical case it ... isn't necessary?
21:21alyssathe iBoot simple-framebuffer ought to be sufficient for the first stage bootloader anyway
21:21j_eysteev: hm, i wonder why then
21:21steevno idea :) i'm just cloning it
21:22steevi just wanna see what rross101 was asking about. it's odd because a bunch of new options shouldn't be added post rc1, but i could be wrong (alyssa's config is for rc1)
21:22rohin2 has joined #asahi
21:23j_eymy linux dir is 5.8G, but I dont have mu-linux as a remote
21:24j_eybroonie!
21:25povikalyssa: i don't necessarily disagree. but if did work, i would probably enable it
21:25poviksven: are the sleep commands and etc. documented somewhere?
21:26povikor is there somewhere i can look?
21:26povik(other than the obvious places :-p)
21:28steevrross101: yeah, the defaults look fine, the only one that might have been "iffy" was I2C_APPLE, but it defaults to Y
21:31rross101 has quit [Remote host closed the connection]
21:31steevat some point... i'll get around to doing this stuff on my m1 too, but my time is so limited these days :/
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:01yrlf has joined #asahi
22:29yuyichao has joined #asahi
23:23jelly has quit [Read error: Connection reset by peer]
23:24jelly-hme has joined #asahi
23:50kenjigashu has joined #asahi
23:51kenjigashu has quit [Remote host closed the connection]
…