#
✕ nick:marcan
#asahi-gpu · 2021-03-18 16:32
marcanand that's the M1
#asahi-gpu · 2021-03-18 16:32
marcanthen when they had a good enough CPU, they just beefed that up and dropped the Intel
#asahi-gpu · 2021-03-18 16:31
marcanbasically what happened is Apple took an old iPhone, put it into a laptop, stuck an Intel CPU on the side as a coprocessor and called it a "T2 Mac"
#asahi-gpu · 2021-03-18 16:30
marcanthey do use a TrustZone carveout though, to share DRAM with the SEP
#asahi-gpu · 2021-03-18 16:30
marcanthese engines are all random little side CPUs
#asahi-gpu · 2021-03-18 16:30
marcanthere is no EL3
#asahi-gpu · 2021-03-18 16:30
marcanno, separate CPU
#asahi-gpu · 2021-03-18 16:30
marcanit's integrated
#asahi-gpu · 2021-03-18 16:30
marcanT2 is not a thing any more on M1
#asahi-gpu · 2021-03-18 16:29
marcanyeah, there should be a separate page for these engines
#asahi-gpu · 2021-03-18 16:28
marcanI should start listing these engines on a wiki page somewhere. e.g. AOP is "hey siri" and other sensor stuff, PMP is power, ISP is the camera stuff, DCP is the displayport/display stuff, AVE is the encoder, ANE is neural engine
#asahi-gpu · 2021-03-18 16:26
marcancould be
#asahi-gpu · 2021-03-18 16:24
marcanI actually can't find the video decoder firmware, and now I wonder if it's in the SEP. because DRM.
#asahi-gpu · 2021-03-18 16:16
marcanthere's a separate image processor, presumably for that stuff
#asahi-gpu · 2021-03-18 16:16
marcangood question
#asahi-gpu · 2021-03-18 16:16
marcanha :)
#asahi-gpu · 2021-03-18 16:15
marcanso yes
#asahi-gpu · 2021-03-18 16:15
marcanbloom: there is plenty of mention of tiling/compression in these blobs
#asahi-gpu · 2021-03-18 16:09
marcanmakes sense
#asahi-gpu · 2021-03-18 16:05
marcanbut so far I've seen mentions of 3 layers in here, so I don't think they delegate much compositing to the display controller
#asahi-gpu · 2021-03-18 16:04
marcanthey used a tiling architecture and the framebuffer is also tiled, so it would make sense for them to do a dirty tiles thing for updates, instead of compositing the entire frame
#asahi-gpu · 2021-03-18 16:02
marcanalong with all the firmware blobs it loads
#asahi-gpu · 2021-03-18 16:01
marcanit does, but iBoot2 is part of the "OS" install, so we need to put it there if we're doing a from-scratch install
#asahi-gpu · 2021-03-18 16:00
marcanmodwizcode: for everything iBoot2 loads for us, they're just files next to iBoot2; all that stuff will have to be copied from the recovery partition for our "clean" installer
#asahi-gpu · 2021-03-18 15:59
marcanoh well, either way this is going to be fun
#asahi-gpu · 2021-03-18 15:59
marcanthe DCP firmware is definitely also working with things at the framebuffer level, at least to some extent, so maybe in the end it'll boil down to a big mailbox thing?
#asahi-gpu · 2021-03-18 15:50
marcanat least that probably means it does link training for us
#asahi-gpu · 2021-03-18 15:50
marcanthere's a whole 7MB of firmware for that, which is insane. I wonder what's in here.
#asahi-gpu · 2021-03-18 15:49
marcanlooks like DCP is probably the DP/HDMI encoder block, so I guess most of that is handled by firmware with some kind of mailbox to talk to it
#asahi-gpu · 2021-03-18 15:46
marcanthere's a DCP that iBoot2 loads for us at least
#asahi-gpu · 2021-03-18 15:45
marcanwhat worries me is I think I see some firmware in here... I hope this is legacy
#asahi-gpu · 2021-03-18 15:40
marcanit might support... 3 layers?
#asahi-gpu · 2021-03-18 15:40
marcan(going to be funny extending x11/wayland screens into that; putting the Plasma taskbar on the Touch Bar, anyone? :p)
#asahi-gpu · 2021-03-18 15:39
marcanthe only OLED panel we have to deal with is the Touch Bar, but that can wait a bit
#asahi-gpu · 2021-03-18 15:39
marcanI get the feeling we can *probably* get away without a lot of it, since it's probably intended for mobile panels where there are a million variants, with weirdo OLED subpixel layouts and stuff like that
#asahi-gpu · 2021-03-18 15:39
marcanchrisf: looks like it's huge, but not because of compositing stuff... there's a whole mailbox protocol involved apparently, and some rather fancy stuff
#asahi-gpu · 2021-03-18 15:37
marcanOTOH, I just did a bit of `strings` recon on their display controller driver
#asahi-gpu · 2021-03-18 15:35
marcanit's just more 3D
#asahi-gpu · 2021-03-18 15:35
marcanI don't think we should need *anything* about the compositor
#asahi-gpu · 2021-03-18 15:30
marcannot looking forward to *that* one...
#asahi-gpu · 2021-03-18 15:30
marcanoh yeah, one thing that's going to be fun is memory bandwidth calculation stuff
#asahi-gpu · 2021-03-18 15:20
marcan(AIUI they only do a couple fixed DPI values, then scale for everything else)
#asahi-gpu · 2021-03-18 15:20
marcanthey definitely do basic scaling at least, since that's how their entire macOS DPI scaling is implemented
#asahi-gpu · 2021-03-18 15:19
marcanI don't really know; my gut feeling is Apple would use the GPU for that, but I guess we'll find out
#asahi-gpu · 2021-03-18 15:19
marcangood question
#asahi-gpu · 2021-03-18 15:19
marcanoh, you mean compositing
#asahi-gpu · 2021-03-18 15:18
marcandefine mobile-style behemoth?
#asahi-gpu · 2021-03-18 15:18
marcanit should be pretty much completely divorced from the GPU, and since Linux has a very mature DRM/KMS framework for handling all that stuff, which is going to be very different from how macOS does things (most likely), there isn't really any reason to try to figure out how macOS does things there
#asahi-gpu · 2021-03-18 15:17
marcanit's a bunch of work to write the driver but all the annoying details are going to be around things like DisplayPort link training, HDMI InfoFrames, and all that "fun" stuff
#asahi-gpu · 2021-03-18 15:16
marcanobserve mmio writes, tweak things, figure out what they mean

plus ›