#
…

2023-01-01

00:00steven has quit [Quit: ZNC 1.8.2 - https://znc.in]
00:01steven has joined #asahi-dev
01:10goldsoultheory has joined #asahi-dev
01:18goldsoultheory has quit [Ping timeout: 480 seconds]
01:50eiln has quit [Remote host closed the connection]
02:33hightower3 has joined #asahi-dev
02:40hightower2 has quit [Ping timeout: 480 seconds]
03:37nicolas17 has quit [Ping timeout: 480 seconds]
03:41eiln has joined #asahi-dev
03:57hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:03eiln has quit [Remote host closed the connection]
04:29eiln has joined #asahi-dev
04:31eiln has quit [Remote host closed the connection]
04:31eiln has joined #asahi-dev
04:34eilnnvm figured it out was a platform resource issue (why does this always happen right after..)
04:35eiln4200 is half precision for 3 btw ;))
04:35eiln"tethered" bc needs to reboot after every run
04:35eilnengine aic irq wants to go to dart for whatever reason
04:58eiln has quit [Quit: Page closed]
05:00Hibyehello has joined #asahi-dev
05:04Hibyehello has quit [Read error: Connection reset by peer]
05:08nicolas17 has joined #asahi-dev
05:17jluthra has quit [Remote host closed the connection]
05:17jluthra has joined #asahi-dev
05:25SSJ_GZ has joined #asahi-dev
08:19lumen has joined #asahi-dev
08:19nicolas17 has quit [Quit: Konversation terminated!]
08:24apxmachit has joined #asahi-dev
08:26lumenwould something like this be unnecessarily detailed to get into kernel development? https://github.com/0xAX/linux-insides/blob/master/SUMMARY.md i assume chapter "Initialization" and onwards would be the most useful. apologies for the cross-post between channels, asked here as well so i don't clutter the other channel.
08:28lumenany other suggestions?
08:28lumenwas also thinking of reading some of "Linux Kernel in a Nutshell" by Greg Kroah + "Linux Kernel Development" by Robert Love.
08:32apxmachitim not part of asahi development but i find that way of thinking usually doesn't work for me. What specifically are you trying to contribute to Asahi?
08:35lumeni don't have something specific in mind at the moment, just looking for a challenge and a learning experience
08:40apxmachithmm idk then. Usually for me I have something in mind I want to do, and I build the learning and the experience around that to keep me motivated. Like if I wanted to get into asahi I would probably download it and use it as much as possible, get involved with issues and bugs, and find something to jump in on. Try to have some sort of goal. But yeah those resources look good so do what is best for you
08:41lumenyeah that was one approach i wanted to take - use the system extensively till something breaks, then go and fix it, etc.
08:42lumenthank you
08:49wonjongbot has joined #asahi-dev
08:53Cyrinux has joined #asahi-dev
08:54apxmachit has quit [Quit: Page closed]
09:02lumen has quit [Quit: Lost terminal]
09:06marcanjannau: is it possible "opaque" actually means "premultiplied alpha"?
09:07marcanthat would mean that for a black background, alpha is effectively irrelevant
09:08marcanbut it would show through the Apple logo-shaped remnant of surface[0] as an additive blend when alpha=0 (which I think is what happens in SDDM) for a surface[1] above it
09:09marcanonly for argb formats of course, with a=0, since opaque formats like 10-bit would implicitly have a=1
09:10marcanwe should still clear surface[0] of course, since even if we make [1] opaque that still wastes power
09:10marcanbut we need to find another way of implementing XRGB formats
09:10marcanI think there is a color component thing that might let us implement a color swizzle?
09:29whomst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
09:31whomst has joined #asahi-dev
10:14wonjongbot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:17wonjongbot has joined #asahi-dev
10:19wonjongbot has quit []
10:20jannaumarcan: possibly although it appears little strange that it is required for overlaying YUV formats. I put it on my todo list for testing. I think it's also worth checking if there's a global alpha field in the surface struct
10:21wonjongbot has joined #asahi-dev
10:29wonjongbot has quit [Ping timeout: 480 seconds]
10:44marcanjannau: confirmed, it's a premultiplied flag
10:46hightower3 has quit [Ping timeout: 480 seconds]
10:57hightower2 has joined #asahi-dev
12:09ChaosPrincess has quit [Quit: WeeChat 3.7.1]
12:15ChaosPrincess has joined #asahi-dev
12:21kettenis_looks like powering off the wifi chip (through the SMC gpio) saves a bit over 0.1 W in power
12:22kettenis_ is now known as kettenis
12:32kettenisputting the p-Cluster in the "deep WFI" state also saves a bit more than 0.1 W
12:42marcankettenis: putting the p-cluster in deep WFI should save quite a lot more than 0.1 W
12:42marcanwe are currently burning power on static leakage in the CPU clusters
12:43marcanand also dynamic power on the uncore areas
12:43marcanI'm pretty sure deep WFI should actually power down the cluster
12:44kettenis"deep WFI" is the state where it loses the GPRs but otherwise stays alive
12:45kettenis(I write code similar to what you wrote for m1n1 when you were experimenting with the turbo states)
12:45ketteniss/write/wrote/
12:46kettenisbut yes, we really want to power down the cluster completely for suspend
12:57zkrx has quit [Ping timeout: 480 seconds]
12:58zkrx has joined #asahi-dev
12:58jannaudid you test that on m1 pro / max as well? those have currently an unreasonable idle power use of ~5W, m2 is more reasonable with less than 1W assuming PHPC measures more or less the same things
13:01kettenisthis is on M2
13:02kettenisPHCP reports something like 0.77W when I come out of "suspend" with one e-core running code
13:03kettenisPSTR reports ~1.9W
13:03ketteniscan try this code on m1 pro
13:10kettenisSYS 5405363
13:10kettenisCPU 2501957
13:10kettenisSYS=PSTR, CPU=PHCP
13:10kettenisbefore suspend this was
13:10kettenisSYS 14909630, CPU 3311439
13:11kettenismachine idle, with the display on
13:12kettenisguess your 5W is from m1 max?
13:14jannauyes, from a m1 max. is suspend with both p clusters in deep WFI?
13:16kettenismy current OpenBSD hack puts all cores in this "deep WFI" state
13:16kettenisbut obviously at the point I call the SMC code the primary CPU (an e-core) is running, so no longer into that deep state
13:19kettenisoh, actually those figures were measured with a usb cable connected causing the machine to think power is connected
13:20kettenisSYS 4574661, CPU 2538621
13:20ketteniswhen suspended
13:20kettenisSYS 6643164, CPU 3820596
13:20ketteniswhen idle (now with the screen off)
15:33marcankettenis: I expect the cluster to actually power down in deep WFI (that's why it loses state)
15:33marcanit wouldn't lose state if it didn't actively shut down power to something
15:36marcanjannau: https://gist.github.com/marcan/d93ebdffce5b36be9aaa06079a60503f tried to work out more of the DCP formats. I don't see an alpha enable nor any non-alpha 8bit RGB formats.
15:39marcanit could still be somewhere other than the IOSurface struct though
15:48sventhunderbolt-applesoc 501f00000.nhi: RTKit: IOP power state transition: 0x0 -> 0x20 <-- I think I was at that point before sometime last year but I'm still gonna count this as progress :)
15:55jannaumarcan: thanks. we have two u32 arrays which seem to contain flags for each surface in the swap struct
15:57jannauany idea what the '[' in the fourcc means? '&' signifies tiled formats
15:59marcanthose are just aliases as far as the pixel format is concerned
16:00marcannow I'm just trying random stuff
16:00marcanunk_10c in the swap_rec is bg_color, which if nothing else is useful to test the alpha
16:01ChaosPrincessis there some way to export pins from pinctrl_ap to userspac ?
16:11kettenisI can't think of a good reason why you'd want to do so
16:11kettenisbut beyond exporting gpios, I don't think linux has any infrastructure for this
16:13ChaosPrincessi want a gpio exported to do some userspace driver prototyping
16:14ChaosPrincessbasically, there is a spi device which seems to require an external cs pin
16:16kettenisexporting gpios to userland is certainly possible in Linux, but it may require a little bit of additional code to the relevant drivers
16:17ChaosPrincessyea, the problem is that there is no 'export' sysfs device anywhere near pinctrl
16:17ChaosPrincesss/sysfs device/sysfs file/
16:19kettenisif you can't find someone who knows how this works in Linux, you might want to take a look at the gpio drivers for the SoCs used on $FRUIT pi boards
16:28marcanChaosPrincess: use the chardev interface
16:28marcanthe sysfs interface is deprecated and no longer buildable without CONFIG_EXPERT
16:30marcanjannau: can't find anything :(
16:32jannauI didn't spot anything obvious in the unused Calls. color_remap_mode has 2 bits for invert and luminance only
16:34kujeger has quit [Remote host closed the connection]
16:34kettenismarcan: I'm fairly confident my secondary cores are in WFI with the "ok2pwrdn_force_down" bits set in SYS_IMP_APL_CYC_OVRD
16:34hertz has joined #asahi-dev
16:35kettenisthat gives somewhere between 0.1 and 0.15 W extra power savings I'd say, but indeed I'd expect more if the whole cluster was powered down
16:36kettenisbut we only lose (most of) the GPRs in that state; not the system registers, TLBs and caches
16:36kettenisso that doesn't make me think this is a really deep idle state
16:38jannauthere's A006/A007 set_csc_mode / set_op_mode, A044 set_blendout_CSC_mode, A111 vftg_set_color_channels which are tangentially related
16:40jannauI pity that macos' window sytem doesn't support overlays. not even the native media player or safari are using underlays or overlays for video
16:40marcankettenis: we know at least uncore is clocked in shallow WFI mode since it burns significantly more power on higher pstates, so I still expect more savings since it should at the very least stop the clock to the cluster entirely if all cores are in deep idle
16:41marcanjannau: safari is supposed to (at least with the right codecs)
16:41marcansomeone benchmarked it as having the GPU completely off while playing video
16:42jannauthey output yuv surfaces for fullscreen video
16:42marcanbut not windowed?
16:43kettenismarcan: note that my measurements are with the clusters already in their lowest P-state
16:45jannauI haven't seen yuv surfaces with windowed video playback
16:47marcanaw, I guess I was giving apple too much credit
16:47SSJ_GZ has quit []
16:47SSJ_GZ has joined #asahi-dev
16:53ChaosPrincessmarcan: tyvm, config_expert was the thing i was missing
16:54jannaumarcan: either I tested only with the media player or I misremember things. safari with vp9 video from youtube uses '&8v0' tiled 8-bit nv12
17:03jannauenabling the yuv overlay looks a little strange. the UI switches from surface 0 to surface 1, surface 0 is cleared and unk_10c/bg_color in swap rec is set to 0xff000000 (it is usually 0x0)
17:09jannauand premultiplied is set for the yuv surface
17:10bcrumb has joined #asahi-dev
17:15bcrumb has quit [Quit: WeeChat 3.7.1]
17:34svenkettenis: all the thunderbolt tunables are 32bit masks as well so I’ll stick to the current atcphy format
17:45kettenissven: great, thanks
19:24wCPO624365 has quit [Remote host closed the connection]
19:24wCPO624365 has joined #asahi-dev
19:34DarkShadow44 has quit [Quit: ZNC - https://znc.in]
19:34DarkShadow44 has joined #asahi-dev
19:34DarkShadow44 has quit []
19:34DarkShadow44 has joined #asahi-dev
22:25DarkShadow44 has quit [Quit: ZNC - https://znc.in]
22:25DarkShadow44 has joined #asahi-dev
22:28DarkShadow44 has quit []
22:28DarkShadow44 has joined #asahi-dev
22:33DarkShadow44 has quit []
22:33DarkShadow44 has joined #asahi-dev
22:56eigenform has joined #asahi-dev
22:59SSJ_GZ has quit [Ping timeout: 480 seconds]
23:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
23:01yrlf has joined #asahi-dev
23:40marcanjannau: I'm getting the feeling surface 0 is a special "passthrough/optimized" surface and that's why it doesn't do full colorspace conversion on t6k
23:40marcanso then you're expected to use surfaces 1/2 for compositing
…