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
allmazz_ has quit [Quit: leaving]
allmazz has joined #asahi-dev
allmazz_ has joined #asahi-dev
allmazz has quit [Ping timeout: 480 seconds]
tobhe_ has joined #asahi-dev
hexdump01 has joined #asahi-dev
tobhe has quit [Ping timeout: 480 seconds]
hexdump0815 has quit [Ping timeout: 480 seconds]
allmazz_ has quit [Quit: leaving]
allmazz has joined #asahi-dev
cylm_ has quit [Ping timeout: 480 seconds]
WindowPain has quit [Quit: Ping timeout (120 seconds)]
WindowPain has joined #asahi-dev
nora_ has joined #asahi-dev
nora has quit [Ping timeout: 480 seconds]
the_sea_peoples has quit []
the_sea_peoples has joined #asahi-dev
mattia013 has quit [Remote host closed the connection]
mattia013 has joined #asahi-dev
the_sea_peoples has quit []
the_sea_peoples has joined #asahi-dev
ddxtanx has quit [Read error: Connection reset by peer]
ddxtanx has joined #asahi-dev
the_sea_peoples has quit []
bacarrdy has quit [Ping timeout: 480 seconds]
bacarrdy has joined #asahi-dev
bacarrdy has quit [Ping timeout: 480 seconds]
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
chadmed has quit []
chadmed has joined #asahi-dev
glem8100548899 has joined #asahi-dev
bacarrdy has joined #asahi-dev
bacarrdy has quit [Ping timeout: 480 seconds]
bacarrdy has joined #asahi-dev
bacarrdy has quit [Ping timeout: 480 seconds]
okb has joined #asahi-dev
bacarrdy has joined #asahi-dev
bacarrdy has quit [Ping timeout: 480 seconds]
bacarrdy has joined #asahi-dev
martinr has joined #asahi-dev
<martinr> so I finally got around to finishing up VDM support for tipd - is anyone with a second M1 device interested in helping me test serial mode? my M1 iPad Pro does respond to VDMs, but doesn't appear to output anything over serial at boot-time unfortunately
<chaos_princess> sure, how do i test it?
<martinr> so I think we need to apply that patch to the tipd module on one device, connect the two M1 devices together with a USB3 cable (w/ SBU wires), then 'echo 1' to /sys/class/typec/port0/device/cd321x_vdm/serial - and then hopefully they should be able to talk to each other on /dev/ttySAC0 or /dev/ttySAC2
okb_ has joined #asahi-dev
<martinr> */dev/ttySAC0 for the back port i think
okb has quit [Ping timeout: 480 seconds]
<chadmed> ??
<chaos_princess> patching out the check does not help btw
<chaos_princess> i also get a bunch of this dmesg spam https://pastebin.com/PdvmgHBi
<martinr> chaos_princes: ok there is something quite different about the m1 pro then
<martinr> i expected the patching out the strlen check to work
<martinr> as for the spam, that is the sysfs object not being removed on device/module reload
<martinr> which is a bug I had encountered but is fixed on my end
<chadmed> different vdm key for t600x perhaps?
<martinr> has macvdmtool been tested on t600x?
<chadmed> unclear from the commit history but perhaps not
Calandracas__ has joined #asahi-dev
Calandracas_ has quit [Ping timeout: 480 seconds]
Calandracas_ has joined #asahi-dev
<martinr> chaos_princess: thanks for the help anyways - i'll see if I can find anything more on the keys
<chaos_princess> sure
Calandracas__ has quit [Ping timeout: 480 seconds]
<jannau> I think there are people using macvdmtool on all devices
martinr has quit [Ping timeout: 480 seconds]
martinr has joined #asahi-dev
cylm has joined #asahi-dev
<martinr> chaos_princess: ok I don't think it's key related - I managed to reproduce the -1 error codes on my M1 MBA, and bumping up the VDM command timeout seems to help, would you mind trying again?
<chaos_princess> sure, give me a few mins
<martinr> no rush
<martinr> i couldn't recreate the sysfs issue but we'll leave that for later
<chaos_princess> yep, still not working
<chaos_princess> actually, wait
<chaos_princess> ok, nvm, i am stupid, it works
<chaos_princess> dfu port is port1 on j314
<martinr> are you getting anything on the serial console?
<chaos_princess> i could talk between machines over serial with picocom
<martinr> nice
<martinr> thanks
<chaos_princess> sysfs spam is still a thing though
<martinr> yeah I'm not sure what's going on there, can I get a full dmesg?
<martinr> it should only try to create the sysfs object when the module is loaded
<chaos_princess> https://pastebin.com/ymNM30Xu - that should be all the relevant bits
chadmed has quit [Quit: Konversation terminated!]
<martinr> ...unless i dont understand when tps6598x_probe is called
<chaos_princess> i think i maybe see the issue
<chaos_princess> are you building as module or built-in?
chadmed has joined #asahi-dev
<martinr> module
<martinr> loading in with insmod
chadmed has quit []
chadmed has joined #asahi-dev
<chaos_princess> built-in here, and it seems like your thing probes before the supplier devices do. so something returns EPROBE_DEFER after you created the sysfs entries, and you never clean up those on error
<martinr> ah you mean it is loading in too soon as a built-in?
<chaos_princess> yes, but it is more that you are not cleaning up everything that you should if something errors out
<martinr> ok i think i see the fix
martinr has quit [Quit: WeeChat 4.3.4]
pb17 has quit [Ping timeout: 480 seconds]
pb17 has joined #asahi-dev
martinr has joined #asahi-dev
<martinr> chaos_princess: sysfs entries should now be removed on all errors during probe, I don't see any dmesg messages when building as a built-in, feel free to verify if you'd like
<chaos_princess> you got the order wrong, now all other errors will cause a non-existent sysfs groups to be removed
<martinr> so entry creation should be near start of probe, right?
<chaos_princess> no, just drop entry cleanup at all. the fact that you moved the creation to the end is enough
<martinr> ok, thanks
<chaos_princess> and you may or may not want to add a goto entry_disconnect after dev_err(tps->dev, "Couldn't register sysfs group for CD321x VDMs\n");
<chaos_princess> depending on if it is ok to operate in this "degraded" state
<martinr> that makes sense
<chaos_princess> *err_disconnect
<martinr> first kernel driver attempt so I appreciate the hints
<martinr> i think it makes sense to keep the rest of tipd working if there's an issue with the VDM feature, especially because a device reset won't help with the sysfs creation error
<martinr> none of the added code will be used without a write to sysfs
<chaos_princess> up to you
martinr has quit [Quit: WeeChat 4.3.4]
martinr has joined #asahi-dev
<martinr> ok I think that looks pretty good, I went back and fixed the strlen check too
<amarioguy2> quick question - if we want to redirect the timer IRQ to the guest (as an vIRQ, not enabling the FIQ in EL1 or injecting a virtual FIQ) where would it be best to inject a virtual IRQ in the HV exception handler?
<amarioguy2> my first guess would be the start exception lower proxy call?
rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
Guest18690 has quit [Quit: Bridge terminating on SIGTERM]
rhysmdnz has joined #asahi-dev
Guest20458 has joined #asahi-dev
<amarioguy2> (in case it helps - i'm envisioning the flow here as: timer FIQ fires, traps to EL2, masks the FIQ for a bit to handle it, then HV kicks it to the guest as a virtual IRQ where it proceeds from there)
yuka has quit [Remote host closed the connection]
yuka has joined #asahi-dev
allmazz_ has joined #asahi-dev
allmazz has quit [Ping timeout: 480 seconds]
cylm_ has joined #asahi-dev
cylm has quit [Ping timeout: 480 seconds]
martinr has quit [Quit: WeeChat 4.3.4]