#
…

2021-10-11

00:07jelly has quit [Ping timeout: 480 seconds]
00:32klangeMy stock of 64-bit ARM machines is rapidly increasingly...
00:53boardwalk1 has joined #asahi
00:59boardwalk has quit [Ping timeout: 480 seconds]
00:59boardwalk1 is now known as boardwalk
01:23jabashque_ has joined #asahi
01:24guan has quit [Ping timeout: 480 seconds]
01:24enomem has quit [Ping timeout: 480 seconds]
01:24nkaretnikov_ has joined #asahi
01:24eric_engestrom__ has joined #asahi
01:25jabashque is now known as Guest2461
01:25jabashque_ is now known as jabashque
01:25nkaretnikov has quit [Ping timeout: 480 seconds]
01:25nkaretnikov_ is now known as nkaretnikov
01:25cptcobalt has quit [Ping timeout: 480 seconds]
01:26Guest2461 has quit [Ping timeout: 480 seconds]
01:26eric_engestrom_ has quit [Ping timeout: 480 seconds]
01:27Vaughn has quit [Ping timeout: 480 seconds]
01:27steev has quit [Ping timeout: 480 seconds]
01:30steev has joined #asahi
01:36nkaretnikov has quit [Remote host closed the connection]
01:36eric_engestrom__ has quit [Read error: Connection reset by peer]
01:36steev has quit [Remote host closed the connection]
01:37jkkm has quit [Read error: Connection reset by peer]
01:37eichin has quit [Read error: Connection reset by peer]
01:38enomem has joined #asahi
01:38jelly has joined #asahi
01:38guan has joined #asahi
01:44cptcobalt has joined #asahi
01:44jkkm has joined #asahi
01:45nkaretnikov has joined #asahi
01:45eric_engestrom__ has joined #asahi
01:45steev has joined #asahi
01:45eichin has joined #asahi
01:50Vaughn has joined #asahi
02:26phiologe has joined #asahi
02:29PhilippvK has quit [Ping timeout: 480 seconds]
02:59bgb_ has joined #asahi
03:10darkapex2 has quit [Remote host closed the connection]
03:11darkapex has joined #asahi
03:24kov has quit [Quit: Coyote finally caught me]
03:24kov has joined #asahi
03:29marvin24 has joined #asahi
03:33marvin24_ has quit [Ping timeout: 480 seconds]
03:51doggkruse has joined #asahi
04:31doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:46bgb has joined #asahi
04:48doggkruse has joined #asahi
04:52bgb_ has quit [Ping timeout: 480 seconds]
04:56doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:04doggkruse has joined #asahi
05:09Glanzmann has quit [Quit: leaving]
05:37doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:15chadmed has quit [Quit: Konversation terminated!]
07:33bgb_ has joined #asahi
07:34bgb has quit [Ping timeout: 480 seconds]
08:18aleasto has joined #asahi
08:20aleasto has quit [Remote host closed the connection]
08:23aleasto has joined #asahi
08:23aleasto has quit [Remote host closed the connection]
08:26aleasto has joined #asahi
08:35bgb_ has left #asahi [WeeChat 3.0.1]
08:36bgb has joined #asahi
08:41darkapex1 has joined #asahi
08:43bgbI tried boot linux according to SW:Linux, but ended with brk exception. the log: http://paste.debian.net/1215023
08:45j_eytype 'lower()' it will get a bit further, might print out some stuff
08:46darkapex has quit [Ping timeout: 480 seconds]
08:47bgbjust stuck and no more output
08:47bgbI use main branch of AsahiLinux/linux and recently updated m1n1
08:48j_eymain is very old
08:50j_eyI would suggest using master from torvalds
08:53bgbok, but what about the config?
08:54j_eyI think arm64_defconfig should be enough
09:01povik has joined #asahi
09:02povikmarcan: that disappearing sound devices seem to related with assigning multiple power-domains to them in DT
09:02marcanah yes, you can't do that
09:02marcanmultiple PDs require explicit device support
09:02povikbe it the dma controller, or pcm device, if i assign multiple power domains, it's like they are ignored
09:03marcanyou need to explicitly instantiate them if there is more than one
09:03marcanbecause the genpd framework doesn't know what to do with more than one
09:03povikyeah, so i read in the genpd code
09:03marcanI would recommend using a single power domain for the audio devices, and instead representing extra dependencies in the power-controller nodes
09:03marcan(which do support multiple deps properly)
09:04povikbut i am surprised that the nodes in DT are then outright ignored, it's not just that the power domains don't get turned on
09:04marcanoh, I would not expect them to be ignored
09:04povikmarcan: is there support for some notion of virtual power domains with multiple parents?
09:04aleasto has quit [Ping timeout: 480 seconds]
09:04marcanthere isn't, not right now
09:04marcanwhat is your use case?
09:05marcanI think for most devices there would be one domain that is the device per se, and any other deps can be chained off of that
09:05aleasto has joined #asahi
09:05marcan(note that we don't have to have the same tree as the ADT, we know theirs is BS sometimes anyway)
09:05povikyeah if we deviate from the ADT power domain tree, then maybe there's no need for the virtual domains
09:05poviki will see how i can represent that
09:05marcanyeah, we're already doing that
09:05marcan(e.g. for ANS2)
09:06povikokay, okay
09:07* j_eytoo dumb for dt bindings
09:07povikaren't we all
09:08j_eydt bindings check is saying that my vendor property has to be a boolean? but i need it to be a number!
09:09kettenisis that the apple,npins property?
09:09marcanj_ey: the error messages from the binding check kind of suck
09:09j_eykettenis: yes
09:09marcanyou need a $ref to the type
09:09marcan apple,num-channels:
09:09marcan $ref: /schemas/types.yaml#/definitions/uint32
09:09marcan maxItems: 1
09:09marcan description:
09:09marcanthat is how you do it
09:10j_eythanks
09:10kettenisdon't think the maxItems is appropriate for a scalar type
09:10j_eywhat's num-channels from?
09:13marcanthe MCC driver I'm fixing up for submissing right now :)
09:14marcankettenis: scalar types usually use maxItems 1 AIUI, though maybe it's not necessary for things with a type ref already?
09:14j_eyi checked, uint32 has maxItems already
09:15marcanmakes sense
09:15kettenisthere is a uint32-array type for arrays
09:18linearcannon has quit [Read error: No route to host]
09:18linearcannon has joined #asahi
09:18marcanyeah, I used that one
09:19j_ey"description: The number of pins", feels like one of those comments: /* set x to 1 */ x = 1;
09:24kettenisj_ey: probably still useful if someone actually implements a tool to pretty-print the bindings for use by humans
09:25kettenisin other news, my 30bpp framebuffer support made it to u-boot master
09:25kettenishopefully the actual M1 support diff is next...
09:26j_eykettenis: I also realised that keyboard support is needed in u-boot, since that's how grub will get keyboard support via EFI protocols
09:26ketteniscorrect; usb keyboards work though
09:27arbtw, the keyboards in m1 macs are i2c-hid, or something funnier?
09:27j_eyar: spi
09:27bgbj_ey: upstream-bringup-v5-plus-nvhe works fine with arm64 defconfig. thanks :)
09:27j_eyyeah, I just thought that the built-in would be a 'nice to have at some point', but it's more necessary than I thought
09:28j_eybgb: I still recommend you use torvalds/linux master
09:28j_eybgb: your branch is from april
09:28povikso much trouble. why aren't you all content with using a kexec-based bootloader? :-p
09:29j_eythat was pipcet[m]'s approach!
09:30poviki stumbled upon their repo the other day, should look into what's there
09:35kettenisdon't think so
09:35marcanhttps://github.com/asahilinux/linux/tree/cpufreq/v1 if anyone wants to poke around before I send out an RFC
09:38j_eykettenis: oh, and add it to the require properties
09:39j_eymarcan: apple,memory-perf-config, these are just magic values from the ADT right?
09:39marcanthe highperf ones are from the ADT; the lowperf ones are the boot values
09:39marcan(I asked around and it seems they're the same for everyone)
09:39marcanthe xnu driver just reads the current values for that, but I don't like that
09:40marcana lot of deep research into memory controller performance might uncover what they mean, but... I don't think we should block on that.
09:40marcanin the future, if we have a better understanding, we can improve the binding and then just maintain backwards compat with the old style
09:41kettenisj_ey: that would be a good idea
09:41j_eymarcan: makes sense
09:41kettenismarcan: where did the opp-microvolt values in the CPU OPP tables come from?
09:41j_eymarcan: lol 'squelch this error' :D
09:42marcanwe don't use them, but I figure might as well document them
09:42marcanj_ey: yeah I dunno, the whole required-opps thing is kind of dodgy in the context of cpu OPP tables
09:42marcanthat's why this is an RFC
09:43marcanI'm going to grab some dinner, I'll collect any feedback once I'm back and fire off the series :)
09:46kettenismarcan: commit message mentioned 714, but you actually use 700
09:46marcanah derp, thanks
09:46kettenismight be confusing for someone doing repo archeology
09:47marcanj_ey: not intentional, thanks :)
09:47marcanokay, heading off, will read later!
09:48j_eydev_info(dev, "MCC performance driver initialized\n");, could say 'Apple MCC..' so minor that I feel like typing this out is silly
09:52aleasto has quit [Quit: Konversation terminated!]
09:52aleasto has joined #asahi
09:53aleasto has quit [Remote host closed the connection]
09:53aleasto has joined #asahi
09:53aleasto has quit []
09:58j_eymarcan: also in the same commit message with the 714/700 you have "CoreMark benchmark [1]", I guess the [1] was meant to have a link later at the bottom
10:03aleasto has joined #asahi
10:11bgbmarcan: cpufreq/v1 compiling ends with error, using arm64 defconfig
10:17j_eybgb: what's the error?
10:22povik has quit [Quit: Page closed]
10:52j_eymarcan: needs the _noclk ^
10:54bgbj_ey: yeah, just found that
11:10bgb has quit [Remote host closed the connection]
11:10bgb has joined #asahi
11:18gabuscus_ has joined #asahi
11:19Nspace has joined #asahi
11:22gabuscus has quit [Ping timeout: 480 seconds]
11:30Nspace has quit [Quit: Nspace]
11:37Nspace has joined #asahi
12:00bgbbooted ok after typo fix
12:02bgbp-cores run at 600MHz by default, how to mannually speed up them?
12:09alyssasven: congrats on i2c merge
12:09gabuscus has joined #asahi
12:13gabuscus_ has quit [Ping timeout: 480 seconds]
12:18chadmed has joined #asahi
13:48yuyichao_ has quit [Ping timeout: 480 seconds]
13:59arahael1 has joined #asahi
14:02jbowen has joined #asahi
14:04Arahael has quit [Ping timeout: 480 seconds]
14:15povik has joined #asahi
14:15Nspace has quit [Quit: Nspace]
14:20yuyichao_ has joined #asahi
14:29Nspace has joined #asahi
14:32Nspace has quit []
14:35Nspace has joined #asahi
14:43yuyichao has joined #asahi
14:47yuyichao_ has quit [Ping timeout: 480 seconds]
14:49marcanbgb: that depends on your governor, standard cpufreq stuff
14:49marcanbut they should be at 600MHz if they aren't doing anything
14:56svenremember how i was looking for a smaller hammer to fix this usb hotplugging issues? looks like i ended up with a bigger hammer instead to fix the "usb port breaks completely" problem that even macOS suffers from: there's a bit in the PHY registers which apple calls DRD_SW_VCC_RESET
14:57sveni noticed that i can also fix the port in macos when it goes to sleep. and it looks like macos sets that bit just before it disables power to dwc3
14:57ketteniswhat exactly happens when you toggle it?
14:58sveni think it resets whatever DWC3_GCTL_CORESOFTRESET resets + some more things
14:58svenstill trying to figure out the details
14:59Nspace has quit [Quit: Nspace]
15:00marcanasahi linux with USB more stable than macos when
15:01marcansven: can I tweet that? :)
15:01sveni guess
15:03svenso if that bit is set all dwc3 registers read as 0
15:03sventhis seems to be some kind of hard reset i guess
15:03marcanthat looks like what the pmgr reset does
15:03marcanon e.g. uart
15:03svenyeah, let me check if it also loses all state. but i'd expect that
15:05svenresets all state
15:08svenso i guess if you disconnect the cable at just the wrong time when two M1s are connected and one of them is in device mode the dwc3 controller on one of them just trips over and stops working
15:08svenuntil you hard reset the entire thing
15:08Nspace has joined #asahi
15:08marcanand this reset fixes it?
15:08marcanhahahaha
15:08svenneeds a PHY reset afterwards and a complete reinitialization but oh well
15:09marcanthe side that blows up is the device mode side?
15:09marcanand then even host mode doesn't work?
15:09sventhat's the warn_on alyssa ran into
15:09sventhe port broke completely for her afterwards
15:10svenit'll still WARN_ON, then i trigger that reset and then the port works again
15:10svenand sometimes my macbook air ends up as the device and then the same happens on that side
15:16svenyuup. this seems to work. now only sometimes the port on my macbook air breaks when it decides to be a device again once linux is up :D
15:16svenand then i put it to sleep, wait a few seconds, wake it up again and it also works there again :D
15:19svenso i guess atc-phy will also be a reset-controller now and dwc3 gets a "fun" quirk to reset_control_assert and then reset_control_deassert whenever a device is disconnected
15:22svenusb. not even once.
15:23marcanwell, more like dwc*, not even once
15:23marcanremember dwc2 is what's in raspberry pis and how well that worked
15:27mazfunny how anything designware ends up being a pile of crap...
15:35Nspace has quit [Quit: Nspace]
15:40alyssamaz: rk3288's dwc2 was unusable iirc
15:44svendidn't the rasparry pi one even require some horrible hack that had to be run like >9000 times per second?
15:49* j_eysets .use_relaxed_mmio = true to avoid more rants
15:54mazsven: yeah, they had to have a FIQ as some sort of high-priority interrupt. terrible thing.
16:14j_eymarcan: did you see the other comments about the cpufreq code?
16:14marcanapplying them now
16:31j_eyhmm, cant seem to boot macOS with SMP anymore: panic(cpu 0 caller 0xfffffe00124e04cc): "CPU4 has failed to respond to cross-call after 6000000000 nanos
16:31j_eyeconds (timeout = 6000000000 ns)"
16:32marcandid I break something with the IPI changes?
16:32marcanwhich version of macOS?
16:32j_ey11.4 I think it is, going to try by un-defining TIME_ACCOUNTING
16:47j_eymarcan: apparently b9f1eb29e9c84aa3cb0b75ab3ced144f019e4dff broke it
16:51j_ey(seems weird, maybe I borked my bisect)
16:51marcanj_ey: yeah that doesn't make any sense :)
16:51marcanit could just be random
16:57marcanfiring off the series, hope I didn't bork anything too much :-)
16:57marcan(well, it's an RFC...)
16:58mazmarcan: gahhh. I had just managed to get in Inbox under 500 emails...
16:58marcanI figured you might want to look at it :p
16:58marcanI'm at 497
16:58marcanand the emails are still going out
16:58marcanoh that's all, 498
16:58marcannow you need to review it so you can push me over the edge too ;)
16:59mazodd, I'm at 498 too. are you reading myh email? ;-)
16:59marcaninbox synchronicity, is this a thing with like-minded devs? ;)
17:00mazspooky action at a distance?
17:15_andy_t_ has joined #asahi
17:27j_eymarcan: bisected again, now it pointed at a16731e8b33fa492c000ed5d5b43bcfbb4a26a5c "hv_exc: Avoid delivering spurious HV-triggered IPIs to the guest"
17:27marcanthought so
17:28j_eyran each commit a few times while bisecting
17:28marcanbut I'm not sure what's broken there :)
17:30marcanmaybe some mpidr value is wrong?
17:30marcanmight want to add a break to those loops when it finds the mpidr, and a check for not found
17:32marcanit could be a memory barrier problem too
17:34marcanj_ey: try adding a sysop("dsb sy") after those queued flag sets
17:34marcan(probably overkill but)
17:34marcanthough I think the spinlock should guarantee that is not needed if we wrote it properly, but...
17:34j_eywill try in a bit
17:42doggkruse has joined #asahi
17:50kenjigashu has joined #asahi
17:58kenjigashu has quit []
18:00kenjigashu has joined #asahi
18:16yuyichao_ has joined #asahi
18:20yuyichao has quit [Ping timeout: 480 seconds]
18:27rross101 has joined #asahi
18:29rross101 has quit [Remote host closed the connection]
18:35kenjigashu has quit []
18:37joske has joined #asahi
18:39rross101 has joined #asahi
18:40rross101 has quit [Remote host closed the connection]
18:41Nspace has joined #asahi
18:43rross101 has joined #asahi
18:44rross101 has quit [Remote host closed the connection]
18:54Nspace has quit [Quit: Nspace]
18:55Nspace has joined #asahi
18:55joske has quit [Remote host closed the connection]
19:16Nspace has quit [Quit: Nspace]
19:21kenjigashu has joined #asahi
19:22kenjigashu has quit [Remote host closed the connection]
19:25jacoxon has joined #asahi
19:26rross101 has joined #asahi
19:29rross101 has quit [Remote host closed the connection]
19:47yuyichao has joined #asahi
19:50yuyichao_ has quit [Ping timeout: 480 seconds]
20:06jbowen has quit [Read error: Connection reset by peer]
20:07jbowen has joined #asahi
20:26Nspace has joined #asahi
20:28kettenisthat discussion developed into something that may interest folks here
20:36doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:42jacoxon has quit []
20:42j_eykettenis: Im a bit confused by the mention of m1n1 at the end, it sounded like some offline tooling.. but the m1n1 mention made it sound like something else?
20:42jacoxon has joined #asahi
20:50jacoxon has quit []
20:50kettenisIn the end m1n1 is going to provide the device tree that is actually going to be used
20:50kettenisBut the device trees (and bindings) are maintained in the Linux kernel tree
20:51kettenisSo the question is how we're going to make sure these stay in synch
20:52kettenis(U-Boot will have a copy too that needs to be kept in synch, but that isn't really that important for us)
20:52eric_engestrom__ has quit []
20:52eric_engestrom has joined #asahi
20:53j_eyI was thinking m1n1 was just going to take the one from linux
20:54kettenisThere may be cases where we want m1n1 to be ahead of Linux for a bit
20:55kettenisSay Apple releases a new model that doesn't need new drivers
20:55kettenisWe create a device tree for it and ship an updated m1n1
20:55kettenisThen all OSes will just work
20:56j_eyoh yeah, that case makes sense
20:56j_eyor at least if most of the drivers work for a usuable enough system
20:56kettenisBut we don't really want to wait for the next Linux kernel merge window to open to be able to do that
20:57kettenisNow if we wrote the DT schemas correctly, it should just be a matter of verifying the device tree using the new schema
20:57kettenisI mean verify the new device tree with the existing schema
21:13jacoxon has joined #asahi
21:16jacoxon has quit []
21:16jbowen has quit [Quit: leaving]
21:17jacoxon has joined #asahi
21:22jacoxon has quit []
21:37Nspace has quit [Quit: Nspace]
22:26povik has quit [Quit: Page closed]
22:29yuyichao_ has joined #asahi
22:31aleasto has quit [Quit: Konversation terminated!]
22:33yuyichao has quit [Ping timeout: 480 seconds]
22:35doggkruse has joined #asahi
22:57alyssaj_ey: fwiw I've seen hv+smp+macOS panic during boot totally randomly
22:57alyssaprobability bisection idk
23:05j_eyalyssa: yeah but this was failing 3/4 times
23:07yuyichao has joined #asahi
23:10yuyichao_ has quit [Ping timeout: 480 seconds]
23:10hspak has quit [Quit: The Lounge - https://thelounge.chat]
23:12alyssaj_ey: yeah that matches my experience
23:12alyssabut even that is high enough pass to screw up a bisect
23:12hspak has joined #asahi
23:24Nspace has joined #asahi
23:49yuyichao has quit [Ping timeout: 480 seconds]
23:50Nspace has quit [Quit: Nspace]
…