#asahi-gpu · 2021-03-18 16:01
modwizcodeIt sounds like you're saying that iboot loads it but also that it doesn't?#asahi-gpu · 2021-03-18 16:01
modwizcode? not exactly clear what you mean there.#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
modwizcodeWould the plan be to extract that or were you saying that iBoot loads it for us?#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:35
morelightning[m]On the iPad, I vaguely remember something new in the last few years about needing to control the contrast range of the display - so I was assuming we'd run into that on the mac too.#asahi-gpu · 2021-03-18 15:35
morelightning[m]The m1 mac window compositor is showing up as a Metal vertex/fragment shader in Instruments, just like the iPad. So I was supposing that all the information we need is just sitting defined inside the window server process.#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:19
chrisfmarcan: on socs designed for android the display controllers are often enormous -- tons of planes, etc#asahi-gpu · 2021-03-18 15:18
marcandefine mobile-style behemoth?#asahi-gpu · 2021-03-18 15:18
chrisfmarcan: do we expect the apple display controller to be small like desktop, or a 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#asahi-gpu · 2021-03-18 15:16
marcandisplay controllers are boring, it's just a pile of mode parameters and stuff like that#asahi-gpu · 2021-03-18 14:58
svenand ideally we'll figure out the display controller by observing MMIO reads/writes once marcan implements a mini-hypervisor in m1n1#asahi-gpu · 2021-03-18 14:56
sventhe frame buffer is pre-configured by iboot for us as some buffer in main memory. we'll eventually have to figure out how the display controller works, but as long as we can render to some buffer from the gpu it'll work for now#asahi-gpu · 2021-03-18 14:56
bloommarcan: ^#asahi-gpu · 2021-03-18 14:56
bloomThat's not the GPU, that's the display controller.#asahi-gpu · 2021-03-18 14:53
morelightning[m]My assumption, was that if we haven't identified those yet, that I might find them defined inside CoreDisplay or close to it.#asahi-gpu · 2021-03-18 14:47
morelightning[m]Well, what I mean is, on linux, we'll have to route the frame buffer to the display somehow - is that part of the hardware addressing identified already?#asahi-gpu · 2021-03-18 14:33
bloomNo, I very intentionally have prioritized off-screen rendering since CoreGraphics would be a massive r/e effort with 0 payoff for Linux.#asahi-gpu · 2021-03-18 14:25
morelightning[m]Is there any insight yet into bypassing the window compositor or how that connects? My initial assumption would be that metal's "present drawable" does a composite with a basic shader, and then it just passes the frame buffer along at some point... maybe thats around CoreDisplay?#asahi-gpu · 2021-03-18 14:14
bloomhttps://xkcd.com/1782#asahi-gpu · 2021-03-18 08:29
jixI'm using both matrix and irc, but for irc channels I usually connect directly, but that requires a persistent connection if you want to see all messages in channels that are not publicly logged (this one is though, see topic)... tastes in preferred clients vary widely and discussions about that usually lead to long off-topic discussions so I'd rather not go there#asahi-gpu · 2021-03-18 08:25
jix_using matrix is fine IMO, it's just good to be aware of how the bridge handles multi line messages... it's suitable for posting code or logs etc, but not so much for conversations#asahi-gpu · 2021-03-18 08:23
morelightning[m]oh, is there a better software I should use? (It's been over a decade since I've used this stuff)#asahi-gpu · 2021-03-18 08:20
jix_morelightning[m]: FYI, if you write multi-line messages in matrix, they get bridged to IRC as a https link to a .txt file, so if you mention someone in them they might not see that#asahi-gpu · 2021-03-18 07:19
morelightning[m]< https://matrix.org/_matrix/media/r0/download/matrix.org/wVpJxlgaoXwogAMCyBqHpbxg/message.txt >#asahi-gpu · 2021-03-18 05:28
dougallchrisf: sure - i'll try to fill it out sometime this week (in the mean time, it's really rattling around in the emulator, if that's of any use https://github.com/dougallj/applegpu/blob/30845306a9b685def1a580586dc0f08d008aee37/applegpu.py#L4042-L4220 )