#asahi-re · 2022-03-28 10:19
rqou_lol, project zero actually has a diagram#asahi-re · 2022-03-28 10:09
rqou_well, there's mini/hw/dart.py#asahi-re · 2022-03-28 10:08
rqou_hmm y'know what would be really helpful in the asahi dart docs? a diagram#asahi-re · 2022-03-28 10:04
rqou_wait have you already RE'd it?#asahi-re · 2022-03-28 10:03
rqou_marcan: idk if you saw, but for some reason the m1 max has dart,t8110 for the prores, scaler, usb4, and avd blocks#asahi-re · 2022-03-28 10:02
rqou_i'm just trying to figure out how to work the dart,t8110 :(#asahi-re · 2022-03-28 10:02
rqou_yeah i know#asahi-re · 2022-03-28 10:01
rqou_unrelated: i just threw the scaler driver into ghidra and wao it's complicated#asahi-re · 2022-03-28 10:00
rqou_maybe hdr is indeed broken#asahi-re · 2022-03-28 10:00
rqou_oh yeah hmm i guess you can have wide gamut without hdr#asahi-re · 2022-03-28 09:58
rqou_idk about the rest of HDR#asahi-re · 2022-03-28 09:58
rqou_hrm, "color management so that you don't get extremely intense red" did work#asahi-re · 2022-03-28 09:57
rqou_iirc firefox color management works on xorg#asahi-re · 2022-03-28 09:57
rqou_and you have to twiddle a special setting in about:config#asahi-re · 2022-03-28 09:56
rqou_basically the only program that seems to work properly is firefox#asahi-re · 2022-03-28 09:56
rqou_and yeah, linux hdr support was a mess last time i poked it#asahi-re · 2022-03-28 09:56
rqou_lol another jpeg encoder?#asahi-re · 2022-03-28 09:49
rqou_in addition to the dedicated "scaler"#asahi-re · 2022-03-28 09:49
rqou_the jpeg block also has a scaler#asahi-re · 2022-03-28 09:49
rqou_lol how many "scaling" blocks does this chip have?#asahi-re · 2022-03-28 09:47
rqou_ooh that's actually really cool#asahi-re · 2022-03-28 09:46
rqou_huh that's interesting#asahi-re · 2022-03-28 09:44
rqou_yeah, i'm mostly focused on RE/hardware docs and don't actually know much about linux driver dev or upstream#asahi-re · 2022-03-28 09:40
rqou_worse case you can make a char/misc device or something awful like that#asahi-re · 2022-03-28 09:40
rqou_uhh i don't know anything about the linux driver side#asahi-re · 2022-03-28 09:31
rqou_has anybody looked at the dart,t8110 yet other than Jamie[m]1?#asahi-re · 2022-03-28 09:29
rqou_(this is all from REing the driver)#asahi-re · 2022-03-28 09:28
rqou_but otherwise you just feed the hardware frames and it gives you data back when it's done#asahi-re · 2022-03-28 09:28
rqou_actually getting it to work would require me to get around to understanding both prores a lot better as well as the different DART#asahi-re · 2022-03-28 09:27
rqou_there's some kind of ringbuffer that descriptors are added to, and then stuff happens#asahi-re · 2022-03-28 09:27
rqou_took a quick look at prores and it seems pretty simple in terms of interfacing#asahi-re · 2022-03-28 06:16
rqou_yeah this pile of "random misc" IP is _very_ complicated#asahi-re · 2022-03-25 10:51
rqou_my wild guess is that the registers below 0x1000 are apple's and the registers above 0x1000 are the licensed ip core#asahi-re · 2022-03-25 10:50
rqou_if i were to make a wild guess, i would actually guess that all of the pixel format / subsampling / colorspace / etc. stuff is apple's and only the DCT/huffman/etc. bits are licensed#asahi-re · 2022-03-25 10:49
rqou_there's almost certainly apple customizations/additions to it though, since the driver mentions things like support for "AGX" compressed/tiled/something input formats#asahi-re · 2022-03-25 10:25
rqou_no register map though#asahi-re · 2022-03-25 10:25
rqou_which has a product brief here (https://www.shikino.co.jp/eng/products/JPEG-IP_Leaflet_Ver1.14E_HP.pdf)#asahi-re · 2022-03-25 10:25
rqou_if you read starting from offset +0x10e0 to +0x10f4 you get ascii text 'SHIKINO KJN-7GI 0001'#asahi-re · 2022-03-25 10:24
rqou_oh lmao i just figured out where the JPEG IP comes from#asahi-re · 2022-03-25 08:26
rqou_the driver is pretty dumb, but i also deliberately wrote up the docs this way to be careful about accidentally copying over stuff#asahi-re · 2022-03-25 08:20
rqou_kk#asahi-re · 2022-03-25 08:20
rqou_hmm, so i can just clean up the script to be less of a mess, flesh out the docs a bit, and then submit a m1n1 PR with an experiment?#asahi-re · 2022-03-25 08:16
rqou_yeah, i'm very cognizant of intellectual property laws and try to be careful#asahi-re · 2022-03-25 08:15
rqou_e.g. the hardware can encode any permutation of RGBA values afaict, but the driver can only do RGBA or BGRA#asahi-re · 2022-03-25 08:15
rqou_i could do that. there are formats that the hardware supports that the driver doesn't though, which i've figured out using guesswork#asahi-re · 2022-03-25 08:13
rqou_it's literally a table that has a bunch of numbers like "8" and "16" and "2"#asahi-re · 2022-03-25 08:13
rqou_i started with an MMIO trace, dove into the driver to fill in a bunch of details, and then applied a bunch of manual poking and guesswork on top#asahi-re · 2022-03-25 08:12
rqou_the driver has a bunch of tables containing magic numbers to map from one format to another#asahi-re · 2022-03-25 08:12
rqou_i *still* don't 100% understand what is happening here#asahi-re · 2022-03-25 08:12
rqou_i know, but you would need to trace all the permutations of jpeg chroma subsampling mode and output surface chroma subsampling mode