#asahi-dev · 2023-08-06 03:41
marcanI literally linked it :p#asahi-dev · 2023-08-06 03:41
marcanthat is the same#asahi-dev · 2023-08-06 03:37
marcanhuh, nobody noticed that libvirt is broken? or is this a regression? https://gitlab.com/qemu-project/qemu/-/issues/1814#asahi-dev · 2023-08-04 23:01
marcanyes#asahi-dev · 2023-08-04 14:27
marcankettenis: also you need to make sure the CPUfreq is set to the lowest pstate when going idle#asahi-dev · 2023-08-04 14:25
marcanare you sure it's working? and dynticks and all that kind of stuff? the CPUs need to go idle and stay idle#asahi-dev · 2023-08-04 13:54
marcando you have the deep idle stuff hooked up?#asahi-dev · 2023-08-04 13:54
marcanI think I remember <0.5W on Linux for that?#asahi-dev · 2023-08-04 13:30
marcankettenis: definitely not off by a factor of 10, that would be too much.#asahi-dev · 2023-08-04 10:39
marcaneiln: very nice!#asahi-dev · 2023-08-04 08:47
marcanthat's how I found that 80% battery charge limiter#asahi-dev · 2023-08-04 08:47
marcanbut the keys for 13.0beta1 or something got posted#asahi-dev · 2023-08-04 08:47
marcanit is#asahi-dev · 2023-08-04 08:46
marcanwe can find out exactly how all this stuff is calculated#asahi-dev · 2023-08-04 08:46
marcanI mean we have schematics for some of these things, and plaintext SMC firmware for all the M1s :p#asahi-dev · 2023-08-04 08:45
marcanand >1W going elsewhere doesn't make any sense#asahi-dev · 2023-08-04 08:45
marcanI'm not sure what PSTR means in relation to PHPC#asahi-dev · 2023-08-04 08:45
marcanhonestly those numbers are kinda weird#asahi-dev · 2023-08-04 08:45
marcan System Total PSTR 0.2 W flt #asahi-dev · 2023-08-04 08:45
marcan Heatpipe PHPC 0.5 W flt #asahi-dev · 2023-08-04 08:45
marcan Battery PPBR 1.6 W flt #asahi-dev · 2023-08-04 08:43
marcan0.5#asahi-dev · 2023-08-04 08:43
marcanPPBR (battery power) is higher but I think that might be a lie, since it doesn't track PSTR well at all#asahi-dev · 2023-08-04 08:42
marcan(at which point I'd be very happy telling people they don't need real s2ram)#asahi-dev · 2023-08-04 08:42
marcanthat would be 250 hours of s2idle best case#asahi-dev · 2023-08-04 08:42
marcanso that's our target for figuring out runtime PM and whatever is eating power#asahi-dev · 2023-08-04 08:41
marcanunrelated note: finally got around to poking SMC from macOS. on an M1 air in screen-off idle, with SSH over WiFi active, PSTR claims 0.2-0.4W#asahi-dev · 2023-08-04 08:09
marcanyou don't actually block in the driver proper, you just add buffers to isp->buffers until there are enough to submit, and only submit at that point#asahi-dev · 2023-08-04 08:09
marcanwhere everything in either of the second two lists is also necessarily in queued_list#asahi-dev · 2023-08-04 08:08
marcanqueued_list is "buffers not owned by userspace", isp->buffers is "buffers owned by the device", and done_list is "buffers waiting to be dequeued by userspace"#asahi-dev · 2023-08-04 08:08
marcan(as well as remove from the main queued list)#asahi-dev · 2023-08-04 08:07
marcanbasically every time you call vb2_buffer_done those get put into a list, and dqbuf will pull from that list#asahi-dev · 2023-08-04 08:06
marcaneiln: my understanding of the queueing is this: https://gist.github.com/marcan/2ef2c3ecbf0aebf1459c1ce2adc960d2#asahi-dev · 2023-08-04 07:45
marcanlet me write this up in a gist#asahi-dev · 2023-08-04 07:42
marcanq is vb2_queue#asahi-dev · 2023-08-04 07:42
marcanwhat's p?#asahi-dev · 2023-08-04 07:39
marcanqbuf puts stuff into queued_list, and dqbuf grabs stuff from done_list#asahi-dev · 2023-08-04 07:39
marcanI think I'm right, one list is q->queued_list and the other q->done_list?#asahi-dev · 2023-08-04 07:37
marcanis that wrong?#asahi-dev · 2023-08-04 07:37
marcanlike the way I see this there are two queues, one of empty buffers and one of processed buffers, and buffers move from empty to processed under driver control, and from processed to empty under userspace control#asahi-dev · 2023-08-04 07:36
marcan*mark 2 done#asahi-dev · 2023-08-04 07:36
marcan... empty buffer in the queue. the next dequeue it grabs another processed buffer, since you still have 2 of those.#asahi-dev · 2023-08-04 07:36
marcanreqbufs is 3, you send 2 off to ISP. ISP comes back with that data, you mark 2 code. there are now 2 complete buffers in the queue and 1 empty buffer. user dequeues one of the complete buffers, and re-enqueues it. there are now 2 empty buffers in the queue, which you send off to ISP, and they come back. userspace dequeues one buffer from the processed list, and re-enqueues it. there is now 1 ...#asahi-dev · 2023-08-04 07:35
marcanlet me rephrase your scenario, tell me where I'm confused#asahi-dev · 2023-08-04 07:34
marcanbut it's not dequeuing empty buffers from the queue, it's dequeueing processed buffers, no?#asahi-dev · 2023-08-04 07:32
marcaneven if there are already buffers ready?#asahi-dev · 2023-08-04 07:31
marcaneiln: sorry if I'm completely misunderstanding the issue here, queueing shenanigans get hairy :(#asahi-dev · 2023-08-04 07:20
marcanwhere's the deadlock?#asahi-dev · 2023-08-04 07:20
marcanif the queue has 6 empty buffers, you request 6 frames from ISP, they come back. you mark all those buffers as full. userspace dequeues one, enqueues it, dequeues another one, enqueues it, etc. until it either runs out of all 6 or the driver decides to ask ISP for more data#asahi-dev · 2023-08-04 07:19
marcanI'm lost