#
✕ nick:marcan
#asahi · 2021-02-22 13:36
marcanthe M1 is many years behind on bug fixes ;)
#asahi · 2021-02-22 13:16
marcanhttps://hub.marcan.st/t/scaling_change.mp4 <- tested with an external output, which in mirror mode avoids the desktop/WM getting involved; no glitching.
#asahi · 2021-02-22 13:10
marcaneither way, this isn't possible with external displays if you *actually* change the signal resolution (not just GPU-side scaling), because there's no way of stopping external displays from blinking for a whole second or more on mode changes
#asahi · 2021-02-22 13:09
marcanit's just one of those polish things
#asahi · 2021-02-22 13:09
marcanI should try wayland again one of these days
#asahi · 2021-02-22 13:08
marcanactually I think there might be 1 frame of black with the xrandr change here, but I'm sure that's the driver being stupid; obviously there is no output mode re-configuration as otherwise you get a very obvious slow black blink including a fade-in at the end (which is part of Apple's display controller)
#asahi · 2021-02-22 13:03
marcanso, glitch-free resolution switching is clearly a software problem and has been for many years
#asahi · 2021-02-22 13:03
marcanfor some reason going to 1080p scaled to 4K glitches, but going back from that to plain 4K does not at all, other than windows moving around and stuff because X11 sucks at this
#asahi · 2021-02-22 13:02
marcanthose are the only two building blocks you need to do glitchless resolution switchin, *if* the software stack is up to par
#asahi · 2021-02-22 13:02
marcannever_released: playing with xrandr transforms on my old iMac 2015 retina results in glitchless scaling changes; and of course all modern GPUs must support page flipping
#asahi · 2021-02-22 12:58
marcanmore like the display pipe code ;)
#asahi · 2021-02-22 12:58
marcanI don't buy this being about their hardware "display pipes"
#asahi · 2021-02-22 12:58
marcanI saw that
#asahi · 2021-02-22 12:57
marcanand Apple got to write their own shiny new driver that sucks less this time :)
#asahi · 2021-02-22 12:57
marcanit's just that legacy GPU drivers all suck on that front
#asahi · 2021-02-22 12:57
marcanwhich is all you *really* need for that, plus a cooperative driver
#asahi · 2021-02-22 12:57
marcanpretty much any modern GPU should support atomic scanout changes including scaler settings
#asahi · 2021-02-22 12:56
marcanthough I don't think that's a hardware thing
#asahi · 2021-02-22 12:56
marcanyes, I know
#asahi · 2021-02-22 12:55
marcanbut there is also the question of what else, if anything, is in that "vram" area
#asahi · 2021-02-22 12:55
marcanfor glitch-free boot you need to reuse the FB to some extent, or at least do an atomic transition to another FB
#asahi · 2021-02-22 12:55
marcannever_released: this is something that I'll investigate once I write the display driver
#asahi · 2021-02-22 12:55
marcan(which is actually required at this point, because if we let the kernel map it, simplefb fails to remap it as io)
#asahi · 2021-02-22 12:54
marcanit's effectively a bootloader-time carveout
#asahi · 2021-02-22 12:54
marcanit's part of normal memory, but not part of what we tell the kernel is usable RAM
#asahi · 2021-02-22 12:53
marcan0.5s would not work with that iMac efifb I linked above ;)
#asahi · 2021-02-22 12:52
marcanhm, nah, we give it 0.5s
#asahi · 2021-02-22 12:52
marcanmaybe you just blew the timeout with the uncached fb access?
#asahi · 2021-02-22 12:52
marcanoh wait, doesn't the smp code have a pretty tight timeout on smp boot?
#asahi · 2021-02-22 12:51
marcanha
#asahi · 2021-02-22 12:50
marcanarnd: IIRC sven had our framebuffer implementation blow up when he tried to use it from non-boot CPUs (which run with the MMU and caches off)
#asahi · 2021-02-22 12:49
marcan(well that was longer than 10m)
#asahi · 2021-02-22 11:53
marcan(afk, 10m)
#asahi · 2021-02-22 11:43
marcanre slow framebuffers, this is the speed of efifb earlycon on an iMac at 4K resolution: https://photos.app.goo.gl/pyWM4VBdPjWQxQxk8
#asahi · 2021-02-22 11:42
marcan(I'm just going off the commit msg of e48d53a9 )
#asahi · 2021-02-22 11:42
marcanright...
#asahi · 2021-02-22 11:40
marcanI don't think icache is coherent here (i.e. you still need cache maintenance if you touch code)
#asahi · 2021-02-22 11:40
marcanhuh, does it require icache coherence?
#asahi · 2021-02-22 11:39
marcansimplefb still tries to map it with something less efficient though
#asahi · 2021-02-22 11:38
marcanyay for unified memory
#asahi · 2021-02-22 11:38
marcanarnd: incidentally, the thing seems to be fully coherent on M1, as we're getting away with normal cached in m1n1 for the FB
#asahi · 2021-02-22 11:36
marcansven: I hate you :D
#asahi · 2021-02-22 11:34
marcannooooooo
#asahi · 2021-02-22 11:33
marcanI need to slap some kernel devs then, you have no idea how much slow fbcons frustrate me at the worst times ;) (as recently as a few months ago I had one of those, I still have a video somewhere...)
#asahi · 2021-02-22 11:32
marcanbut on the face of it ioremap_wt sounds appropriate for framebuffers? so why does nobody use it for modern hardware?
#asahi · 2021-02-22 11:31
marcanright
#asahi · 2021-02-22 11:31
marcanyeah, so nothing outside of m68k uses ioremap_wt
#asahi · 2021-02-22 11:30
marcanbut it's the other way around; a few old-looking drivers are using ioremap_wt, while many more are using _wc
#asahi · 2021-02-22 11:28
marcanthis makes me wonder why other FBs do not use _wt, but just _wc
#asahi · 2021-02-22 11:23
marcanamiga, atari, powermac...

plus ›