ChanServ changed the topic of #asahi-re to: Asahi Linux: porting Linux to Apple Silicon macs | Hardware / boot process / firmware interface reverse engineering | WARNING: this channel (only) may contain binary reverse engineering discussion | RE policy: https://alx.sh/re (MANDATORY READ) | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-re
compassion has quit [Quit: lounge quit]
cylm_ has quit [Ping timeout: 480 seconds]
compassion has joined #asahi-re
pthariensflame has joined #asahi-re
pthariensflame has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Z750 has quit [Quit: bye]
Z750 has joined #asahi-re
chadmed has quit [Remote host closed the connection]
chadmed has joined #asahi-re
JSkilton has joined #asahi-re
<JSkilton> Mrs. Skilton gets her holes filled and satisified by Rush's Geddy Lee. Later, Geddy meets Jean Pierre Manikariza, her husband, and gets filled by his big black cock! Read all about it! https://pastebin.com/1ExdrDQA
<marcan> ChaosPrincess: sure
<marcan> I have, uh, a few scattered ghidra databases
<JSkilton> With your consent, you will learn about carbonated diarrhea
<marcan> (I had to do that for the iBoot protocol since we can't hypervise that and at the time there wasn't even any iBoot plaintext available)
JSkilton was banned on #asahi-re by marcan [*!*@149.19.169.187]
JSkilton was kicked from #asahi-re by marcan [JSkilton]
JSkilton has quit [Remote host closed the connection]
nsklaus has joined #asahi-re
Retr0id has joined #asahi-re
<ChaosPrincess> marcan: which hw register does layer.transform end up in after swapSetLayers?
<marcan> ChaosPrincess: you mean the scaling based on src/dst rect?
knedlik has joined #asahi-re
<jannau> maybe the rotation/reflection transform in m1n1's dcp iboot interface
<marcan> ah, that
<marcan> yeah so
<marcan> "IOMFB %s: No support for rotated surfaces"
<marcan> I'm not surprised it's not supported, rotation sucks for display controllers since it completely destroys your memory access pattern
<jannau> I guess ChaosPrincess is still looking for rotation for the touchbar display controller
<ChaosPrincess> Welp
<ChaosPrincess> Does it only reject rotations or reflections too?
<marcan> reflections work IIRC, though I don't remember if all
<marcan> ChaosPrincess: ioreg will tell youi
<marcan> | | | | | "CFBundleIdentifier" = "com.apple.driver.AppleMobileDispH14G-DFR"
<marcan> | | | | | "IOMFBSupportsYFlip" = Yes
<marcan> | | | | | "IOMFBSupportsXFlip" = Yes
<ChaosPrincess> What reg do they end up in then?
<marcan> that's... a good question
<marcan> I'm not entirely sure, this code is a bit tricky to trace :/
<marcan> let me see if I can find it
<ChaosPrincess> Sorta hail mary thinking of trying to put rotation in that reg and seeing if only driver rejects it.
<marcan> ChaosPrincess: try bit 0x100 of 0x50004 or 0x51004
<marcan> also bits 0x8 and 0x10 of 0x50030 or 0x51008
<marcan> I think the latter are the flip bits and the former rotation, though if so I'd expect it to only work on older hardware... but then again you have older hardware than the main DISP0.
<ChaosPrincess> Yea, that doesnt sound correct, mine has layer registers at 0x2000 and plane registers at 0x4000 and 0x6000
<jannau> there is no userspace which handles the rotated panel property correctly? I find that a little surprising. kde can render 90/270 degree rotated
<jannau> I'm still not sure if it matters much. I expect the touchbar display driver will serve mainly a single user space programm written explictly for it
<marcan> ChaosPrincess: I think the DFR pipe is a major redesign behind DCP, that's why they use that simpler one
<marcan> so likely all registers are different
<ChaosPrincess> Well, was worth a shot
<marcan> ChaosPrincess: try plane + 0x2c bits 0x2, 0x4, 0x100000
<ChaosPrincess> 0x202c does nothing, 0x402c is "pixel format", and bit 0x2 results in whatever that is https://i.imgur.com/d9nQbNR.jpg
<marcan> keep in mind that rotation is probably going to explode badly if the dimensions are wrong, you'll probably want to try with a square layer
<marcan> ChaosPrincess: bit 0x2 is xflip, works for me
<ChaosPrincess> on DFR?
<marcan> yes
<ChaosPrincess> in register 0x402c?
<marcan> yes
<ChaosPrincess> wtf am i doing wrong then
<ChaosPrincess> i am running touchbar_rainbow.py, then p.write32(0x22820402c, 0x53e4003); flush(pipe)
<ChaosPrincess> and getting the thing in the image
<marcan> I think your framebuffer generator is a bit broken
<marcan> ChaosPrincess: pushed a thing
<ChaosPrincess> i dont get the second memset
<marcan> it makes two side by side rainbows so you can actually tell when it Y flips
<marcan> 2 is Xflip and 4 is Yflip
<ChaosPrincess> thats whith p.write32(0x22820402c, 0x53e4003)
<ChaosPrincess> can you pastebin the results of running
<ChaosPrincess> for i in range(0x1000):
<ChaosPrincess> print(hex(0x1000 + i * 4), hex(p.read32(0x228201000 + i * 4)))
<marcan> ChaosPrincess: with just that one line changed I get a flipped rainbow
<marcan> note: this is on t8103
<ChaosPrincess> yes, this is a t8103
<ChaosPrincess> im running p.write and flush after running the rainbow.py code and get the thing in the picture
<marcan> I also recommend `from m1n1.shell import run_shell` and `run_shell(globals(), msg="Have fun!")` at the end
<ChaosPrincess> eh, i run it by copy and pasting it into a shell :P
<ChaosPrincess> anyway, turns out 407c does something
<ChaosPrincess> i had it commented out in my code
knedlik has quit [Remote host closed the connection]
<marcan> probably the width/height needed for initialization of xflip/yflip :p
<marcan> since it has to read backwards
<ChaosPrincess> anyway, thats just xflip/yflip. Bit 0 also does something, but it does not look like rotation
<marcan> yeah, as I said, I don't expect rotation to be a thing unfortunately
<ChaosPrincess> yea, and kde does not seem to honor drm_connector_set_panel_orientation
knedlik has joined #asahi-re
<ChaosPrincess> anyway, thanks for the help. I'd also appreciate it if you could look at the open pr for the driver
<jannau> kwin supports panel orientation: https://invent.kde.org/plasma/kwin/-/merge_requests/2081
<jannau> I don't think the software plane rotation in the driver will survive upstream review
<ChaosPrincess> rn the target is less 'upstream' and more 'make it possible for someone to start writing the daemon'
<jannau> the daemon should be written with the assumption that it needs to rotate the fb, not hard to change but still a little bit annoying to have to deal with two variants
<ChaosPrincess> so, kde can rotate, i just havent figured out how to rotate by default
<jannau> it might try to rotate in HW (which fails) and then apparently gives up
<jannau> I haven't followed the code completely
<ChaosPrincess> well, i can rotate in display settings
<jannau> yes, but it should do that by default based on panel orientation which seems to be broken
roxfan2 has joined #asahi-re
roxfan has quit [Ping timeout: 480 seconds]
knedlik has quit [Remote host closed the connection]
stickytoffee has joined #asahi-re
knedlik has joined #asahi-re
knedlik has quit [Remote host closed the connection]
knedlik has joined #asahi-re
knedlik has quit [Remote host closed the connection]
cylm has joined #asahi-re
nepeat has quit [Quit: ZNC - https://znc.in]
nepeat has joined #asahi-re
nepeat has quit [Quit: ZNC - https://znc.in]
cylm has quit [Quit: WeeChat 3.6]
nepeat has joined #asahi-re
nepeat has quit []
nepeat has joined #asahi-re
Dementor has quit [Remote host closed the connection]
Dementor has joined #asahi-re
pthariensflame has joined #asahi-re
pthariensflame has quit []
user982492 has joined #asahi-re
user982492_ has joined #asahi-re
yrlf has quit [Quit: The Lounge - https://thelounge.chat]
yrlf has joined #asahi-re
user982492 has quit [Ping timeout: 480 seconds]
chadmed_ has joined #asahi-re
ChaosPrincess has quit [Quit: WeeChat 3.8]
ChaosPrincess has joined #asahi-re
chadmed_ has quit [Remote host closed the connection]