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
steven has quit [Quit: ZNC 1.8.2 - https://znc.in]
steven has joined #asahi-dev
goldsoultheory has joined #asahi-dev
goldsoultheory has quit [Ping timeout: 480 seconds]
eiln has quit [Remote host closed the connection]
hightower3 has joined #asahi-dev
hightower2 has quit [Ping timeout: 480 seconds]
nicolas17 has quit [Ping timeout: 480 seconds]
eiln has joined #asahi-dev
hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eiln has quit [Remote host closed the connection]
eiln has joined #asahi-dev
eiln has quit [Remote host closed the connection]
eiln has joined #asahi-dev
<eiln> nvm figured it out was a platform resource issue (why does this always happen right after..)
<eiln> "tethered" 1+2 on the ane https://bashify.io/images/n1Xz3i
<eiln> 4200 is half precision for 3 btw ;))
<eiln> "tethered" bc needs to reboot after every run
<eiln> engine aic irq wants to go to dart for whatever reason
eiln has quit [Quit: Page closed]
Hibyehello has joined #asahi-dev
Hibyehello has quit [Read error: Connection reset by peer]
nicolas17 has joined #asahi-dev
jluthra has quit [Remote host closed the connection]
jluthra has joined #asahi-dev
SSJ_GZ has joined #asahi-dev
lumen has joined #asahi-dev
nicolas17 has quit [Quit: Konversation terminated!]
apxmachit has joined #asahi-dev
<lumen> would 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.
<lumen> any other suggestions?
<lumen> was also thinking of reading some of "Linux Kernel in a Nutshell" by Greg Kroah + "Linux Kernel Development" by Robert Love.
<apxmachit> im 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?
<lumen> i don't have something specific in mind at the moment, just looking for a challenge and a learning experience
<apxmachit> hmm 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
<lumen> yeah that was one approach i wanted to take - use the system extensively till something breaks, then go and fix it, etc.
<lumen> thank you
wonjongbot has joined #asahi-dev
Cyrinux has joined #asahi-dev
apxmachit has quit [Quit: Page closed]
lumen has quit [Quit: Lost terminal]
<marcan> jannau: is it possible "opaque" actually means "premultiplied alpha"?
<marcan> that would mean that for a black background, alpha is effectively irrelevant
<marcan> but 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
<marcan> only for argb formats of course, with a=0, since opaque formats like 10-bit would implicitly have a=1
<marcan> we should still clear surface[0] of course, since even if we make [1] opaque that still wastes power
<marcan> but we need to find another way of implementing XRGB formats
<marcan> I think there is a color component thing that might let us implement a color swizzle?
whomst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whomst has joined #asahi-dev
wonjongbot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wonjongbot has joined #asahi-dev
wonjongbot has quit []
<jannau> marcan: 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
wonjongbot has joined #asahi-dev
wonjongbot has quit [Ping timeout: 480 seconds]
<marcan> jannau: confirmed, it's a premultiplied flag
hightower3 has quit [Ping timeout: 480 seconds]
hightower2 has joined #asahi-dev
ChaosPrincess has quit [Quit: WeeChat 3.7.1]
ChaosPrincess has joined #asahi-dev
<kettenis_> looks like powering off the wifi chip (through the SMC gpio) saves a bit over 0.1 W in power
kettenis_ is now known as kettenis
<kettenis> putting the p-Cluster in the "deep WFI" state also saves a bit more than 0.1 W
<marcan> kettenis: putting the p-cluster in deep WFI should save quite a lot more than 0.1 W
<marcan> we are currently burning power on static leakage in the CPU clusters
<marcan> and also dynamic power on the uncore areas
<marcan> I'm pretty sure deep WFI should actually power down the cluster
<kettenis> "deep WFI" is the state where it loses the GPRs but otherwise stays alive
<kettenis> (I write code similar to what you wrote for m1n1 when you were experimenting with the turbo states)
<kettenis> s/write/wrote/
<kettenis> but yes, we really want to power down the cluster completely for suspend
zkrx has quit [Ping timeout: 480 seconds]
zkrx has joined #asahi-dev
<jannau> did 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
<kettenis> this is on M2
<kettenis> PHCP reports something like 0.77W when I come out of "suspend" with one e-core running code
<kettenis> PSTR reports ~1.9W
<kettenis> can try this code on m1 pro
<kettenis> SYS 5405363
<kettenis> CPU 2501957
<kettenis> SYS=PSTR, CPU=PHCP
<kettenis> before suspend this was
<kettenis> SYS 14909630, CPU 3311439
<kettenis> machine idle, with the display on
<kettenis> guess your 5W is from m1 max?
<jannau> yes, from a m1 max. is suspend with both p clusters in deep WFI?
<kettenis> my current OpenBSD hack puts all cores in this "deep WFI" state
<kettenis> but obviously at the point I call the SMC code the primary CPU (an e-core) is running, so no longer into that deep state
<kettenis> oh, actually those figures were measured with a usb cable connected causing the machine to think power is connected
<kettenis> SYS 4574661, CPU 2538621
<kettenis> when suspended
<kettenis> SYS 6643164, CPU 3820596
<kettenis> when idle (now with the screen off)
<marcan> kettenis: I expect the cluster to actually power down in deep WFI (that's why it loses state)
<marcan> it wouldn't lose state if it didn't actively shut down power to something
<marcan> jannau: 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.
<marcan> it could still be somewhere other than the IOSurface struct though
<sven> thunderbolt-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 :)
<jannau> marcan: thanks. we have two u32 arrays which seem to contain flags for each surface in the swap struct
<jannau> any idea what the '[' in the fourcc means? '&' signifies tiled formats
<marcan> no idea
<marcan> those are just aliases as far as the pixel format is concerned
<marcan> now I'm just trying random stuff
<marcan> unk_10c in the swap_rec is bg_color, which if nothing else is useful to test the alpha
<ChaosPrincess> is there some way to export pins from pinctrl_ap to userspac ?
<kettenis> I can't think of a good reason why you'd want to do so
<kettenis> but beyond exporting gpios, I don't think linux has any infrastructure for this
<ChaosPrincess> i want a gpio exported to do some userspace driver prototyping
<ChaosPrincess> basically, there is a spi device which seems to require an external cs pin
<kettenis> exporting gpios to userland is certainly possible in Linux, but it may require a little bit of additional code to the relevant drivers
<ChaosPrincess> yea, the problem is that there is no 'export' sysfs device anywhere near pinctrl
<ChaosPrincess> s/sysfs device/sysfs file/
<kettenis> if 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
<marcan> ChaosPrincess: use the chardev interface
<marcan> the sysfs interface is deprecated and no longer buildable without CONFIG_EXPERT
<marcan> jannau: can't find anything :(
<jannau> I didn't spot anything obvious in the unused Calls. color_remap_mode has 2 bits for invert and luminance only
kujeger has quit [Remote host closed the connection]
<kettenis> marcan: I'm fairly confident my secondary cores are in WFI with the "ok2pwrdn_force_down" bits set in SYS_IMP_APL_CYC_OVRD
hertz has joined #asahi-dev
<kettenis> that 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
<kettenis> but we only lose (most of) the GPRs in that state; not the system registers, TLBs and caches
<kettenis> so that doesn't make me think this is a really deep idle state
<jannau> there's A006/A007 set_csc_mode / set_op_mode, A044 set_blendout_CSC_mode, A111 vftg_set_color_channels which are tangentially related
<jannau> I pity that macos' window sytem doesn't support overlays. not even the native media player or safari are using underlays or overlays for video
<marcan> kettenis: 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
<jannau> s/I/A/
<marcan> jannau: safari is supposed to (at least with the right codecs)
<marcan> someone benchmarked it as having the GPU completely off while playing video
<jannau> they output yuv surfaces for fullscreen video
<jannau> via dcp
<marcan> but not windowed?
<kettenis> marcan: note that my measurements are with the clusters already in their lowest P-state
<jannau> I haven't seen yuv surfaces with windowed video playback
<marcan> aw, I guess I was giving apple too much credit
SSJ_GZ has quit []
SSJ_GZ has joined #asahi-dev
<ChaosPrincess> marcan: tyvm, config_expert was the thing i was missing
<jannau> marcan: either I tested only with the media player or I misremember things. safari with vp9 video from youtube uses '&8v0' tiled 8-bit nv12
<jannau> enabling 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)
<jannau> and premultiplied is set for the yuv surface
bcrumb has joined #asahi-dev
bcrumb has quit [Quit: WeeChat 3.7.1]
<sven> kettenis: all the thunderbolt tunables are 32bit masks as well so I’ll stick to the current atcphy format
<kettenis> sven: great, thanks
wCPO624365 has quit [Remote host closed the connection]
wCPO624365 has joined #asahi-dev
DarkShadow44 has quit [Quit: ZNC - https://znc.in]
DarkShadow44 has joined #asahi-dev
DarkShadow44 has quit []
DarkShadow44 has joined #asahi-dev
DarkShadow44 has quit [Quit: ZNC - https://znc.in]
DarkShadow44 has joined #asahi-dev
DarkShadow44 has quit []
DarkShadow44 has joined #asahi-dev
DarkShadow44 has quit []
DarkShadow44 has joined #asahi-dev
eigenform has joined #asahi-dev
SSJ_GZ has quit [Ping timeout: 480 seconds]
yrlf has quit [Quit: The Lounge - https://thelounge.chat]
yrlf has joined #asahi-dev
<marcan> jannau: 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
<marcan> so then you're expected to use surfaces 1/2 for compositing