#
…

2023-03-04

00:00jhan has quit [Ping timeout: 480 seconds]
00:07kitley has quit [Quit: kitley]
00:08kitley has joined #asahi-dev
00:24kesslerd has quit [Ping timeout: 480 seconds]
00:24chadmedjannau: re dcp firmware versioning i think it makes sense to only support 13.2 if it makes your life significantly easier. it's probably also a good releng test case for adding firmware bundle upgrade support to the installer
00:26chadmedon a different topic now that we are getting closer to speaker release it's probably a good idea to merge the codec suspend workaround patches, even if just for tas2764
00:27chadmedit would be silly to regress s2idle because we dont have shared gpio (yet) and even sillier to block speaker support on something so big now that most of the other pieces are in place
00:27chadmedsupposedly it still doesnt work on some tas2770 machines but i have no machines with that codec so i cant look into it
00:35aomizu has quit [Quit: Textual IRC Client: www.textualapp.com]
00:46robinp has joined #asahi-dev
00:52nyilas has quit [Remote host closed the connection]
00:55robinp has quit [Ping timeout: 480 seconds]
01:06aomizu has joined #asahi-dev
01:18alyssa has joined #asahi-dev
01:18alyssachadmed: down the line I think I'm going to want 13.x firmware for AGX
01:19alyssawhich introduces the primitives needed to implement geometry/tessellation/mesh shaders properly
01:19alyssawell. "properly"
01:19robinp has joined #asahi-dev
01:21chadmedthats pretty big boon
01:22chadmedits worth investigating while we have the luxury of not having any of this stuff upstreamed i think
01:27robinp has quit [Ping timeout: 480 seconds]
01:32kesslerd has joined #asahi-dev
01:36nuh^ has joined #asahi-dev
01:41kesslerd has quit [Ping timeout: 480 seconds]
01:43alyssachadmed: by "primitives" i mean "a hack to let compute kernels dynamically allocate memory"
01:43chadmedalyssa: i figured you meant "less hacks" and not "no hacks" :P
01:43alyssastill no geom/tess/mesh support in hw
01:44alyssabut lowering those to compute (sanely) requires a temporary buffer sized according to the # of vertices drawn
01:44alyssaand with indirect draws, that # isn't known at draw call time
01:45chadmedso apple just emulate mesh shaders in metal?
01:46alyssaI haven't installed 13.x yet so I haven't seen it in action
01:46alyssabut I took a sneak peek and yeah it doesn't look pretty
01:47chadmedthey seem to get decent-ish performance out of it all things considered
01:47alyssayeah, I mean
01:48alyssathe M1 GPU's whole deal seems to be "just throw a shitton of compute power at it" >.>
01:48chadmedtheres no force quite like brute force!
01:48alyssaI sorta expect that a future GPU (maybe M4) will redo the geometry pipeline to allow implementing mesh more efficiently
01:49alyssagiven that they're committing to the bit
01:49alyssaAFAICT, that won't come in M3 though
01:49jhan has joined #asahi-dev
01:49alyssabut maybe hardware raytracing in M3
01:50chadmedfrom what theyve said publicly theyre attempting to be taken seriously as a gaming platform
01:50alyssayeah, and Mali Chromebooks are a serious gaming platform too (~:
01:50alyssachadmed: as for brute force... my philosophy for GL/VK features right now is "just implement em all, whatever the cost, because if you don't implement them games won't work, but if you do the hardware is so fricking fast that it'll be just fine"
01:50chadmedi wouldnt be surprised if they slapped all that shit on top of metal 2 so they could go "hey guys look at us wheee" to entice devs and just said "eh we'll do it properly later"
01:50alyssaspent way too long on the commit message lmao
01:53alyssato quote robher
01:53robinp has joined #asahi-dev
01:53alyssa"How's performance? Great, because I haven't tested it"
01:54chadmedi mean it is pretty great (except webgl) all things considered
01:54chadmedand theres no point worrying about fastidious optimisation while theres stuff that just like... doesnt work at all
01:55chadmed"oooh we dropped 3 cycles in the culling pipeline" okay but tetris is a pink rectangle
01:55alyssawhich is why I'm kinda motivated to just plough through geometry shaders and get us to GL 3.3 even though GS will suck
01:56alyssaGL 4.0 will be blocked on tessellation though
01:56alyssatess is going to suuuuck
01:56alyssanot impossible, hell Metal does it, but suck
01:56alyssanot planning to plough through tess, GL 3.3 is the point when I switch gears to Vulkan
01:57alyssaand hopefully get AGXV far enough along that Zink+AGXV is also at GL 3.3 :^)
01:57jhan has quit [Ping timeout: 480 seconds]
01:57chadmedyeah that makes sense, especially with zink
01:58chadmedand aiui vulkan should be a better map to the hardware anyway (geometry and tessellation notwithstanding)?
01:59chadmedor is it much of a muchness
01:59alyssahonestly? AGX is a special snowflake of an architecture
01:59alyssanone of the APIs map closely to the hardware
02:00alyssanot GL, not VK, not D3D, and no, not Metal.
02:00chadmedmaybe glide would be a good fit!
02:00alyssaAGX is its own API
02:01alyssaWe do something stupid things in the GL driver, we're gonna do some other stupid things in the VK driver, and yeah, Apple does some stupid things in the Metal driver
02:01alyssabut it works out, I mean, the gears spin really fast
02:02chadmedas long as it goes brrrrr i think people will be happy
02:02chadmedhell mine goes brrrr enough to cause coil whine during some glmark2 tests
02:02alyssaeven if we have to do some really silly things to get there, we'll be able to implement modern APIs on this chip
02:02alyssaVulkan 1.3, GL 4.5, OpenCL, whatever
02:02alyssaand via DXVK and VKD3D get the suite of Direct3D apis
02:03alyssaand yeah, even with silly things to get there, the games should run just fine :)
02:03TellowKrinkle64-bit atomics might be pretty painful
02:03alyssaTellowKrinkle: that's definitely an area of silliness yes
02:03alyssanot in GL, optional in CL, fwiw
02:03alyssaand optional in VK
02:03alyssaif we do want to emulate.. I mean, do a mutex... it sucks, but
02:04jhan has joined #asahi-dev
02:07ddi has joined #asahi-dev
02:08alyssaquite frankly atomics can be expected to be so slow (everywhere) that if they're even slower ... meh ...
02:08alyssathis is presumably the logic Apple has in exposing float atomics on M1 as a convenience too
02:08robinp has quit [Ping timeout: 480 seconds]
02:09alyssa(correctly implementing mutexes on GPUs is tricky -- it's really easy to get deadlocks due to the divergence handling -- but not impossible)
02:12kesslerd has joined #asahi-dev
02:12jhan has quit [Ping timeout: 480 seconds]
02:13___nick___ has quit []
02:15___nick___ has joined #asahi-dev
02:15___nick___ has quit []
02:17ddi has quit [Remote host closed the connection]
02:18___nick___ has joined #asahi-dev
02:20Emantor has quit [Quit: ZNC - http://znc.in]
02:20Emantor has joined #asahi-dev
02:23robinp has joined #asahi-dev
02:27kesslerd has quit [Quit: Konversation terminated!]
02:32aomizu has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
02:37jhan has joined #asahi-dev
02:39robinp has quit [Ping timeout: 480 seconds]
02:42zef has joined #asahi-dev
02:46jhan has quit [Ping timeout: 480 seconds]
02:49robinp has joined #asahi-dev
02:49zef_ has quit [Ping timeout: 480 seconds]
02:57robinp has quit [Ping timeout: 480 seconds]
03:06aomizu has joined #asahi-dev
03:24robinp has joined #asahi-dev
03:32robinp has quit [Ping timeout: 480 seconds]
03:34jhan has joined #asahi-dev
03:39jhan has quit [Remote host closed the connection]
03:40robinp has joined #asahi-dev
03:47alyssauff, but you need to have a common bit of memory associated with the atomic memory to actually spin on
03:48alyssaand since in general you can do atomics on any memory you want.. you need a general mapping of memory to lock
03:48robinp has quit [Ping timeout: 480 seconds]
03:49alyssaalthough, again assuming the divergence rules work out so you don't deadlock, it should be ok to reuse locks for multiple pieces of memory
03:49alyssa"ok" in the sense of "sound", at the cost of performance obviously
03:50alyssai.e. it would correct (if terribly inefficient) to have one big global lock to update any int64 atomic
03:50alyssaOr, a bit more generously, hash the address and index into an array of locks accordingly
03:51alyssaseems like there's prior art for doing that anyway
03:53jhan has joined #asahi-dev
03:53alyssaoh but ugh the other issue there is going to be concurrent non-atomic loads
03:54alyssaMSL cheats here
03:54alyssafor full Vulkan shaderInt64 i'd have to check the spec
03:54alyssayeah I don't feel good about emulating this. is shaderInt64Atomics actually needed? :(
03:55alyssaSM 6.6, bleh
03:57alyssanot needed for DXVK at least
03:59alyssadisappointing that Apple didn't throw in an int64 cmpxchg instruction
04:01aomizu has quit [Max SendQ exceeded]
04:04robinp has joined #asahi-dev
04:04jhan has quit [Ping timeout: 480 seconds]
04:12robinp has quit [Ping timeout: 480 seconds]
04:14jhan has joined #asahi-dev
04:15alyssa(obviously can't prove a negative but yeah)
04:20chadmedis that something youd be able to catch by writing a metal shader that _should_ use a cmpxchg and then decompiling it to see what it's doing?
04:21alyssa(t likely)
04:21alyssait's not something you can emulate like that
04:22jhan has quit [Ping timeout: 480 seconds]
04:27jhan has joined #asahi-dev
04:35jhan has quit [Ping timeout: 480 seconds]
04:35robinp has joined #asahi-dev
04:42jhan has joined #asahi-dev
04:44robinp has quit [Ping timeout: 480 seconds]
04:51jhan has quit [Ping timeout: 480 seconds]
04:55robinp has joined #asahi-dev
05:03robinp has quit [Ping timeout: 480 seconds]
05:11robinp has joined #asahi-dev
05:16jhan has joined #asahi-dev
05:23TellowKrinklechadmed: Metal currently supports exactly one int64 atomic operation (min/max), and it ICE's the M1 shader compiler. The MSL spec says "check the feature support doc for information on what GPUs support this operation" and the feature support doc doesn't mention anything about int64 atomics.
05:25robinp has quit [Ping timeout: 480 seconds]
05:31alyssaTellowKrinkle: someone on github seems to think it's added in M2
05:31alyssaIDK if this is accurate
05:31TellowKrinkleIndeed. I guess I should look into how to run the offline compiler that targets systems that aren't yours
05:34robinp has joined #asahi-dev
05:42robinp has quit [Ping timeout: 480 seconds]
05:47robinp has joined #asahi-dev
05:51alyssawired up indirect dispatch
05:51alyssaworks like a charm
05:51alyssait's nice working with decent hardware for a change :D
05:53alyssa(and by "just works" I mean "I knew it was coming and architectured a chunk of the driver accordingly which was a PITA to get right but now that's there and indirect dispatch is nice and easy!")
05:59robinp has quit [Ping timeout: 480 seconds]
06:20robinp has joined #asahi-dev
06:22jhan has quit [Remote host closed the connection]
06:28robinp has quit [Ping timeout: 480 seconds]
06:31robinp has joined #asahi-dev
06:39jhan has joined #asahi-dev
06:39robinp has quit [Ping timeout: 480 seconds]
06:40jhan has quit [Remote host closed the connection]
06:43snowcra5h has quit [Quit: WeeChat 3.8]
06:50robinp has joined #asahi-dev
06:59robinp has quit [Ping timeout: 480 seconds]
07:25robinp has joined #asahi-dev
07:33robinp has quit [Ping timeout: 480 seconds]
07:44jhan has joined #asahi-dev
07:51psykose has quit [Remote host closed the connection]
07:52psykose has joined #asahi-dev
07:59robinp has joined #asahi-dev
08:00jhan has quit [Remote host closed the connection]
08:07c10l has quit [Ping timeout: 480 seconds]
08:07robinp has quit [Ping timeout: 480 seconds]
08:08jhan has joined #asahi-dev
08:10jhan has quit [Remote host closed the connection]
08:12jhan has joined #asahi-dev
08:26lewurm`` has joined #asahi-dev
08:26lewurm has quit [Read error: Connection reset by peer]
09:52DarkShadow4444 has quit [Read error: Connection reset by peer]
09:53DarkShadow44 has joined #asahi-dev
09:54DarkShadow44 has quit []
09:54DarkShadow44 has joined #asahi-dev
09:55DarkShadow44 has quit []
09:55DarkShadow44 has joined #asahi-dev
09:57DarkShadow44 has quit []
09:58DarkShadow44 has joined #asahi-dev
09:59DarkShadow44 has joined #asahi-dev
10:50robinp has joined #asahi-dev
10:58robinp has quit [Ping timeout: 480 seconds]
11:39chadmedre schedutil interactivity i dont think there are any real gains to be had anymore just by tweaking CFS and schedutil. the last "big" thing was arm working on util_est to help offset the effects of util decay
11:40aomizu has joined #asahi-dev
11:41chadmedamd are brute forcing their way around this on windows with a driver that just makes non-vcache clusters unavailable when it thinks youre running cache-heavy loads and vice versa which is... an interesting approach
11:41chadmedbut one i think is absolutely unacceptable when we have mitigation tools that are yet to be exhausted
11:42chadmedmaybe we should talk to the kde eco folks, this seems like something theyd be interested in
11:43altf4_ has joined #asahi-dev
11:51chadmedi also think we're an interesting case in that our cores arent _that_ asymmetrical in terms of performace but are in terms of power consumption
11:51chadmedtypically you see ecores at ~half the performance of the pcores but we retain ~70% of the performance
11:51chadmedso the scheduler goes "eh good enough" and throws everything at them
11:52chadmedid like to see what kind of effect EAS has on interactivity on socs with 4 ecores, since theres double the ecore capacity
11:53chadmedthe detrimental effect of EAS is very noticeable on m1 pro since the two ecores just end up crammed with tasks
11:55chadmedwell, i say "very" in the sense that its noticeably slower but its still snappier than any other machine ive owned
12:00chadmedbut basically the only way to fix this is for userspace to start communicating its needs to the scheduler in a more precise way than not at all
12:00aomizu has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
12:02chadmedthe interfaces exist and we know they work (see https://gist.github.com/chadmed/e889ea905876db29cbebb7265039f5a8) so we should be using them
12:30jannauthose function-pcie_port_control contain just two phandles, to the pcie controller and to the port (pcie-bridge)
12:31jannauI still have found no way to reset pcie ports
12:34robinp has joined #asahi-dev
12:36aomizu has joined #asahi-dev
12:36svenhave you tried turning the power on and off? :D
12:36svensounds like a joke but that’s literally how acio can be reset
12:42spikerguy has joined #asahi-dev
12:43spikerguyHello Everyone :)
12:43robinp has quit [Ping timeout: 480 seconds]
12:44altf4_ has quit [Remote host closed the connection]
12:45jannauonly in u-boot, results in a SError
12:46jannauspikerguy: hej
12:46spikerguyHi Jannau, Thank you for the irc links
12:46spikerguyFinally I received my Mac Mini M2 :D
12:47spikerguyNow I am looking for debugging tool or diy bom to make one myself. but sadly in my regions components are very diffucult to get.
12:51robinp has joined #asahi-dev
12:55grrowl has joined #asahi-dev
12:59marcanchadmed, jannau: re 13.2, I'm not opposed to forcing people to upgrade, buuut 1) it increases the releng workload, and 2) it's just kicking the can down the road, we *can't* drop firmware version support once upstreamed.
13:00robinp has quit [Ping timeout: 480 seconds]
13:00marcanso I would much prefer if we can support both versions side by side to prove that works
13:00marcanand I would in fact consider it a requirement for upstreaming that we can prove we can handle that
13:04jannauafk/epic looks slighly different in 13.2, shouldn't be a problem to support both but it's annoying
13:04marcanthere's always RiiR :D
13:04jannaustill considering reimplemnting dcp in rust
13:06kettenisplease don't
13:06marcan^ I'll take that as that we should, if only to encourage the BSD guys to start supporting rust ;)
13:08jannauare you planning to reimplement the gpu driver in C? if not I don't see much of a difference between one or two rust drm drivers
13:08kettenisyes, I plan to reimplement the GPU driver in C
13:14ChaosPrincessso, some weird bikeshedding, but why is the dcp driver in drivers/gpu/drm/apple, and the gpu is in drivers/gpu/drm/asahi ?
13:14eiln has joined #asahi-dev
13:15kettenisbecause they're separate drivers
13:16marcankettenis: good luck
13:16chadmeddifferent drivers for different hardware blocks
13:16chadmedand alyssa called the mesa driver asahi so it makes sense to keep the kernel driver nomenclature the same
13:16chadmed(also apple was taken by the dcp driver)
13:17marcanthere is precedent for calling community reverse engineered GPU drivers (both mesa and kernel side) by project names
13:17marcan(panfrost, etnaviv, nouveau, and now asahi)
13:17ChaosPrincessits more like why not /drivers/gpu/drm/apple OR asahi/{gpu,dcp}
13:17marcanbecause they are separate drivers
13:18marcannominally the next level after drm is the driver/module name
13:18marcanit's /drivers/gpu/drm/{i810,i915}, without an "intel" level. Same with radeon and amd (though amd is actually amdgpu but whatever).
13:19marcanand panfrost isn't under "arm"
13:19kettenistraditionally graphics hardware has combined the display controller and GPU in a single chip
13:19jannauadds only another level without having any benefit
13:20kettenisbut display controler and gpu are (largely) independent blocks
13:21kettenisand SoC vendors often combine a "standard" GPU (such as ARM's mali GPU) with their own display controller block
13:22chadmedi feel like drilling this distinction into peoples' heads is going to be the hardest part of any hypothetical transition away from the IBM-compatible
13:22marcanI'm tired of repeating it over and over...
13:22chadmedin fact i dont even remember when we stopped calling them "graphics cards" and started calling the whole thing the GPU
13:22chadmedit was some time in the 2010s though
13:22marcankettenis: we already have 2 display controllers on these machines (missing mipi-dsi for the touch bar) even
13:23ChaosPrincessin our case its more that it is unlikely that someone will mix a agx with something that is not apple-flavored-mipi or dcp
13:23chadmedi havent heard anyone say "graphics card" in a long time
13:23chadmedthey always say "GPU" to mean the entire card
13:23marcanChaosPrincess: people are already doing it.
13:23marcandisplaylink.
13:24marcanbut also the drivers literally have zero in common with each other
13:24ChaosPrincessthanks for reminding me that this cursed thing exists :P
13:24marcanthere is zero shared code, zero direct interaction
13:24marcanthey know nothing about each other
13:25* svenreally needs to finish display over type c support so that people don’t have to use displaylink :D
13:25ChaosPrincessim more thinking from the point that there is 2, maybe 3 apple drivers at the root level
13:25aomizu has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
13:25marcanjust like there are several intel, AMD, and ARM drivers
13:26chadmedyeah it doesnt really matter, they are functionally distinct pieces of hardware
13:26chadmedwho cares who makes them
13:26chadmedwhen eiln is done there will be three apple drm drivers!
13:26ChaosPrincessthey are doing?
13:26chadmedneural engine
13:26kettenis99% of the transistors on the modern AMD or nVIDIA chips are probably dedicated to the GPU functionality ;)
13:26ChaosPrincessisnt that accel now?
13:26marcantechnically not drm, accel framework :p
13:26marcan(which sure is based on drm)
13:26eilnchadmed: i do think it'll get moved to accel though
13:27chadmedoh that happened, neat
13:27marcankettenis: you underestimate how chonky media encode/decode stuff, general memory interface, etc can be
13:28marcanon M1 Pro, memory+cache+AVE+scaler+APR are significantly larger than the whole GPU by area
13:28chadmedespecially now as vendors are starting to tack on AV1 support to all these blocks
13:29marcan(memory/SLC being most of that, but even just display+media stuff is ~half the size of the GPU)
13:30chadmediirc nvidia cards have two encoding blocks too
13:32marcanhttps://www.flickr.com/photos/130561288@N04/49411586768/in/photostream/ navi10 shot, the bulk of the center is obviously GPU but look at all that wide junk around the edges
13:32ketteniswell, media encode/decode is blurring the lines a bit ;)
13:32marcanI measure 56% GPU, 44% everything else
13:33kettenisbut I'd say that is graphics processing
13:33kesslerd has joined #asahi-dev
13:35marcankettenis: bottom left on that navi10 shot is PCIe PHYs, all the wide top/bottom white blocks are RAM interface, lighter blocks along the mid left are probably display PHYs, etc
13:35marcanlots of non-GPU stuff
13:36chadmedmaybe we can call navi 31 a true gpu since (most of) the non-shader core stuff got offloaded to the chiplets
13:37chadmedthough the infinity fabric phys are pretty big themselves
13:38marcanchadmed: internet says the chiplets are just cache and everything else (GPU+media+phys+etc) is still in a single chip?
13:39chadmedcache and gddr phys yeah, mb
13:48* jannauneeds to finish m2 mac mini hdmi out so we can see how much of the external display out is to be blamed on tipd
13:49eilni was looking up accel userspace drivers for backend inspo
13:49eilnoh man
13:50svenI’m probably gonna bypass that typec altmode subsystem mess and just do what chrome-ec or however it’s called does and manually set the typec muxes
13:56chadmedeiln: i mean thats just begging for an MR adding all that stuff in after reverse engineering it
14:03djorz has quit [Quit: Gateway shutdown]
14:09grrowl has quit [Ping timeout: 480 seconds]
14:31robinp has joined #asahi-dev
14:40robinp has quit [Ping timeout: 480 seconds]
14:51alyssa13:16 < chadmed> and alyssa called the mesa driver asahi so it makes sense to keep the kernel driver nomenclature the same
14:51alyssa13:16 < chadmed> (also apple was taken by the dcp driver)
14:51alyssachadmed: admittedly I'm responsible for BOTH of those naming choices ;p
14:51chadmedi thought as much :P
14:52alyssabasically just mirroring the split from my chromebook
14:52alyssarockchip/panfrost
14:53alyssadisplay controller drivers are boring, just use the vendor name
14:53alyssa3D drivers are spicy, branding matters a lot more, use your project name
14:53alyssawhich gives apple/asahi as the split for display/3d
14:53alyssaPossibly it would've made more sense to go with a BSD flavoured "appledcp" name
14:54alyssafrankly when I started typing the drivers (DCP and Mesa) i had bigger problems than the names
14:55svenso you finally admit to writing DCP again? :>
14:55alyssai mean uhhhhhhhhh
14:56alyssawhen JANNAU and SVEN started writing the DCP driver and they asked me, a linux gfx veteran, how names should be chosen
14:56alyssai responded with what the convention already used for arm socs
14:57ChaosPrincessis dcp _that_ cursed
14:57ChaosPrincessand is it a bad choice for studying how to write a drm display driver
14:57chadmedi gave up trying to read it very very quickly so yes
14:58alyssaChaosPrincess: 100%
14:59alyssatry maybe vc4, just ignore the 3D bits
14:59alyssa(vc4 is a combined display+3D driver, except then v3d is 3D-only and uses vc4 as the display half on the newer raspberry pis)
14:59marcanI was going to suggest one of the more recentish bare metal mipi/whatever drivers
14:59ChaosPrincessoh, i tried to go for radeon at first, and dcp was much simplier in comparison :P
14:59marcanokay yeah dcp is a bad choice and radeon is worse
14:59alyssaradeon is the worst choice
15:00alyssaoh, i know
15:00chadmedradeon first? the one where every patch is like 400,000 lines of autogenerated register definition headers?
15:00alyssameson is the way to go, I think
15:00alyssadisplay only, straightforward hardwarw
15:00marcandriver from 2016, not *too* ancient
15:00alyssathere's also tinydrm
15:00marcanand seems to actively be getting patches
15:00alyssabut that's not really an option for something like dcp :p
15:01alyssadrm/tiny/
15:01alyssasingle file drm drivers
15:01alyssa(e.g. cirrus)
15:01marcanif MIPI panel stuff is involved (which it likely is if this is a bare metal MIPI PHY display controller), you probably want to look at other MIPI drivers and panel stuff for common code, and then you should end up with two drivers (MIPI controller + panel)
15:03marcanquick search suggests rcar-du for a reasonable driver with MIPI
15:04marcanoh actually
15:04marcankmb? TIL that's a thing
15:04marcaneven smaller, seems to only do MIPI
15:04marcanwhole driver is ~4400 lines
15:05marcan(1/3 of that is DSI because lol MIPI)
15:05marcanbut also given MIPI specs are unobtainium, divining MIPI-isms from other drivers is probably a good idea too
15:07marcanChaosPrincess: ^
15:08robinp has joined #asahi-dev
15:08marcanalyssa: does that sound reasonable?
15:08ChaosPrincessok, yea, kmb looks okay
15:09marcanI would expect the actual display controller portion to be fairly dumb, if they only intended it for the touch bar (single plane, no scaling, etc.), though who knows
15:09marcanso there's a good chance most of the work will be the MIPI junk
15:09ChaosPrincessnah, it looks to be just a copypasted iphone primary display controller
15:10marcanoh huh... well then... err... isn't that what DCP drives behind the scenes?
15:10marcanor is this like a much older display controller?
15:10ChaosPrincessapple calls it H13G-DFR, while the primary is H13G-DCP, so looks that way
15:10marcanH13G is just the soc codename
15:10marcanthere is a driver for disp0 without DCP
15:11marcanit is *much* larger than the touch bar DFR driver
15:11marcanso I don't think so
15:12eilnthe ane kext is still named h11 lol
15:12marcanmarcan@raider:~/asahi/vendor-bins/Extensions/12.4 -$ wc -c ./AppleMobileDispH13G.kext/Contents/MacOS/AppleMobileDispH13G
15:12marcan3544864 ./AppleMobileDispH13G.kext/Contents/MacOS/AppleMobileDispH13G
15:12marcanmarcan@raider:~/asahi/vendor-bins/Extensions/12.4 -$ wc -c ./AppleMobileDispH13G-DFR.kext/Contents/MacOS/AppleMobileDispH13G-DFR
15:12marcan813984 ./AppleMobileDispH13G-DFR.kext/Contents/MacOS/AppleMobileDispH13G-DFR
15:12marcan*strings*
15:12marcanAppleH7DisplayPipe.cpp
15:13marcanokay so it's a copy pasted *A8* display controller then
15:13ChaosPrincessthe ioreg class is AppleMobileADBE0 , and i remember seeing that in iphone ioregs
15:14ChaosPrincesssadly, my checkrainable iphone kinda died and i can't get a new ioreg from that
15:15bisko has joined #asahi-dev
15:15marcanit definitely has scaling and layers, but also probably 80% of that functionality is never used for the touch bar
15:16robinp has quit [Ping timeout: 480 seconds]
15:18marcanat least I don't see any cortex-m3 references so that's good for you :p
15:19marcanI also don't see any mipi strings which is weird...
15:20ChaosPrincessmipi lives in AppleSynopsysMIPIDSI
15:21marcanoh wait, yeah, separate driver. lovely...
15:21marcanwell now you know it's more synopsys junk
15:21ChaosPrincessalso, AppleSummitLCD
15:21marcanyeah, just saw that one too
15:21ChaosPrincessthats the mipi device, the prev one is controller
15:21marcanso H13DFR is the display pipe, the synopsys driver is the MIPI host, and SummitLCD is the panel driver
15:21ChaosPrincessalso, there are calls from the multitouch driver into that hairball, because apple
15:21marcanwell the good thing about synopsys junk is there's a good chance one of the other MIPI drivers in the kernel is secretly the same core
15:22sven<3 synopsys
15:22ChaosPrincessyea, kinda hoping for that
15:23svenif only everything they did wasn’t so broken
15:23jannauthere's Documentation/devicetree/bindings/display/bridge/snps,dw-mipi-dsi.yaml
15:23kettenisand gpu/drm/bridge/synopsys/dw-mipi-dsi.c
15:23bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
15:23alyssaI once sat next to a Synopsys employee on a commercial flight. He apologized to me on behalf of hardware engineers everywhere.
15:24bisko has joined #asahi-dev
15:25robinp has joined #asahi-dev
15:26bisko has quit []
15:28nyilas has joined #asahi-dev
15:31alyssa(Toronto-Boston, apparently Synopsys is based in Boston?)
15:32alyssanope, Bay Area
15:32alyssamaybe an office there then
15:36robinp has quit [Ping timeout: 480 seconds]
15:36eilnmountain view next to some other techies -- lived near there
15:38marcanChaosPrincess: I have a suspicion drm/msm/dsi/dsi_phy_7nm.xml.h and nearby files are related to that synopsys core, going by a few apple strings (there aren't many to go by though)
15:38marcanmaybe start there
15:39marcanthere's also this "slow adaptive clocking" thing which might be an apple thing
15:40ChaosPrincessyea, that sounds apple
15:40ChaosPrincesswhatever IOSlowAdaptiveClockingFamily is
15:42marcanoh also lol drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c is a thing.
15:43marcanand yeah okay that matches even better
15:43marcanapple strings: "ST0" "ST1" "DSIM_CORE_PHY_STATUS" from that file: "DSI_INT_ST0" "DSI_INT_ST1" "DSI_PHY_STATUS"
15:44ChaosPrincesswhats st0/st1?
15:44marcanstatus0/status1 I assume, IRQ flags
15:44robinp has joined #asahi-dev
15:45marcanso I guess if you're lucky you can use that driver mostly as-is for the MIPI stuff, described in the device tree as a bridge
15:46marcanand then put the apple pipe stuff in front
15:46marcansee also rockchip/dw-mipi-dsi-rockchip.c which is where that came from apparently
15:50eilnjust measured 0.0004 sec for 1024x1024 matmul ooo wee
15:50eiln"we have amx at home"
15:50eilnjk it's only really worth it for 100+ dim
15:51spikerguy has quit [Remote host closed the connection]
15:53marcanactual datasheet for one instance of that synopsys thing
15:53marcanat least some register offsets match (though some names differ)
15:54alyssaeiln: :-D
15:58robinp has quit [Ping timeout: 480 seconds]
16:20robinp has joined #asahi-dev
16:28robinp has quit [Ping timeout: 480 seconds]
16:35jeffmiw has joined #asahi-dev
16:37robinp has joined #asahi-dev
16:48robinp has quit [Ping timeout: 480 seconds]
17:08amarioguy has joined #asahi-dev
17:12robinp has joined #asahi-dev
17:20robinp has quit [Ping timeout: 480 seconds]
17:21robinp has joined #asahi-dev
17:26ChaosPrincessanyone got the 12.3 installassistiant.pkg ?
17:28amarioguy has quit [Ping timeout: 480 seconds]
17:29robinp has quit [Ping timeout: 480 seconds]
17:40robinp has joined #asahi-dev
17:48robinp has quit [Ping timeout: 480 seconds]
17:55jannauI haven't run that though
18:00nuh^ has quit [Remote host closed the connection]
18:13robinp has joined #asahi-dev
18:15kesslerd has quit [Ping timeout: 480 seconds]
18:22c10l has joined #asahi-dev
18:28ChaosPrincessmarcan: so, good news :P
18:28ChaosPrincess[cpu0] [0xfffffe001439ea84] MMIO: R.4 0x228600000 (mipi-dsim[0], offset 0x00) = 0x3133312a
18:28ChaosPrincess#define HWVER_131 0x31333100 /* IP version 1.31 */
18:28ChaosPrincess#define DSI_VERSION 0x00
18:29ChaosPrincessif they haven't broken the impl in some different way compared to rockchip's implementation, then we might just reuse everything
18:29alyssabrave assumption
18:29alyssahave you seen rockchip?
18:29alyssahave you seen APPLE?
18:29ChaosPrincessi own a rk3588 sbc :P
18:30alyssaoof, I'm so so sorry
18:30ChaosPrincesswell, aside from the wtf-kernel that radxa ships, it isnt taht bad
18:30marcanFWIW, I've seen a patch on the rockchip list that generalizes basically every register and specializes it per hwver because apparently that driver might just be quite broken depending on the version :p
18:30alyssait is to me
18:30marcanyou may want to do some patch archaeology and see what never got upstreamed
18:31robinp has quit [Ping timeout: 480 seconds]
18:31ChaosPrincesswell, its the same hwver
18:31ChaosPrincessthe lowest byte is masked out
18:31marcanthat HWVER is not an expected HWVER
18:31marcanit is a threshold
18:31marcanto change certain behavior in the driver
18:31marcanbut apparently those conditionals may not be sufficient to be strictly correct
18:34svenI love how just everyone runs into things that are pretty broken :p
18:43eiln has quit [Remote host closed the connection]
18:59ChaosPrincesskinda weird - they are only sending backlight control commands over that mipi link
19:00djorz has joined #asahi-dev
19:46robinp has joined #asahi-dev
19:55robinp has quit [Ping timeout: 480 seconds]
20:11amarioguy has joined #asahi-dev
20:12jhan has quit [Remote host closed the connection]
20:12robinp has joined #asahi-dev
20:12jhan has joined #asahi-dev
20:14user982492 has joined #asahi-dev
20:21jhan has quit [Ping timeout: 480 seconds]
20:21robinp has quit [Ping timeout: 480 seconds]
20:46jhan has joined #asahi-dev
20:57kesslerd has joined #asahi-dev
20:58jhan has quit [Ping timeout: 480 seconds]
21:07___nick___ has quit [Ping timeout: 480 seconds]
21:08jhan has joined #asahi-dev
21:17Z751 has joined #asahi-dev
21:17jhan has quit [Ping timeout: 480 seconds]
21:17___nick___ has joined #asahi-dev
21:17robinp has joined #asahi-dev
21:18kesslerd_ has joined #asahi-dev
21:18Z751 has quit []
21:22kesslerd has quit [Ping timeout: 480 seconds]
21:25alyssa has quit [Quit: leaving]
21:26robinp has quit [Ping timeout: 480 seconds]
21:43jhan has joined #asahi-dev
21:45robinp has joined #asahi-dev
21:46user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:53robinp has quit [Ping timeout: 480 seconds]
21:54jeffmiw has quit [Remote host closed the connection]
21:55jhan has quit [Ping timeout: 480 seconds]
21:56jeffmiw has joined #asahi-dev
21:58luc has joined #asahi-dev
21:58luc has quit []
22:04robinp has joined #asahi-dev
22:12robinp has quit [Ping timeout: 480 seconds]
22:17jhan has joined #asahi-dev
22:21D-Spirits has joined #asahi-dev
22:24user982492 has joined #asahi-dev
22:25jhan has quit [Ping timeout: 480 seconds]
22:34jhan has joined #asahi-dev
22:35nopeslide1 has quit []
22:37robinp has joined #asahi-dev
22:43jhan has quit [Ping timeout: 480 seconds]
22:45nopeslide1 has joined #asahi-dev
22:46robinp has quit [Ping timeout: 480 seconds]
22:51amarioguy has quit [Ping timeout: 480 seconds]
22:52jhan has joined #asahi-dev
22:57jeffmiw has quit [Ping timeout: 480 seconds]
23:00jhan has quit [Ping timeout: 480 seconds]
23:05jhan has joined #asahi-dev
23:12robinp has joined #asahi-dev
23:20robinp has quit [Ping timeout: 480 seconds]
23:20jhan has quit [Ping timeout: 480 seconds]
23:21nyilas has quit [Remote host closed the connection]
23:29jhan has joined #asahi-dev
23:32D-Spirits has quit [Quit: D-Spirits]
23:32kitley has quit [Ping timeout: 480 seconds]
23:32D-Spirits has joined #asahi-dev
23:37jhan has quit [Ping timeout: 480 seconds]
23:44robinp has joined #asahi-dev
23:45jhan has joined #asahi-dev
23:52robinp has quit [Ping timeout: 480 seconds]
23:56jhan has quit [Ping timeout: 480 seconds]
…