2021-03-18
02:53JusticeEX has joined #asahi-gpu
03:36phiologe has quit [Ping timeout: 244 seconds]
03:37phiologe has joined #asahi-gpu
04:10Baughn has quit [Ping timeout: 260 seconds]
04:11Baughn has joined #asahi-gpu
04:38odmir has quit [Remote host closed the connection]
04:41linuxgemini has quit [Read error: Connection reset by peer]
04:51Necrosporus is now known as Guest13098
04:51Guest13098 has quit [Killed (weber.freenode.net (Nickname regained by services))]
04:51Necrosporus has joined #asahi-gpu
05:28dougallchrisf: 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 )
07:19* morelightning[m]< https://matrix.org/_matrix/media/r0/download/matrix.org/wVpJxlgaoXwogAMCyBqHpbxg/message.txt >
07:41linuxgemini has joined #asahi-gpu
08:20jix_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
08:23morelightning[m]oh, is there a better software I should use? (It's been over a decade since I've used this stuff)
08:25jix_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
08:26jix_ is now known as jix
08:29jixI'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
09:12JusticeEX has quit [Ping timeout: 256 seconds]
10:10linkmauve has joined #asahi-gpu
11:29jobbe has quit [Quit: The Lounge - https://thelounge.chat]
11:58jobbe has joined #asahi-gpu
12:40jobbe has quit [Quit: The Lounge - https://thelounge.chat]
13:01g3rp has joined #asahi-gpu
13:25clayfreeman has joined #asahi-gpu
14:02g3rp has quit [Quit: leaving]
14:05JusticeEX has joined #asahi-gpu
14:09zkrx has quit [Ping timeout: 264 seconds]
14:23zkrx has joined #asahi-gpu
14:25morelightning[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?
14:33bloomNo, I very intentionally have prioritized off-screen rendering since CoreGraphics would be a massive r/e effort with 0 payoff for Linux.
14:47morelightning[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?
14:50opticron has quit [Ping timeout: 240 seconds]
14:51TheJollyRoger has quit [Ping timeout: 268 seconds]
14:51opticron has joined #asahi-gpu
14:52TheJollyRoger has joined #asahi-gpu
14:53morelightning[m]My assumption, was that if we haven't identified those yet, that I might find them defined inside CoreDisplay or close to it.
14:56sventhe 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
14:58svenand ideally we'll figure out the display controller by observing MMIO reads/writes once marcan implements a mini-hypervisor in m1n1
15:17marcanit'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
15:18marcanit 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
15:18chrisfmarcan: do we expect the apple display controller to be small like desktop, or a mobile-style behemoth?
15:19chrisfmarcan: on socs designed for android the display controllers are often enormous -- tons of planes, etc
15:19marcanI don't really know; my gut feeling is Apple would use the GPU for that, but I guess we'll find out
15:20marcanthey definitely do basic scaling at least, since that's how their entire macOS DPI scaling is implemented
15:35morelightning[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.
15:35morelightning[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.
15:39marcanchrisf: looks like it's huge, but not because of compositing stuff... there's a whole mailbox protocol involved apparently, and some rather fancy stuff
15:39marcanI 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
15:40marcan(going to be funny extending x11/wayland screens into that; putting the Plasma taskbar on the Touch Bar, anyone? :p)
15:49marcanlooks 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
15:59marcanthe 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?
15:59modwizcodeWould the plan be to extract that or were you saying that iBoot loads it for us?
16:00marcanmodwizcode: 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
16:01modwizcode? not exactly clear what you mean there.
16:01modwizcodeIt sounds like you're saying that iboot loads it but also that it doesn't?
16:01marcanit does, but iBoot2 is part of the "OS" install, so we need to put it there if we're doing a from-scratch install
16:02modwizcodeohhhh
16:02modwizcodeI didn't realize where iBoot2 resides
16:03danielsgiven their battery life figures, I have a hard time believing that they're using the GPU to composite every frame (at least when not doing fullscreen desktop)
16:04modwizcodeI'm surprised that more of that isn't done honestly
16:04marcanthey 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
16:05odmir has joined #asahi-gpu
16:05marcanbut so far I've seen mentions of 3 layers in here, so I don't think they delegate much compositing to the display controller
16:05modwizcodeeven the OLPC people implemented a basic display controller level redraw handling thing, it's hardly cutting edge.
16:06modwizcodefor compositing tiles would be plenty
16:07svenoh... that mailbox probably explains why the framebuffer only sometimes broke when i wrote different values to the area called "piodma" that is mapped after the framebuffer
16:08danielsrealistically you don't need too many more if you do the HWC thing of using the GPU to flatten your static-ish content to a single buffer, then using the display controller for the more dynamic content
16:10bloom^ seconding what daniels said, given how optimized for power efficiency the rest of the apple soc's are, and how cheap an extra overlay plane is, this would be a really bizarre place to skimp on gates
16:10daniels(not surprising that Apple actually did it properly, but it is sadly uncommon for GPU render targets and display controller fetch to share tiling formats ...)
16:12bloomGotta hand it to Apple, even Arm and Qualcomm brag about AFBC/UBWC despite keeping the internals proprietary.
16:12bloomApple has managed to excise every mention of a compression scheme from public docs/source.
16:13modwizcodeahh heh
16:13bloomAdmittedly I don't nknow what the display controller ingests, I just saw this in flight from app<-->compositor
16:14bloombut again Apple is far too competent to not have their display controller ingest their compression scheme as well
16:14modwizcodeI mean if you're making both you might as well reuse your hdl c;
16:16modwizcodedon't they use off the shelf camera parts tho?
16:17bloomI know Arm has camera stuff feeding into AFBC but I don't know if it (or anything like it) ever shipped.
16:19danielsArm never got their media-codec IP in any shipping SoC TTBOMK, but they will license AFBC to you if you want to do that
16:20danielsbut given that your phone doesn't have a 4K display, rather than compressing 4K output, the secret is to just ... not have it
16:21danielskeep an internal camera -> ISP -> codec pipeline which spits out a downscaled YUV/RGB frame for display, and then the codec goes straight to H.264/HEVC/whatever, ideally without touching sysmem
16:22daniels(yes it's a lot of out-of-band storage, but cheaper in power than keeping DDR lit up full)
16:24marcanI actually can't find the video decoder firmware, and now I wonder if it's in the SEP. because DRM.
16:28marcanI 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
16:29modwizcodeThere's already a glossary page, want me to make a seperate one?
16:31marcanbasically 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"
16:32modwizcodeworst page ever https://github.com/AsahiLinux/docs/wiki/Accelerator-Engines but here you go
16:35modwizcodeI swear I had a better place where I'd seen some of these elements defined awhile ago but I have no idea where that was
16:37sveni think i read AON = always-on processor somewhere. not sure if that was in some strings or some old iphone wiki though
16:38modwizcodeHell I'll throw it in in some quotes
16:39svenhttps://machinelearning.apple.com/research/hey-siri nope, it was apple's ML blog actually :-)
16:39sven"To avoid running the main processor all day just to listen for the trigger phrase, the iPhone’s Always On Processor (AOP)"
16:43danielsbalrog: it's strong differentiator for every SoC vendor, there's basically no commonality in ISP
16:43modwizcodeOkay cleaned up the page a bit
16:43modwizcodeIs that really a coprocessor though?
16:44modwizcodeI think it's coprocessor like but I thought it was part of the cores themselves?
16:45modwizcode"the award-winning Pixar film"
16:46modwizcodeI don't know what film we're talking about was all I meant
16:46modwizcodealso isn't there built in video decoding? Why did they use AMX?
16:47modwizcodeSadly it didn't land with me
16:48modwizcodeI mean I was mostly acknowledging that as a personal failing of myself c;
17:04jaalsa has quit [Read error: Connection reset by peer]
18:20DarkShadow4444 has joined #asahi-gpu
18:40AlJaMa has quit [Ping timeout: 264 seconds]
18:44AlJaMa has joined #asahi-gpu
18:44AlJaMa has quit [Changing host]
18:44AlJaMa has joined #asahi-gpu
19:19DarkShadow4444 has quit [Quit: Leaving]
19:59g3rp has joined #asahi-gpu
20:03taowa has quit [Quit: Gateway shutdown]
20:19AlJaMa has quit [Ping timeout: 264 seconds]
20:22AlJaMa has joined #asahi-gpu
20:22AlJaMa has joined #asahi-gpu
20:22AlJaMa has quit [Changing host]
20:49g3rp has quit [Quit: leaving]
20:50g3rp has joined #asahi-gpu
21:14g3rp has quit [Quit: Lost terminal]
21:26Mary_ has quit [Read error: Connection reset by peer]
21:29aquijoule__ has joined #asahi-gpu
21:30aquijoule_ has quit [Remote host closed the connection]
21:30Mary_ has joined #asahi-gpu
21:31neobrain2 has quit [Ping timeout: 246 seconds]
21:31neobrain has joined #asahi-gpu
21:50crabbedhaloablut has quit [Ping timeout: 264 seconds]
21:50crabbedhaloablut has joined #asahi-gpu
21:51Raqbit has quit [Quit: Ping timeout (120 seconds)]
21:52Raqbit has joined #asahi-gpu