ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
quarkyalice_ has joined #asahi-dev
quarkyalice__ has joined #asahi-dev
quarkyalice_ has quit [Remote host closed the connection]
quarkyalice has quit [Remote host closed the connection]
quarkyalice__ has quit [Remote host closed the connection]
quarkyalice has joined #asahi-dev
balrog has joined #asahi-dev
kthxg has joined #asahi-dev
PhilippvK has joined #asahi-dev
phiologe has quit [Ping timeout: 480 seconds]
norwoodites has joined #asahi-dev
pinskia has quit [Remote host closed the connection]
pinskia has joined #asahi-dev
norwoodites has quit [Ping timeout: 480 seconds]
aleasto has joined #asahi-dev
aleasto has quit [Ping timeout: 480 seconds]
aleasto has joined #asahi-dev
aleasto has quit [Quit: Konversation terminated!]
alyssa has joined #asahi-dev
<alyssa> marcan: Do we know why the DCP exists? IIRC the early (S5L) iPhones managed the display directly from the AP, the DCP was added for some presumably good technical reason. Do we know what it is? (And recursively, why the DCP has a copro of its own)
<alyssa> It doesn't necessarily change our lives at this point (if specific functionality can only be done with the DCP), I just am trying to understand what motivated Apple to design the copro at all
bngs[m] has joined #asahi-dev
<marcan> alyssa: we do not
<marcan> and the fact that there is a whole driver kext for *M1* silicon that does not use DCP suggests that was certainly in the cards at some point
<alyssa> which kext was that..?
<marcan> one good reason, though, would be to allow the main CPU to go to sleep for extended periods of time. I wouldn't at all be surprised if DP/HDMI protocol bullshit required the DCP to wake up for every frame under some circumstances.
<marcan> (even if no swap requests were made)
<marcan> see AppleMobileDispH13G-DCP.kext vs AppleMobileDispH13G.kext
<alyssa> Alright
<alyssa> FWIW AppleMobileDispH13G-DFR.kext is for the touch bar
<alyssa> So plausibly it uses both kexts depending which display
<marcan> ah, I was wondering about DFR
<marcan> IIRC the display hardware for that thing is different
<marcan> so that makes sense
<marcan> I don't think DCP has anything to do with the touch bar
<alyssa> Dynamic Function Row
<marcan> ha
<marcan> also see IOMobileGraphicsFamily.kext vs IOMobileGraphicsFamily-DCP.kext
<marcan> which have the other half of the driver
<marcan> you can piece together the DCP firmware from existing kexts, e.g. parts of IOAVFamily.kext are in there too
<marcan> AppleMCDP29XX.kext is in there too etc
<marcan> look for all the *Proxy.kext ones too; those are proxies to specific DCP endpoints
<marcan> seems the RPC system for those is called "EPIC" and I hope it's less insane than the main DCP one
yuyichao has quit [Ping timeout: 480 seconds]
<alyssa> This is horrifying, you know?
<marcan> alyssa: *shrug* nothing surprises me any more
<alyssa> marcan: I just..
<alyssa> If I were an upstream DRM maintainer with no especial interest in Apple, and if the patches were coming from @apple.com developers, it'd be a "hard no" unless there was an _overwhelming_ reason to have the layers of crap.
<marcan> of course it would be
<marcan> but we don't have that luxury :p
<marcan> it is completely evident this was made for macos and only for macos
<alyssa> ..so I'm wondering how upstream will feel about this from @marcan.st and @rosenzweig.io addresses :|
<marcan> I mean... it's either this or no M1 support
<marcan> so far nobody hates me in #dri-devel at least
<alyssa> They haven't seen the RPC list yet ;-P
<marcan> I did paste the RPC dump there
<j_ey> it might be possible that not all of the RPC is needed? maybe a subset can be used?
<sven> or "just" reverse engineer that RTKit firmware crap and write a driver that does MMIO pokes :P
<alyssa> "just"
<marcan> sven: you wanna sign up to write the displayport training and bandwidth calculation code?
<marcan> :p
<marcan> both of those are on my list of things I sure hope I don't have to touch because I don't even know how you would cleanroom that
<marcan> (without docs)
<sven> i.. uh... so maybe that RPC protocol isn't as ugly as it looks :P
<alyssa> lololol
<marcan> sven: to be fair it's not *that* bad. I think we can ignore a lot of the crap macos calls
<marcan> and a lot of the callbacks are bullshit, like registering/looking up iokit stuff that just has to return "true"
<marcan> https://mrcn.st/p/W4ijTdUF like the beginning of that boils down to "return true" crap, a bunch of property updates, and then another big nested callback where the AP starts doing stuff
<marcan> and that stuff is more init calls with no args, some memory management thing, and that's about it
<marcan> then there's the big dcpav prop dump
<marcan> and that's the end of init
<marcan> then there's thrashing because for some reason it detects a display hotplug (this might be related to HDCP crap or my capture card)
<marcan> then finally more easy no-arg calls, a writeDebugInfo thing we can surely ignore, some power management stuff, and finally IOMobileFramebufferAP::set_digital_out_mode which again causes a big prop thrash
<marcan> then it stats doing swaps; the first time it does some interesting things with configuring the color matrices etc, there's also a generic "set_block_dcp" which might well be raw reg writes
<marcan> and that's it, then it starts submitting surface updates
<marcan> the set_block_dcp stuff looks like float arguments, which is interesting
<alyssa> marcan: So you'll have reference code in mini by Tuesday? 😉
quarkyalice has quit [Quit: Leaving]
<alyssa> And then have it cleaned up by Friday morning so I can wrap it with DRM stuff and have the patch set merged to drm-misc-next by Sunday night? 🙃
quarkyalice has joined #asahi-dev
<TheLink> sounds like programming oss is like working for a black company
<alyssa> ?
<cyrozap> I think TheLink is referring to this: https://en.wikipedia.org/wiki/Black_company_(Japanese_term)
<alyssa> cyrozap: Ahhhh
<alyssa> TheLink: actually programming oss is a lot of waiting for other people to review your code
<alyssa> more so than actually writing code
<TheLink> I was just making fun of your proposed schedule for marcan
<TheLink> I'll frfrain from doing son again, sorry
<TheLink> *refrain
<TheLink> *so
<jn> TheLink: jokes and humor are ok, we just failed to undestand this one
<TheLink> yeah, my anime "knowledge" sometimes gets in the way of getting the message thru ;)
<alyssa> Making fun is okay, I'm just a boring North American :-p
<TheLink> Germans aren't supposed to be funny so that might be it, too :)
norwoodites has joined #asahi-dev
pinskia has quit [Remote host closed the connection]
norwoodites is now known as pinskia
bisko has joined #asahi-dev
bisko has quit []
bisko has joined #asahi-dev
quarkyalice has quit [Remote host closed the connection]
yrlf has quit [Quit: The Lounge - https://thelounge.chat]
yrlf has joined #asahi-dev