mjg59 has quit [Read error: Connection reset by peer]
mjg59 has joined #asahi-dev
manawyrm has joined #asahi-dev
V_ has joined #asahi-dev
Dragoon has joined #asahi-dev
timokrgr1 has joined #asahi-dev
Dragoon is now known as Guest827
_andy_t_ has quit [Read error: Connection reset by peer]
timokrgr has quit [Ping timeout: 480 seconds]
timokrgr1 is now known as timokrgr
DarkShadow44 has quit [Ping timeout: 480 seconds]
jn has quit [Ping timeout: 480 seconds]
DragoonAethis has quit [Ping timeout: 480 seconds]
V has quit [Ping timeout: 480 seconds]
user982492 has joined #asahi-dev
jn_ is now known as jn
yuyichao has quit [Ping timeout: 480 seconds]
wCPO has quit [Quit: Ping timeout (120 seconds)]
Mary has quit [Quit: Ping timeout (120 seconds)]
Retr0id3 has joined #asahi-dev
gabuscus_ has quit [Remote host closed the connection]
wCPO has joined #asahi-dev
Mary has joined #asahi-dev
grange_c has quit [Quit: Ping timeout (120 seconds)]
grange_c has joined #asahi-dev
Retr0id has quit [Read error: Connection reset by peer]
Retr0id3 is now known as Retr0id
thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
gabuscus has joined #asahi-dev
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
os0 has joined #asahi-dev
yrlf2 has joined #asahi-dev
roxfan2 has joined #asahi-dev
grange_c1 has joined #asahi-dev
wCPO6 has joined #asahi-dev
dottedmag_ has joined #asahi-dev
minecrell0 has joined #asahi-dev
blasty_ has joined #asahi-dev
agraf_ has joined #asahi-dev
arekmx has joined #asahi-dev
pg12 has joined #asahi-dev
grange_c has quit [charon.oftc.net coulomb.oftc.net]
wCPO has quit [charon.oftc.net coulomb.oftc.net]
timokrgr has quit [charon.oftc.net coulomb.oftc.net]
V_ has quit [charon.oftc.net coulomb.oftc.net]
manawyrm has quit [charon.oftc.net coulomb.oftc.net]
gladiac has quit [charon.oftc.net coulomb.oftc.net]
yrlf has quit [charon.oftc.net coulomb.oftc.net]
akemin_dayo has quit [charon.oftc.net coulomb.oftc.net]
roxfan has quit [charon.oftc.net coulomb.oftc.net]
dianshi has quit [charon.oftc.net coulomb.oftc.net]
arekm has quit [charon.oftc.net coulomb.oftc.net]
minecrell has quit [charon.oftc.net coulomb.oftc.net]
Glanzmann has quit [charon.oftc.net coulomb.oftc.net]
IsfarSifat[m] has quit [charon.oftc.net coulomb.oftc.net]
GraysonGuarino[m] has quit [charon.oftc.net coulomb.oftc.net]
os has quit [charon.oftc.net coulomb.oftc.net]
suricato has quit [charon.oftc.net coulomb.oftc.net]
mariogrip[m] has quit [charon.oftc.net coulomb.oftc.net]
pg12_ has quit [charon.oftc.net coulomb.oftc.net]
MatthewLeach[m] has quit [charon.oftc.net coulomb.oftc.net]
ryanhrob1[m] has quit [charon.oftc.net coulomb.oftc.net]
sppdqd[m] has quit [charon.oftc.net coulomb.oftc.net]
blasty has quit [charon.oftc.net coulomb.oftc.net]
sproede[m] has quit [charon.oftc.net coulomb.oftc.net]
j`ey has quit [charon.oftc.net coulomb.oftc.net]
southey has quit [charon.oftc.net coulomb.oftc.net]
josipknezovic[m] has quit [charon.oftc.net coulomb.oftc.net]
legarts[m] has quit [charon.oftc.net coulomb.oftc.net]
foxtrot has joined #asahi-dev
xorly[m] has quit [charon.oftc.net coulomb.oftc.net]
wollymilkcap[m] has quit [charon.oftc.net coulomb.oftc.net]
Dementor[m] has quit [charon.oftc.net coulomb.oftc.net]
svenpeter[m] has quit [charon.oftc.net coulomb.oftc.net]
samfromspace[m] has quit [charon.oftc.net coulomb.oftc.net]
ryanhrob[m] has quit [charon.oftc.net coulomb.oftc.net]
RowanGoemans[m] has quit [charon.oftc.net coulomb.oftc.net]
rethematrix[m] has quit [charon.oftc.net coulomb.oftc.net]
nirusu[m] has quit [charon.oftc.net coulomb.oftc.net]
matthewayers[m] has quit [charon.oftc.net coulomb.oftc.net]
long[m] has quit [charon.oftc.net coulomb.oftc.net]
littledust3403[m] has quit [charon.oftc.net coulomb.oftc.net]
landscape15[m] has quit [charon.oftc.net coulomb.oftc.net]
lockna has quit [charon.oftc.net coulomb.oftc.net]
kjm99[m] has quit [charon.oftc.net coulomb.oftc.net]
houlton[m] has quit [charon.oftc.net coulomb.oftc.net]
ybk[m] has quit [charon.oftc.net coulomb.oftc.net]
ghantaz[m] has quit [charon.oftc.net coulomb.oftc.net]
fluffypup[m] has quit [charon.oftc.net coulomb.oftc.net]
citruscitrus[m] has quit [charon.oftc.net coulomb.oftc.net]
casperes1996[m] has quit [charon.oftc.net coulomb.oftc.net]
cde[m] has quit [charon.oftc.net coulomb.oftc.net]
maz has quit [charon.oftc.net coulomb.oftc.net]
dottedmag has quit [charon.oftc.net coulomb.oftc.net]
agraf has quit [charon.oftc.net coulomb.oftc.net]
vup has quit [charon.oftc.net coulomb.oftc.net]
Shiz has quit [charon.oftc.net coulomb.oftc.net]
Ziemas has quit [charon.oftc.net coulomb.oftc.net]
grange_c1 is now known as grange_c
dottedmag_ is now known as dottedmag
user982492 has joined #asahi-dev
gladiac has joined #asahi-dev
akemin_dayo has joined #asahi-dev
vup has joined #asahi-dev
maz has joined #asahi-dev
suricato has joined #asahi-dev
GraysonGuarino[m] has joined #asahi-dev
dianshi has joined #asahi-dev
Ziemas has joined #asahi-dev
timokrgr has joined #asahi-dev
V_ has joined #asahi-dev
manawyrm has joined #asahi-dev
IsfarSifat[m] has joined #asahi-dev
mariogrip[m] has joined #asahi-dev
ryanhrob1[m] has joined #asahi-dev
josipknezovic[m] has joined #asahi-dev
sproede[m] has joined #asahi-dev
legarts[m] has joined #asahi-dev
cde[m] has joined #asahi-dev
ybk[m] has joined #asahi-dev
xorly[m] has joined #asahi-dev
long[m] has joined #asahi-dev
landscape15[m] has joined #asahi-dev
littledust3403[m] has joined #asahi-dev
matthewayers[m] has joined #asahi-dev
rethematrix[m] has joined #asahi-dev
Dementor[m] has joined #asahi-dev
wollymilkcap[m] has joined #asahi-dev
svenpeter[m] has joined #asahi-dev
RowanGoemans[m] has joined #asahi-dev
ryanhrob[m] has joined #asahi-dev
ghantaz[m] has joined #asahi-dev
citruscitrus[m] has joined #asahi-dev
houlton[m] has joined #asahi-dev
fluffypup[m] has joined #asahi-dev
Shiz has joined #asahi-dev
lockna has joined #asahi-dev
casperes1996[m] has joined #asahi-dev
kjm99[m] has joined #asahi-dev
samfromspace[m] has joined #asahi-dev
nirusu[m] has joined #asahi-dev
j`ey has joined #asahi-dev
MatthewLeach[m] has joined #asahi-dev
sppdqd[m] has joined #asahi-dev
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
user982492 has joined #asahi-dev
<marcan>
jevinskie[m]: because the hypervisor stuff does not attempt to save/restore FP regs on every context switch, and in general we don't want to have to deal with ABI issues around them in experiments
dominic_ has joined #asahi-dev
dominic_ has quit []
<marcan>
sven: fwiw just setting msg.sub.version = 3; works on the new firmware, but I'm not sure if that's just because their backwards compat is broken
<marcan>
if it doesn't, try removing:
<marcan>
u8 rxcookie;
<marcan>
u8 txcookie;
<marcan>
from the sub structure
<marcan>
would be nice to know if it works on <12 with that
<marcan>
er sorry, that's from the cmd structure, so maybe actually it just works in <12 with that?
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jn has quit []
jn has joined #asahi-dev
user982492 has joined #asahi-dev
phiologe has joined #asahi-dev
PhilippvK has quit [Ping timeout: 480 seconds]
kov has quit [Quit: Coyote finally caught me]
kov has joined #asahi-dev
yuyichao has joined #asahi-dev
fluffypup[m] is now known as DiscoPenguin[m]
<marcan>
I think v4 just added cookie support, but the iboot protocol doesn't use that, so there's actually a good chance iBoot itself uses v3 even while macOS uses v4
<marcan>
DCP supports v3-v4
MajorBiscuit has joined #asahi-dev
<sven>
EPIC: received unexpected message during init
<sven>
EPIC: got unexpected message type 0 during command
<sven>
EPIC: started interface 0 (disp0-service)
<sven>
just hangs then
kdwk-l[m] has joined #asahi-dev
kdwk-l[m] has left #asahi-dev [#asahi-dev]
kdwk-l[m] has joined #asahi-dev
_andy_t_ has joined #asahi-dev
jtf has left #asahi-dev [WeeChat 2.6]
<sven>
if I add timeout to all those busyloops in afk and use version 3 at least DCP doesn't crash anymore though :D
feeleep[m] has joined #asahi-dev
Glanzmann has joined #asahi-dev
ghishadow[m] has joined #asahi-dev
aleasto has joined #asahi-dev
d4ve has quit [Remote host closed the connection]
d4ve has joined #asahi-dev
d4ve has quit [Remote host closed the connection]
d4ve has joined #asahi-dev
d4ve has quit [Remote host closed the connection]
d4ve has joined #asahi-dev
arekmx has quit []
arekm has joined #asahi-dev
<marcan>
sven: can you trace it?
d4ve has quit [Remote host closed the connection]
thevar1able has joined #asahi-dev
thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
thevar1able has joined #asahi-dev
<sven>
marcan: replies are TYPE_NOTIFY instead of TYPE_REPLY and rxcookie/txcookie doesn't seem to exist (which doesn't make a whole lot of sense)
<sven>
you should be able to reproduce this anyway by just setting version = 3 on 12.x, shouldn't you?
<marcan>
sven: version=3 on 12.x just works like version=4
<sven>
:/
<marcan>
txcookie/rxcookie not existing is expected, that is what I saw from REing the firmware
<marcan>
I think that TYPE_ stuff might be BS
<sven>
right, but the version is in this sub header while the cookies are in the main header which is... weird
<marcan>
I made that up, I didn't see the code that checks it if there isone
<marcan>
might be best to ignore it
<marcan>
cookies are in the command header
<marcan>
which is after the sub header
<sven>
i just had to remove it from the tracer fwiw
<sven>
otherwise construct wanted to eat more bytes than it had available somewhere
<marcan>
right
<marcan>
you can use optional for that
<sven>
if i wasn't hacking random stuff without understanding it, sure :D
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sven>
ok, seems to work now if I accept TYPE_NOTIFY instead of TYPE_REPLY as well
bisko has joined #asahi-dev
<alyssa>
woo!
leah has quit [Quit: WeeChat 3.3]
leah has joined #asahi-dev
thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
aleasto has quit [Quit: Konversation terminated!]
aleasto has joined #asahi-dev
aleasto has quit [Remote host closed the connection]
aleasto has joined #asahi-dev
aleasto has quit [Remote host closed the connection]
gladiac is now known as Guest945
gladiac has joined #asahi-dev
aleasto has joined #asahi-dev
Guest945 has quit [Ping timeout: 480 seconds]
aleasto has quit [Quit: Konversation terminated!]
<j`ey>
marcan: jannau has updated their spi-hid driver, maybe after dinner, or tomorrow you can fold in their changes
<alyssa>
spi
<marcan>
let me get some food and I can give it a quick look
<j`ey>
(there was some changes that made it actually boot on a few systems)
<alyssa>
booting overrated
<j`ey>
;_;
aleasto has joined #asahi-dev
yuyichao has quit [Ping timeout: 480 seconds]
<_jannau_>
a change whih made it work if the device was used before. resetting it via the gpio enable pin doesn't have the same effect as a reboot
<_jannau_>
also fixed build as module to reproduce the problem
aleasto has quit [Quit: Konversation terminated!]
aleasto has joined #asahi-dev
yrlf2 is now known as yrlf
okt has quit [Remote host closed the connection]
WhyNotHugo has quit [Remote host closed the connection]
coder_kalyan has quit [Remote host closed the connection]
<kettenis>
and there is a tas5770 chip for each speaker (one the speaker in the mini, 4 for the 13" mbp)
<povik>
yes
<kettenis>
how does the mca work?
<povik>
each speaker has different tdm slot on the i2s bus
<povik>
well that's quite a wide question :)
thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<povik>
it takes samples from the dma controller and serializes them on the i2s bus
<kettenis>
I understand it uses an "external" DMA controller to fetch samples from memory
<povik>
right
<kettenis>
can it send samples to the tas5770's and the cs42l83 simultaniously?
thevar1able has joined #asahi-dev
<povik>
yes, there are six (on M1 at least) so far identical clusters the MCA block is composed of
<povik>
and they work independently
<povik>
you can pick subunits of different clusters and wire them together also
<povik>
e.g. generate frame clock in cluster 0 and use it for serializing samples in cluster 1
<povik>
also you are free to select clock/data lines from any cluster on any i2c output ports
<povik>
*i2s
<povik>
(and presumably all applies analogously to deserializing samples off i2s lines and putting them into memory, haven't tried that direction yet)
<kettenis>
and it expects the dma controller to deliver samples in some common format and converts those into the format required by the tas5770's and cs42l83?
<povik>
there's a lot of knobs, most of them figured out, pertaining to formats
thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<povik>
so you have 8-bit, 16-bit or 32-bit samples delivered from dma, with their position in configurably long frames signalized out-of-band
<povik>
and you can choose endianness, lsb padding, sample-in-frame to tdm-slot mapping, et cetera
<povik>
you can probably even combine two dma streams and put them in different tdm slots on the same i2s bus
<kettenis>
heh, for now I'd be happy to support just a single stereo stream ;)
<kettenis>
thanks so far
<povik>
once you have driver for the dma controller, you can get a stereo stream working with few magic numbers
<kettenis>
oh, that'd help
<kettenis>
it seems the NCO for the speaker on the mini is already set up
<povik>
i can produce sample m1n1 script for a configuration you would be interested in, once you get to that
<kettenis>
that'd be great
<povik>
okay, let me know
<povik>
if the configuration is the speaker on mac mini, you have speaker_amp.py in experiments/ ofc
<povik>
with the magic numbers
<povik>
although not all of them, i am not sure
<povik>
it relies on iboot having configured the nco, and also maybe some other bits
<povik>
but i can clean that up
<kettenis>
not resetting anything yet, so I think the mini speaker is still set up
<povik>
yeah, maybe you don't even need to touch the mca
<alyssa>
boot chime :-p
<jannau>
I don't see anything in dcp traces (compared to macos 12) how I could have broken hotplug
<jannau>
dcp crashes during a series of callback after plugin out
<jannau>
my best guess is it is either something in the swap structure it doesn't like
<jannau>
the first missing callback compared to macos is
<jannau>
swap_complete_intent_gated
<jannau>
or it doesn't like that we don't listen on the other endpoints
<alyssa>
nod
<alyssa>
jannau: random guess, something about DCP_REMOVE_LAYERS or the hack added for swaps with no layers or something interacting?
<alyssa>
that first swap should probably be exactly 1 layer, but...
<jannau>
I'll test with macos 11 with the API change commit reverted
<alyssa>
that'd be good to know
<jannau>
I've tested with my dcp_flush changes so those are not responsible although I'm not convinced that they are a good idea
<alyssa>
nod
<jannau>
macos 12 does a swap with ".swap_enabled/completed = 0x80000007" after the unplug
<alyssa>
Ooh
<alyssa>
after the unplug, before the hotplug?
<alyssa>
if I recall, 0x80000007 = REMOVE_LAYERS | LAYER_0 | LAYER_1 | LAYER_2
<alyssa>
in other words, "remove all layers"
<alyssa>
This would be necessary to not crash the DCP
<alyssa>
since the DCP will keep rendering to any layer you've programmed forever
<alyssa>
until it's removed
<alyssa>
which means if you free() the framebuffer, the DCP will reference freed memory --> crash
<alyssa>
the OS needs to unbind the layer (0x80000001 in our case, we only use one layer for now)
<alyssa>
and wait until getting the swap completed
<alyssa>
and only then can it free the framebuffer
<alyssa>
for Linux, this should be modeled with the drm framebuffer reference counting
<alyssa>
as soon as we swap, the DCP holds a reference to the framebuffer
<jannau>
it crashes with macos 11 as well (with just the api change reverted)
<alyssa>
and we can't remove the reference until after we get a swap complete from REMOVE_LAYERS
<alyssa>
Alright
<alyssa>
not sure what to say, I mean, it worked for me but lots of stuff could have broken
<alyssa>
IIRC I tried to rebase the code in December and stuff broke like crazy
<jannau>
unrelated to my changes additional changes
<sven>
alyssa: no need to say anything. Just write a patch to fix it 😇
<alyssa>
sven: excuse me
<alyssa>
i wrote like a dozen patches for the gpu today
<alyssa>
and plan to write a dozen more soon
<alyssa>
unless you would, err, rather I exchange those dozen more patches for a single DCP patch that jannau was going to write this week anyway?
<jannau>
I assume the dcp code itself doesn't differ (much) from the previous working branch
<jannau>
so drm changes are the most likely suspect for problems
<alyssa>
100% possible
<alyssa>
(The likely one is "there was already a bug in the DCP code, but it was masked by the behaviour of the DRM core before, then the DRM core was changed and the bug was unmasked")
<alyssa>
(Not an actual regression in the DRM core itself)
<alyssa>
also, "DRM core" sounds so nefarious
<alyssa>
erm, I think 20211209 was the broken branch
<jannau>
yes, changes were ment neutral
<alyssa>
(I guess Dec 9 was when I tried to rebase and Everything Broke and I ran out of time and gave up)
<alyssa>
20211022 should have been working
<alyssa>
but I don't believe dcp/dart changed between those, just the rebase
<alyssa>
now.. I could've botched the rebase.....
<jannau>
drivers/gpu/drm/apple/ is identical
<jannau>
drivers/iommu/apple-dart.c has "writel(DART_STREAM_ALL, dart->regs + DART_STREAMS_ENABLE);" as addition
thevar1able has joined #asahi-dev
MajorBiscuit has joined #asahi-dev
<povik>
no complains from rob's binding bot on the nco series, i call this a success