ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
zumi_ has joined #asahi-dev
zumi has quit [Ping timeout: 480 seconds]
zumi_ is now known as zumi
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
jnn has joined #asahi-dev
Calandracas_ has joined #asahi-dev
jn has quit [Ping timeout: 480 seconds]
Calandracas has quit [Ping timeout: 480 seconds]
jnn is now known as jn
lockheed_marten has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
hexdump02 has joined #asahi-dev
prike1 has joined #asahi-dev
prike has quit [Ping timeout: 480 seconds]
prike1 is now known as prike
tobhe has joined #asahi-dev
cylm has joined #asahi-dev
tobhe_ has quit [Ping timeout: 480 seconds]
creddy has joined #asahi-dev
skipwich has quit [Remote host closed the connection]
skipwich has joined #asahi-dev
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
nora_ has joined #asahi-dev
nora has quit [Ping timeout: 480 seconds]
hdbngr has quit [Ping timeout: 480 seconds]
cyrozap_ has quit []
cyrozap has joined #asahi-dev
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
zumi_ has joined #asahi-dev
zumi has quit [Ping timeout: 480 seconds]
zumi_ is now known as zumi
hdbngr has joined #asahi-dev
hightower2 has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hightower3 has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
nela4 has joined #asahi-dev
cylm has quit [Ping timeout: 480 seconds]
hdbngr has quit [Remote host closed the connection]
hdbngr has joined #asahi-dev
liliboxy has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
nela4 has quit [Quit: bye!]
nela4 has joined #asahi-dev
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
Stary has quit [Quit: ZNC - http://znc.in]
Stary has joined #asahi-dev
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
nela40 has joined #asahi-dev
nela4 has quit [Ping timeout: 480 seconds]
nela40 is now known as nela4
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
pounce has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
zumi_ has joined #asahi-dev
nela40 has joined #asahi-dev
zumi has quit [Ping timeout: 480 seconds]
zumi_ is now known as zumi
hdbngr has quit [Ping timeout: 480 seconds]
nela4 has quit [Ping timeout: 480 seconds]
nela40 is now known as nela4
hdbngr has joined #asahi-dev
hdbngr has quit [Remote host closed the connection]
hdbngr has joined #asahi-dev
john-cabaj has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
pounce has joined #asahi-dev
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
alexaltea has quit [Remote host closed the connection]
alexaltea has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
liliboxy has quit [Quit: leaving]
Calandracas_ has quit [Ping timeout: 480 seconds]
<alexaltea> @sven i'm trying to get m2 (t8112) support on eiln's ane drivers. right now the dart code is a bit messy (hardcoded stream select/cmd/invalidate offsets for m1)
<alexaltea> i was wondering if we have any other drivers making use of the 0x4000-sized dart regs, just to see clean examples that I could follow to avoid code duplication
hdbngr has joined #asahi-dev
<jannau> alexaltea: can you point to the specific code. I don't quite follow what you're asking
<alexaltea> @jannau: apologies, here's the code: https://github.com/eiln/ane/blob/main/ane/src/ane_drv.c#L41-L54
<alexaltea> .select, .command, .invalidate are hardcoded with offsets for M1 darts, adding M2 dart support will require significant refactoring since command submission is also quite different: https://gitlab.com/fedora-asahi/kernel-asahi/-/blob/fedora-asahi-6.16/drivers/iommu/apple-dart.c#L535-547
lockheed_marten has joined #asahi-dev
<alexaltea> the question is: would you recommend copy-pasting code from `/drivers/iommu/apple-dart.c` into the ANE drivers? And if not, is there any better way to dealing with different dart models when writing a driver?
<chaos_princess> i might be wrong, but, why is it touching darts directly, that is not how you are supposed to write drivers
<alexaltea> yep, that's the better question. I have honestly no idea. I've emailed eiln about that, since I'd really like to get ane into an upstreamable state
<chaos_princess> ane is very difficult imo, there is no userspace for it
<chaos_princess> maybe reach out to tomeu vizoso about how to approach the whole matmul accelerators space correctly
<alexaltea> yes, I was planning to work on ane userspace after having a working driver that doesn't kpanic :D
<alexaltea> good point re tomeu vizoso, thank you!
<jannau> in first approximation it shouldn't access dart directly but use the dma api and gem-shmem helpers
<jannau> I forgot that ane did this
<alexaltea> thanks jannau
cylm has joined #asahi-dev
<alexaltea> also, it seems it uses actually dma/gem for dart0, most of the direct accesses are for dart1 and dart2
<chaos_princess> right, that
<chaos_princess> so, some devices like ane and isp have "linked darts" where you need all darts set to the same thing
<jannau> feel free to ask more questions
<chaos_princess> and isp/ane were originally made, we didn't have support for dealing with it all sanely
<chaos_princess> now i _think_, you just add all 3 darts into the device tree and it does the right thing
<chaos_princess> basically, copy what isp already does :P
<alexaltea> I had no idea about the linked darts, that helps. I'll try to replicate the isp code, thanks again
<chaos_princess> only replicate dealing with darts, the rest of the isp's iommu code - you probably shouldn't
<jannau> you should not need to do anything specific
<chaos_princess> yes, if i remember correctly, you just add all three and the iommu code will automatically replicate everything
<jannau> just add "iommus = <&ane_dart_0 0>, <&ane_dart_1 0>, <&ane_dart_2 0>;" to the device tree and defien those free dart instances
<jannau> see dwc3_0_dart_0 / dwc3_0_dart_1 for another example
Calandracas has joined #asahi-dev
<sven> yeah, this has been supported since dart was upstream specifically because usb needs this as well
bgb_ has joined #asahi-dev
bgb has quit [Read error: Connection reset by peer]
bgb has joined #asahi-dev
bgb_ has quit [Read error: Connection reset by peer]
bgb_ has joined #asahi-dev
bgb has quit [Read error: Connection reset by peer]
bgb has joined #asahi-dev
bgb_ has quit [Read error: Connection reset by peer]
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
fugi has quit [Quit: bye]
fugi has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
skipwich has quit [Ping timeout: 480 seconds]
skipwich has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
zumi_ has joined #asahi-dev
zumi has quit [Ping timeout: 480 seconds]
zumi_ is now known as zumi
creddy has quit [Ping timeout: 480 seconds]
cylm has quit [Ping timeout: 480 seconds]
bgb has quit [Remote host closed the connection]
bgb has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
bgb has quit [Remote host closed the connection]
bgb has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
john-cabaj has quit [Ping timeout: 480 seconds]
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev
hdbngr has quit [Ping timeout: 480 seconds]
hdbngr has joined #asahi-dev