#
#asahi-re · 2022-03-25 08:14
marcansince it's again going to be the same info you get from a trace
#asahi-re · 2022-03-25 08:14
marcanif the table boils down to "these are the register values for this format" then simply document that and let someone else write the ~same table
#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:13
marcanbut it depends on what those tables are
#asahi-re · 2022-03-25 08:13
marcanideally we'd work out those permutations from HV traces, or from guesswork at this point
#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
marcanactually the last time I had to really blindly do it with a driver was for WiFi on T2s... there's some nonsense for those chips and I don't have a HV setup for those
#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
#asahi-re · 2022-03-25 08:12
marcanI've done that before too, looked at a bit of a driver to see what it does in what order and why and then just do the same thing, though I usually prefer to start from the trace and *then* fill in gaps that are hard to figure out from the driver, it's safer
#asahi-re · 2022-03-25 08:10
marcanI'm pragmatic about this, if you lower RE'd code to a list of register pokes there's nothing copyrightable left, you could've done the same thing by just copying and pasting a trace (which I've done before too)
#asahi-re · 2022-03-25 08:10
rqou_yeah i have no idea what param1 does either
#asahi-re · 2022-03-25 08:10
marcanif you get rid of param1 in that set_default_regs, all that's left is an MMIO trace
#asahi-re · 2022-03-25 08:09
rqou_reset_block and set_default_regs are both 100% copypasted driver RE
#asahi-re · 2022-03-25 08:08
rqou_yeah i have no idea why that happens. it's indeed ripped from the driver directly
#asahi-re · 2022-03-25 08:08
marcanthat sounds like it came from the driver and something is not understood properly
#asahi-re · 2022-03-25 08:08
marcanrqou_: the only part that bugs me is why RST_INTERVAL is treated as some kind of reset bit/polled
#asahi-re · 2022-03-22 03:29
Jamie[m]1oh that's good to know
#asahi-re · 2022-03-21 15:31
M1bn3mar[m]i edited the docs if that's ok
#asahi-re · 2022-03-21 15:31
j`eyoh
#asahi-re · 2022-03-21 15:31
M1bn3mar[m]j`ey: u can hard adjust the brightness in asahi by setting it in macos first
#asahi-re · 2022-03-21 03:36
nicolas17looks like the Studio Display has a "TCON" too (Display Timing Controller), but also BacklightController, Cabal, and Trinity (?)
#asahi-re · 2022-03-20 23:27
nicolas17I wanted to play with something related to that but I can't do my own trace...
#asahi-re · 2022-03-20 23:21
nicolas17IIUC trace_dcp.py dumps raw binary data sent to the DCP mailbox and shared memory, and then a different script parses it into something readable
#asahi-re · 2022-03-20 23:20
nicolas17is there any public 'trace file' from m1n1, for example from the DCP tracer? (I don't have M1 hardware myself >.>)
#asahi-re · 2022-03-20 20:59
j`eywhat did you find?
#asahi-re · 2022-03-20 20:58
M1bn3mar[m]hey, i found a way to adjust the brightness in asahi i thought that it might be useful in development :)
#asahi-re · 2022-03-20 11:10
rqou_sleep time
#asahi-re · 2022-03-20 11:10
rqou_i found the register that controls the output alpha value (0x158) and the register that makes the output ARGB instead of BGRA (0x154)
#asahi-re · 2022-03-20 10:51
Jamie[m]1(i.e. 256 times the screenshot abrasive posted)
#asahi-re · 2022-03-20 10:51
Jamie[m]1yeah the forwards matrix is in the (12.3) AppleJPEGDriver binary at 0x50cc
#asahi-re · 2022-03-20 10:43
henje[m]You could also go to HSL or whatever uses the same matrix format for conversion
#asahi-re · 2022-03-20 10:42
henje[m]It should be if it’s just a matrix, because one does RGB -> YCbCr, and the other does YCbCr -> RGB, which need another matrix
#asahi-re · 2022-03-20 10:36
rqou_idk, haven't looked at encoding whatsoever
#asahi-re · 2022-03-20 10:36
rqou_iosurface is incredibly confusing
#asahi-re · 2022-03-20 10:36
henje[m]So MATRIX_MULT has to be set differently for decoding and encoding, right?
#asahi-re · 2022-03-20 10:36
rqou_not sure if diving back into the driver re for a bit is useful or simply frustrating
#asahi-re · 2022-03-20 10:34
henje[m]Right
#asahi-re · 2022-03-20 10:34
rqou_i assume it isn't used for decoding, only encoding
#asahi-re · 2022-03-20 10:34
rqou_yes
#asahi-re · 2022-03-20 10:34
henje[m]Is the QTBL register the quantization matrix? In the gist it does not seem to be set
#asahi-re · 2022-03-20 10:26
rqou_also probably do a sleep
#asahi-re · 2022-03-20 10:25
rqou_ok, i'm going to see if i can figure out how to give it an image of different sizes
#asahi-re · 2022-03-20 10:25
rqou_lmao
#asahi-re · 2022-03-20 10:24
Jamie[m]1who needs ANE, we can do matmul in the jpeg block :D
#asahi-re · 2022-03-20 10:24
abrasivepresumably only for Cb/Cr which is why there's only two?
#asahi-re · 2022-03-20 10:24
abrasivevery probably constants added before/after the multiply
#asahi-re · 2022-03-20 10:23
Jamie[m]1-128 potentially makes sense for the subtraction
#asahi-re · 2022-03-20 10:23
abrasive1.0 = 0x100 in the matrix btw

plus ›