#
…

2021-09-24

00:20quarkyalice_ has joined #asahi
00:21quarkyalice has quit [Ping timeout: 480 seconds]
00:28alyssa...My M1 tree is now +10k insertions to mainline
00:28alyssaI sure hope { PCI, i2c, tipd, mailbox, pinctrl } land soon.
00:40arit's too late for 5.15, but there's some hope for 5.16
00:42alyssaar: i still don't understand the kernel merge window stuff
00:44aralyssa: i only remember that there's a, i think, 2 week window after a release of a given version where subsystem maintainers and other people can send pull requests to linus and hope that their stuff lands in the -rc1, or that the problems are small enough to get fixed before rc2
00:45alyssaright... but why can't we push stuff to linux-next continuously?
00:45arbut i only ever look at it from the outside, to see if there are interesting changes to drivers that affect me
00:45alyssa(we being maintainers I guess)
00:45ari have no idea
01:09hspak has quit [Quit: bye]
01:12hspak has joined #asahi
01:16yuyichao has joined #asahi
02:29phiologe has quit [Ping timeout: 480 seconds]
03:13marvin24 has joined #asahi
03:16marvin24_ has quit [Ping timeout: 480 seconds]
05:03linearcannon_ is now known as linearcannon
05:51svenalyssa: three or so patches for tipd should be in linux-next starting today. they are the boring ones though and only ~5 lines
05:51svenand linux-next isn't meant for continuous pushing afaict
05:51svenit's meant for maintainers who send pull requests directly to linus to make sure everything works and iron out conflicts as soon as possible
06:05marcansven: so AFAICT the downstream/upstream idle (no device) states are the same as the reset state for the eUSB2 phy
06:05marcanthat's why hotplug doesn't work
06:06marcanhowever, hotplugging just the CC line does work for me
06:06marcanI'm guessing that works because if you reset the eUSB2 repeater while gadget mode is connected, it detects that as a disconnect, and as part of that sequence issues an eUSB2 reset/reconfigure
06:06marcanso it works again
06:07marcan(and that's why it works sometimes, depends on who detects the reset first, tipd or the phy, and how fast you unplug the connector...)
06:07svenso essentially the eUSB2 repeater is reset and then it goes into idle/no device?
06:07marcanidle is like "dead" mode, yeah
06:07marcanthe M1 has to put it into either host or device mode
06:07marcanin idle mode it does nothing
06:08marcanbut if the M1 doesn't know that happened, well. fail.
06:08svenokay.. and the SoC PHY is still in host or device mode and doesn't do anything
06:08svengreat.
06:08marcanso the question is, can we poke some phy regs to force an eUSB2 reset without using a big hammer on the controller
06:08marcanboth "idle, no device" and "eUSB2 reset default state" are just low on both pins
06:08marcanso neither side notices anything
06:08marcanboth are expecting the other side to talk first
06:09marcanI saw something in strings on the phy driver
06:09sventhat kinda also explains why the partial SoC PHY reset I did kinda works
06:09sven(but then sometimes makes dwc3 fail because I didn't do a complete reset I guess and broke some internal state machine :D)
06:32aleasto has joined #asahi
07:31nbnm has joined #asahi
08:02coolshaurya[m] has joined #asahi
08:18X-Scale has joined #asahi
08:23X-Scale` has quit [Ping timeout: 480 seconds]
08:38nbnm has quit [Ping timeout: 480 seconds]
09:11FireFox317 has joined #asahi
09:13FireFox317Finally decided to buy my first apple hardware with the M1 chip, the MacBook Air. Cannot wait to put m1n1 on this thing and try to boot Linux xd
09:24robinp_ is now known as robinp
09:30chadmed has joined #asahi
09:55FireFox317 has quit [Remote host closed the connection]
10:08tophevich[m]marcan: what do you reckon, next progress report ~ v5.15 or v5.16?
10:09marcantophevich[m]: you mean when?
10:09marcanas in october?
10:10j_eyhm, actually DART when in in 5.15
10:10marcanseptember will come out this weekend if I can make it, early next week worst case
10:10marcanI cover things whatever their progress is, which version they land in doesn't really matter
10:13tophevich[m]ah, cool, earlyier than expected, thought releases of stable kernel versions would give you the best "kick" in the buttocks to cover the progress, as you mentioned that it's hard to get the motiviation to write those.
10:15* tophevich[m]is always reminded of this sketch: https://www.youtube.com/watch?v=OQnd5ilKx2Y when using "reckon" :D
10:17j_eyhopefully 5.16 might get pinctrl, i2c, and tipd
10:18j_eypcie too
10:29marcanand pmgr pstates/cpufreq
10:29marcanpstates I'll throw over the wall soon, hopefully it won't be too controversial
10:29marcanand cpufreq should be done in the next few days too
10:30marcantophevich[m]: I said I'd do less crazy updates monthly from now on, I hope I can keep to that :)
10:30marcanbesides, with everything going on it makes a lot of sense to just summarize
10:34tophevich[m]aye, also if you do it more frequently it is easier to digest. I guess summarizing also helps you yourself to get a better overview on the current state, and gives ideas on how to best proceed.
10:55marcanmain problem last time is I told myself I'd do a mega hypervisor special
10:55marcan... and then that never happened and blocked everything else
10:56marcanI have a bit of an issue with mental blocks like that sometimes
11:02svenj_ey: yeah, i can kinda hope we can make at least usb 2 work for 5.16
11:20arahaelIt strikes me that this channel is the name of the beer I've been drinking. :)
11:21chadmedits a great beer but must be consumed quickly. asahi is not pleasant to drink warm
11:22arahaelIt does need to be chilled, yeah. I've been drinking their black variety.
11:22arahaelIn my country, beer is _always_ served chilled.
11:22arahael(Most western countries)
11:23chadmedlikewise yeah but i find asahi to be remarkably undrinkable warm, moreso than other beers
11:24arahaelYeah, it gets really bitter when warm.
11:31jnAsahi (旭) is also the japanese name of the McIntosh apple variety :)
11:37arahaelFascinating.
12:17nbnm has joined #asahi
12:17marcanthat's where the project name came from
12:27nsklaus_i wonder why they've choosen such kanji keys for the macintosh apple. 旭 features two keys: 九and 日 (nine and day). maybe something related to mcintosh apples takes 9 days to happen ?
12:28nsklaus_the most common way of writing asahi is usualy 朝日 (asa hi / morning sun )
12:31alyssaarahael: In my country, beer is _always_ served
12:34marcannsklaus_: the kanji means morning sun too, it's an alternate spelling of 朝日
12:34marcanit's not just the apple
12:35alyssaANS is crashing my rebase on the p-state driver. Oh bot.
12:35marcanthe "morning sun" meaning is from the original chinese, phonetic-semantic composition (九 is the phonetic component, 日 is the semantic component)
12:36j_eyalyssa: there's one commit I didn't pickup from the pmgr series cos of that
12:36j_ey2bed6110b919fae8760d120e953b4ff86c615970
12:36marcanthe japanese name for the apple was apparently coined in 1892
12:37alyssaj_ey: nod
12:38alyssaj_ey: it would be nice to get my "enable ANS" hack out of linux.py though
12:38alyssaone thing at a time
12:38nsklaus_marcan: if i follow you correctly, then 旭 is a more traditional/closer to primitive japanese derived from chinese, way of saying 朝日 ?
12:39alyssaj_ey: right, if I drop that commit everything works
12:39marcannsklaus_: as I understand it
12:39nsklaus_i never saw it spelled 旭 before, but i know only current japanese, and i may have overlooked that spelling too
12:40j_eyalyssa: cool!
12:41marcannsklaus_: it's in dictionaries :)
12:41marcanbut it's largely used in names
12:41marcanyou're right that 朝日 is much more common
12:41alyssaand now I can drop the "clk_ignore_unused" hack in my cmdline which was pretty awful, so that's nice 👍
12:42nsklaus_the closest i knew about was: 日の丸 or 丸の日
12:42marcanalyssa: 2bed6110 won't work as is "on purpose" because I hadn't decide if m1n1 should fix that borkage or we should just re-define it
12:42marcanI did mention this before :p
12:42alyssayeah sorry
12:43alyssaimo redefine but yes
12:43marcanyou want to remove ps_ans2 from ps_apcie_st and instead have the ans device node depend on both ps_ans2 and ps_apcie_st
12:43j_eymarcan: yeah but it's not a useful commit if youre trying to merge that branch into yours :P
12:43marcanj_ey: fair :p
12:43alyssaj_ey: My own fault really :-p
12:44alyssaguess I should uprev pinctrl next
12:44j_eyv2 coming soon(tm)
12:45alyssagit repo?
12:45marcan6012693c4203 pushed to fix that
12:45j_eyalyssa: I havent pushed it yet
12:45marcananyway, I'll rebase and add a bunch of register defines just for documentation's sake, maaybe implement auto-pm just to see how that goes, and throw it upstream soon
12:46marcanI do wonder if I should rename the driver though
12:46marcanI call it pstate but that could mean power or performance state
12:47marcanthere are separate performance state registers apparently (?)
12:47marcanso maybe pwrstate is a better name
12:47alyssadelightful
12:47marcanI really don't know what the perfstate regs do; xnu just initializes them all from ADT data and then ~never touches them afaict
12:47marcanI think I'll just make m1n1 do that
12:48alyssatreat it like tunables?
12:51marcanyes, all the info is in the adt
12:52marcanif linux has to manage some we can take care of that later, but at least that way it doesn't have to init everything
12:52alyssamy current excuse : can't do my homework because i'm debugging the kernel
12:55TheLinkmy excuses at that time of my life were much more lame :P
12:59* alyssastill having "fun" with the nvme pwr gates
13:00j_eyalyssa: you can also try adding 'always-on';
13:00j_eylike ps_imx has
13:01alyssano dice and I should really uh stop procrastinating on my homework now
13:03alyssai figure i'm doing something stupid on account of not having eaten breakfast yet
14:22svenah yes. i love how rebasing on the latest linux-next essentially triggers a full kernel rebuild. and ccache doesn't seem to help :(
14:22nbnm has quit [Read error: Connection reset by peer]
14:34nsr has joined #asahi
14:36yuyichao has quit [Ping timeout: 480 seconds]
14:36nsrHoy! Started around playing with asahi/m1n1, great&impressive stuff! One question though: I'm trying to access the ARMv8 PMU registers, but getting a SYNC exception upon trying. Couldn't find any solution yet, any insights? Is apple silicon locking those away?
14:39mazM1 doesn't have the architectural ARMv8 PMU.
14:40alyssasven: yep.
14:46nsrthx maz
14:47nsrare you aware of any substitute to get high-precision timers/clock-cycle count?
14:49maznsr: there's an IMPDEF PMU, but there is absolutely no documentation (or at least none I'm aware of) for the programming model or the characterisation of the events. that'd certainly be an interesting project for someone to RE! ;-)
14:50alyssamaz: nice nerdsnipe!
14:50mazalyssa: I learned from the best! ;-)
14:50alyssa"How is Asahi so far along? Are you guys just that talented?"
14:51alyssa"Recursive nerdsniping and focused procrastination."
14:51nsrindeed :D any pointers where to start with (e.g., at least some known mrs combinations?)
14:52nsrouh great, thx j_ey
14:52_jannau_nsr: at least parts of apple's pmu code is the in open source part of xnu. Apple also made more performance counters available in mac os recently
14:52yuyichao has joined #asahi
14:53jbowen has quit [Quit: leaving]
14:53maz_jannau_: do you happen to know if they have described the nature of the events in any sort of detail?
14:56_jannau_not sure if apple has documentation about the semantics of the counters in Instruments (part of xcode)
14:56alyssa_jannau_: instruments itself, probably no
14:56alyssathe json/xml/plists that instruments use, yes.
14:56alyssa/Library/ has all kinds of gems
14:58alyssaI think I saw AGX counters in there somewhere.
15:03brinly_ has joined #asahi
15:08brinly has quit [Ping timeout: 480 seconds]
15:08brinly_ is now known as brinly
15:25nctcf^ has joined #asahi
15:42marcanmaz: at least we know about the instruction/cycle counters :)
15:44marcanSYS_APL_PMC*
16:42phiologe has joined #asahi
16:48svenhuh... looks like i also just somehow managed to get one of the usb-c port into a broken state on my macbook air running macOS
16:49sven(rebooting will probably fix it, but this whole thing seems to be rather unstable :D)
16:51alyssasven: how'd you do that?
16:52sveni don't really know tbh
16:52sveni had both of them connected to my mac mini
16:52sventhen i disconnected it
16:52alyssai will not nerdsnipe myself into writing a jpeg driver i will not nerdsnipe myself into writing a jpeg driver i will not nerdsnipe myself into writing a jpeg driver i will not nerdsnipe myself into writing a jpeg driver i will not nerdsnipe myself into writing a jpeg driver
16:52svenand it looks like that got *both* m1 machines into a state where that port just refuses to work :D
16:53svenlike, i expect this with my horrible linux hacks
16:53svenbut the machine running macOS shows the same behaviour now :/
16:54alyssalowers the standards for linux :-p
16:54svenalyssa: so i hear you're writing a jpeg driver now? :>
16:55svenalso makes me more inclined to just do the full xhci reset every time a cable is unplugged
16:55alyssasven: i am TRYING to do my homework :-p
16:55alyssaand conveniently noticing the ADT for the JPEG block makes it seem especially simple to the extent it might be possible to just ... guess my way through
16:55svenif even doing _that_ makes it unstable i feel like trying to be clever and getting away with partial resets or PHY only resets might just make it worse
16:56marcanfwiw, I finally set up my M1 iMac
16:56marcanand I can confirm idevicerestore fails with in, for multiple reasons only one of which I've fixed so far :)
16:57marcanlast one is a general Monterey issue
16:58svenokay. rebooting the macbook air fixed the port again *sigh*
17:10roxfan has joined #asahi
18:07svenyup. and this works semi-reliably: connect both usb ports (maybe one is also enough), wait until the linux tells you that the serial gadget is attached and then unplug the cable.
18:07svensometimes the macbook air (running macOS) usb port is dead until i reboot
18:09svenwhy is everything usb so damn cursed :-(
18:10mazuniversal shit bus?
18:10svenyup :D
18:44yuyichao has quit [Ping timeout: 480 seconds]
18:53tomtastic_ has quit [Quit: ZNC - https://znc.in]
18:54tomtastic has joined #asahi
19:14fdsdcv has joined #asahi
19:33Orsira has joined #asahi
20:02aleasto has quit [Ping timeout: 480 seconds]
20:28d4ve has quit [Ping timeout: 480 seconds]
20:28d4ve has joined #asahi
23:34alyssaAnyone want to take bets on whether macOS actually uses the JPEG blocks?
23:36psykosei bet yes
23:36alyssalet's find out!
23:37miniI'll be surprised if it doesn't. I already see very very low CPU usage on AAC encodes which suggests to me macOS is using h/w encoding blocks
23:39alyssa(There's a kernel driver for JPEG seemingly capable of both encode and decode)
23:41alyssais macOS hanging or is the hypervisor just slow uhh
23:41alyssanope just slow I think
23:41alyssaOr, err..
23:48alyssaoh there is a kernel panic indeed. Ugh. What.
23:49psykosedo they make kernel xanax
23:49alyssaPlease go to https://panic.apple.com to report this panic
23:49alyssawell I mean if you insist
23:54alyssawhat even
23:56alyssaam i losing my mind here
23:57alyssawait so it boots fine when tracing DCP but not when tracing... nothing? uhm????
23:59alyssagoing to be so peeved if there's a race
…