#
✕ nick:lina
#asahi-dev · 2023-09-29 15:13
linaAaaaa we're using wait_event_interruptible_timeout() for commands ;;
#asahi-dev · 2023-09-29 15:11
linaI think there is something weird that happens when you kill -9 the app using the camera. Shutdown fails, but I see the same VB2 callbacks getting called...
#asahi-dev · 2023-09-29 15:02
linaThe recovery stuff I tried to add doesn't work... it gets the PS going, but then random CPUs get wedged immediately after that ;;
#asahi-dev · 2023-09-29 13:37
linaPushed some pmgr-related stuff, hope it improves the Âcorner cases...
#asahi-dev · 2023-09-29 12:37
linaeiln: I'm running into a rare pmgr issue where the main isp_sys domain refuses to power on with bit 0x800 set, and setting bit 0x1000 fixes/resets it. I'll try to figure out what that means... I think it's one of the ones you used?
#asahi-dev · 2023-09-29 11:04
linaI want to hit the weird error handling corner cases, not just clean exit
#asahi-dev · 2023-09-29 11:03
linaThe point is actually letting it exit uncleanly ^^
#asahi-dev · 2023-09-29 10:56
linaOK ^^
#asahi-dev · 2023-09-29 10:56
linaI also fixed vertical video in ffmpeg ^^ (sent them the patch)
#asahi-dev · 2023-09-29 10:55
linaThis is what I'm running now: while true; do timeout -k 1 -s 9 $((1+RANDOM%3)).$(printf %03d $((RANDOM%1000))) gst-launch-1.0 v4l2src ! 'video/x-raw,width=720,height=1280' ! videoconvert ! fakesink; done
#asahi-dev · 2023-09-29 10:55
linaBasically error/early abort handling needs work I think
#asahi-dev · 2023-09-29 10:55
linaI'm running gstreamer in a random kill loop now to see if I can find any weird races. So far one thing I am seeing is DART translation faults after shutdown, and also I think the suspend thing doesn't work in some cleanup paths?
#asahi-dev · 2023-09-29 10:54
linaeiln, janneg: Pushed a bunch of fixes and refactoring to my branch again, but I didn't get around to looking at t8112... I think there are still weird races and things like that around startup/shutdown.
#asahi-dev · 2023-09-28 16:23
linaWasn't DCP like that too?
#asahi-dev · 2023-09-28 16:23
linaI think it might need that
#asahi-dev · 2023-09-28 15:57
linaAnd yeah that m1n1 bug with the bad condition... I knew about that and totally forgot to fix it ^^;;
#asahi-dev · 2023-09-28 15:57
linaI'll look at 413 then, and I think 415 should be identical (just different platform ID but hopefully nothing that affects us)
#asahi-dev · 2023-09-28 15:56
linaj493 is my streaming machine so... I don't think I'm going to be streaming that... but I can probably borrow marcan's j413 and make sure it works there. It kind of sounds like that PIODMA thing is something else?
#asahi-dev · 2023-09-28 15:55
linaeiln: Also Apple says j413 is 1080p, only j493 should be 720p ^^
#asahi-dev · 2023-09-28 15:53
linaI hope gstreamer and libcamera don't have that problem...
#asahi-dev · 2023-09-28 15:53
linajanneg: Do you want me to look at M2 tomorrow? I'm going to be tying loose ends on the camera stuff (Apparently I have an ffmpeg patch to write to make vertical video work... It turns out supporting strides needs a big refactor of the v4l2 avdevice...)
#asahi-dev · 2023-09-28 15:52
linaeiln: But it says MLVNR disabled in that log and it's not dying the same way?
#asahi-dev · 2023-09-27 11:30
linaeiln: In case you're around, I'm going to start a (late) stream in 30 mins ^^
#asahi-dev · 2023-09-26 04:07
linaLook at how MTP/rtkit-helper do it, Ithere re no cross calls on that one but you get the idea.
#asahi-dev · 2023-09-26 04:06
linaISP should then wait for ANE, if it can't find it on probe it needs to return EPROBE_DEFER
#asahi-dev · 2023-09-26 04:06
linaAnd you use the device link stuff to set up the link
#asahi-dev · 2023-09-26 04:06
linaIf you want to hook up ANE for real, what you do is set it up as a separate device and reference it with a custom phandle property from ISP, then you can get a reference to the device/drvdata that way and just make up whatever API you want between the two modules
#asahi-dev · 2023-09-26 04:05
linaAnd I'm pretty sure I can get this to work, just needs the buffer thing fixed but I can work on that on wednesday!
#asahi-dev · 2023-09-26 04:05
linaeiln: 13.5 is the one that has the platform id check, before that this hack wouldn't work ^^
#asahi-dev · 2023-09-25 05:02
linaI can probably fix this on wednesday ^^
#asahi-dev · 2023-09-25 05:01
linaNow it crahshes probably because the way I hacked up the buffer logic is wrong...
#asahi-dev · 2023-09-25 05:01
linaI think I got some frames... ^^;;
#asahi-dev · 2023-09-25 04:57
linaaaaaaa the top bits difference!!!!
#asahi-dev · 2023-09-25 04:56
linaI think there's another problem in the buffer callback logic
#asahi-dev · 2023-09-25 04:56
linaI tried making it submit more and now it looks like we don't get frames back...
#asahi-dev · 2023-09-25 04:52
linaeiln: I think it's just a bug in the buffer logic in the driver... it looks like we only submit one buffer on startup.
#asahi-dev · 2023-09-25 04:26
linaI found out the logic changed somewhere in 13.5 (vs 13.2 which I was looking at) and it only enables MLVNR for certain platforms... so I tried clobbering the platform ID in firmware data directly, and restoring it after the config set so we don't break too much, and it worked. Just like profile #0, no MLVNR, no buffer allocs... but still fails on the meta thing.
#asahi-dev · 2023-09-25 04:24
lina(the meta thing)
#asahi-dev · 2023-09-25 04:24
linaSooo.... we need to solve that either way...
#asahi-dev · 2023-09-25 04:24
linaeiln: OMG I got it to "work" with a horrible hack writing to firmware memory... except now I have exactly the same problem as profile #0
#asahi-dev · 2023-09-25 03:35
linaOn the other hand initializing ANE has a nice trivial arbitrary u32 write... so if we ever need to mess with firmware memory and can't do it directly... that's one way... ^^;;
#asahi-dev · 2023-09-25 03:30
linaeiln: Fake initializing ANE doesn't work. I got it to get through the buffer allocs, but then it actually tries to initialize the ML model and times out on ANE not actually replying...
#asahi-dev · 2023-09-24 15:49
linaThat's for text and rodata only
#asahi-dev · 2023-09-24 15:35
linaThis is some really, really ugly hack they added for this version...
#asahi-dev · 2023-09-24 15:35
linaSo... either we make preset 0 work somehow, or we do something really evil like write directly into firmware memory somehow...
#asahi-dev · 2023-09-24 15:34
linaAnd I can't find a way to override the logic that goes from that to initializing the buffers when starting the channel...
#asahi-dev · 2023-09-24 15:33
linaeiln: I finally found the logic... It's literally if (preset != 0) { enable mlvnr }
#asahi-dev · 2023-09-23 16:09
linaAlright, let's go with that!
#asahi-dev · 2023-09-23 16:09
linaIs 1PM a good time? My usual start time when things aren't going crazy... just on the wrong day ^^
#asahi-dev · 2023-09-23 16:08
linaI think I can probably do another stream tomorrow then! ^^

plus ›