2022-11-15
00:03millenialhacker has quit [Ping timeout: 484 seconds]
01:05Dcow_ has quit [Remote host closed the connection]
01:06Dcow has joined #asahi-dev
01:11user982492_ has joined #asahi-dev
01:14Dcow has quit [Ping timeout: 480 seconds]
01:16user982492 has quit [Ping timeout: 480 seconds]
01:35atipls has joined #asahi-dev
01:37millenialhacker has joined #asahi-dev
01:43atipls has quit [Ping timeout: 480 seconds]
01:45millenialhacker has quit [Ping timeout: 480 seconds]
02:02zalyx has quit [Quit: later alligator]
02:04zalyx has joined #asahi-dev
03:03millenialhacker has joined #asahi-dev
03:11millenialhacker has quit [Ping timeout: 480 seconds]
03:14atipls has joined #asahi-dev
03:22atipls has quit [Ping timeout: 480 seconds]
03:37user982492_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:03zalyx has quit [Quit: later alligator]
04:04zalyx has joined #asahi-dev
04:17user982492 has joined #asahi-dev
04:32Dcow has joined #asahi-dev
04:40Dcow has quit [Ping timeout: 480 seconds]
04:51capta1nt0ad has joined #asahi-dev
05:00c10l has quit [Quit: Bye o/]
05:01c10l has joined #asahi-dev
05:05user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:29millenialhacker has joined #asahi-dev
05:37millenialhacker has quit [Ping timeout: 480 seconds]
05:40princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
05:40princesszoey has joined #asahi-dev
05:42greguu has joined #asahi-dev
05:46pthariensflame has joined #asahi-dev
05:47pthariensflame has quit []
05:53princesszoey has quit [Quit: The Lounge - https://thelounge.chat]
05:54princesszoey has joined #asahi-dev
06:15Retr0id7 has joined #asahi-dev
06:15Retr0id has quit [Read error: Connection reset by peer]
06:15Retr0id7 is now known as Retr0id
06:17marcanthinking of releasing the current asahi-dev kernel (which has enough fixes and is otherwise well tested I think), just rebased on the latest -rc
06:18marcanand then merging all the fancy new DCP and USB3/ATC updates and making a linux-asahi-edge or something package (name suggestions? thinking we might want to use something other than "dev" to stop overloads)
06:30cylm has quit [Ping timeout: 480 seconds]
06:44jannaumarcan: sounds good. disabling of disp0_dart could be still useful to prevent breaking display scanout for the broken old m1n1 + new devicetree case
06:46jannauit shouldn't be necessary but if people even run into that when actively trying dcp it could prevent some support effort
06:46jannauhttps://github.com/AsahiLinux/linux/pull/67/commits/1bb4947576c295fafe59cb9e65295b3a87f126b5
06:46jannauand https://github.com/AsahiLinux/linux/pull/67/commits/72224bf395d66a92dad03f13158306b88182a2d8
06:48marcanyeah, sounds good. I might pull it in as an out-of-tree patch in the PKGBUILD. that way I can keep my plan of using the same tree with different configs for different packages.
06:48jannaum1n1 change to enable it https://github.com/AsahiLinux/m1n1/pull/264/commits/7a0c188ab01a531b3572191c2058724776d625ac
06:50Dcow has joined #asahi-dev
06:50jannauI think it would be good to have the change in the tree to prevent issues in downstream projects
06:51millenialhacker has joined #asahi-dev
06:52jannauwith enabling it in m1n1 it is guaranteed to be in safe state. it's either disabled or locked
06:54marcanjannau: do we need to transfer those backlight properties dynamically? do they vary machine to machine?
06:55capta1nt0ad has quit [Quit: Konversation terminated!]
06:58marcanI think it makes more sense to hardcode then. we can check the template devicetrees at least.
06:58Dcow has quit [Ping timeout: 480 seconds]
07:00millenialhacker has quit [Ping timeout: 480 seconds]
07:19jannauyeah, it was something like dynamic filling would be required for the calibration data so I can be lazy and don't need to look at the template ADT
07:20jannauyes, user-accessible-max-nits is just on j314/j316 for the desktop vs. HDR max brightness
07:27jannauno, I suspect iboot does that. the firmware appears to have afk methods for that (judging by strings in the fw)
07:28jannaumacos doesn't use those. I still have no idea what those set_block_dcp calls do but backlight control works without them
07:38marcaniBoot has to set the brightness to the one stored in nvram, so it makes sense that it has to take care of calibration
07:39gladiac has joined #asahi-dev
07:43svensomeone needs to throw a t8112 kext into ghidra and extract like 10 bit locations for fuses
07:47SSJ_GZ has joined #asahi-dev
07:50millenialhacker has joined #asahi-dev
07:58millenialhacker has quit [Ping timeout: 480 seconds]
08:09capta1nt0ad has joined #asahi-dev
08:21amarioguy2 has joined #asahi-dev
08:24amarioguy has quit [Ping timeout: 480 seconds]
08:33bisko has quit [Read error: Connection reset by peer]
08:34bisko has joined #asahi-dev
09:00mpswould be nice if I could celebrate full year usage macbook as workstation with all important features ;)
09:30MajorBiscuit has joined #asahi-dev
09:37bluetail has quit [Quit: The Lounge - https://thelounge.chat]
09:41bluetail has joined #asahi-dev
09:43svenmarcan: so I guess the easiest way to prepare usb3 for you to merge is to just base it on the current asahi-dev? it's just a few commits so it shouldn't conflict with anything (revert the old role switch quirk, add the new role switch quirk, add atcphy, add two lines to tipd, device tree updates)
09:44atipls has joined #asahi-dev
09:48mpssven: I've got this warning when build kernel https://tpaste.us/pnPm think it is related to tipd
09:49svenit's just about printf format specifiers. the way to get them right is to first just use %d, then compile and let the warning tell you what you should've used
09:52atipls has quit [Ping timeout: 480 seconds]
09:54bluetail has quit [Quit: The Lounge - https://thelounge.chat]
09:54millenialhacker has joined #asahi-dev
09:56svenlet me fix that statement above then: the way to get them right for local hacks is to compile and then just use whatever it tells you :P
09:58marcanI'm building two packages, -edge enables DCP and turns the smc/gpio stuff into modules (since that was built in only for simpledrm's backlight stuff)
09:59bluetail has joined #asahi-dev
10:03millenialhacker has quit [Ping timeout: 480 seconds]
10:09svenoh.. you have that other weird tipd irq fix in asahi-wip. let's see, i think jannau had a conflict resolution for that somewhere
10:12svenbut i've just dropped my tipd fix commits for now and will just do a quick change that only does typec_set_mode
10:13svenhttps://lore.kernel.org/linux-usb/20221114174449.34634-1-sven@svenpeter.dev/ irq+fix + those are essentially only required if I want to apply my current altmode mess
10:15_jannau_marcan: if you update the kernel again please cherry-pick https://github.com/jannau/linux/commit/cc1ac7fe8281a55712b1bdcfd75ceb59f2ddf321
10:18svenkettenis_: once you implement it make sure you get the order of what happens in usb3_mux_set and phy_power_on correct
10:18svenyou first need to bring up the PHY, then dwc3, then do the pipehandler dance when initializing
10:18kettenis_it is unlikely that I'll copy any of the code, but there are so many registers that I may end up copying those bits
10:20sveni think you can get away with just switching the phy mode from usb3-only to usb3/dp without shutting down dwc though
10:21svenand you may need to do that if you're faster than the tps6598x thingy can negotiate the altmode
10:23svenoh, and I still need to update the tunables format in m1n1. the current atcphy code supports both but I want to move the new format I have to be consistent with the thunderbolt/acio tunables
10:24kettenis_marcan: I suppose the size of the region should be maede bigger, but I couln't quickly find out what it should be
10:26_jannau_sven: atcphy probing failed with the m1n1 tunable format pull request on t6001, I didn't look into why
10:26kettenis_we had an OpenBSD hackathon last week and I made some good progress on implementing "s2idle" for OpenBSD/arm64
10:28kettenis_we're also putting the infsrastructure in place to update the stage2 m1n1 from OpenBSD
10:38rmksven: for printk stuff... if it's size_t, that's unsigned, so %zu. if it's ptrdiff_t, that's signed, so use %zd. the z flag works like l, telling printf to use whatever is the implementation's requirement for size_t or ptrdiff_t
10:39svenI never though if z as a modifier which is why I could never remember the correct thing for size_t. that makes a lot of sense, thanks!
10:40kov has quit [Quit: Coyote finally caught me]
10:44svenbah... and I brought this cheap compile vm on hetzner down again. I should really move to compiling my kernels on the m1 as well
10:51Dcow has joined #asahi-dev
10:53joske has joined #asahi-dev
10:56joske has quit [Remote host closed the connection]
10:57joske has joined #asahi-dev
10:58joskemarcan: was brightness control supposed to be in? I just built asahi-wip of 10 minutes ago, and no brightness
11:04joskekeyboard backlight is working, but when I log into mate (X11), screen is black. Same with xfce. GNOME wayland works
11:10svenmarcan: https://github.com/AsahiLinux/linux/commits/atcphy-for-asahi-wip briefly tested on t8103, probably work on t6k but can't test it there and can't get myself to care about t8112 :D
11:11kov has joined #asahi-dev
11:12svenif you test it note that there's always a ~5 seconds delay after xhci is up and when the SuperSpeed device is recognized
11:13svenalso note that dwc3 won't come up at all at boot time if you have nothing connected. that's expected behavior.
11:15svenbecause right now it happens again. but if it's fixed in that branch i'll see if I can diff what fixed it
11:23mpslatest tag asahi-6.1-rc5-6 release works on m1pro, though drm is slow when switching virtual screens and mpv switching to full screen
11:26jannausven: 350ms from "xHCI Host Controller" to "usb 2-1: new SuperSpeed USB" with 949e272b9ebdaf44478c7d56b3a0d8721a85f8d4 on t6001
11:29svenI thought I just renamed some registers and moved the pipehandler stuff from configure to power on which is called like 5 lines above from dwc3
11:37joskemy friend built current asahi-wip on m2 air, and simpledrm is not loading : https://photos.app.goo.gl/hWEYEPu4FmsJNayP6
11:42svenah, yes, that was a bug where I didn't transition the pipehandler to the disabled state sometimes
11:47joskecommit ee8536243118f3eb6c07df079cec6caec5c013d5 (HEAD -> asahi-wip, tag: asahi-6.1-rc5-6, origin/asahi-wip)
11:49svenas I mentioned above, you need https://github.com/AsahiLinux/linux/commits/atcphy-for-asahi-wip
11:57joske has quit [Remote host closed the connection]
11:58joske has joined #asahi-dev
11:59marcancan we please stop building random kernels while I'm literally in the middle of a rebase and merge cycle?
12:01svenat least we've graduated from people compiling kernels with wrong .config options and then complaining that things don't work and that it must be a bug :D
12:05marcanI thought dcp was supposed to take over simpledrm and cause it to disappear, and also where did the render node come from?
12:10marcanheh, display performance really is much worse with DCP. I'm not sure if this is a mode issue or an expensive redraws issue...
12:21jannaumarcan: simpledrm uses a shadow fb and updates only damaged parts. that seems to be much faster
12:22marcanI'm rebuilding without EAS and without VGEM for -edge, but you can try installing linux-asahi-edge from asahi-dev if you want
12:22marcanit should coexist with linux-asahi and you get both options in GRUB (make sure to update-grub)
12:25capta1nt0ad has quit [Quit: Leaving...]
12:26capta1nt0ad has joined #asahi-dev
12:27jannauI'm not sure I see what you see. dcp is choppy on large repaints like moving a large window or maximizing windows but otherwise it is okay-ish
12:29jannauI think it is an rendering issue because I don't see any issues in combination with lina's and alyssa's opengl driver
12:30capta1nt0ad has quit []
12:30capta1nt0ad has joined #asahi-dev
12:49marcan"show fps" says 60Hz at 60Hz; at 120Hz it actually says more like 90Hz while moving the mouse, but it's actually choppier (both the mouse and the graph) once it triggers
12:52marcanI also don't know why it stutters so badly when e.g. fullscreening a window. there's no way it takes that long to render the single frame where it stalls. something's weird there.
12:52millenialhacker has joined #asahi-dev
12:54kazuki has joined #asahi-dev
12:57jannaudcp framebuffers are allocated with write combine. I'm not sure 100% if I set the uncached bit in the dart PTEs
13:00millenialhacker has quit [Ping timeout: 480 seconds]
13:14zalyx has quit [Quit: later alligator]
13:15zalyx has joined #asahi-dev
13:47atipls has joined #asahi-dev
13:47atipls has quit []
14:03_jannau_marcan: not sure what the x11 issue could be but iirc there is not driver <-> dcp communication involved after the initial modeset
14:50millenialhacker has joined #asahi-dev
14:58millenialhacker has quit [Ping timeout: 480 seconds]
15:00SSJ_GZ has quit [Ping timeout: 480 seconds]
15:05SSJ_GZ has joined #asahi-dev
15:31bluetail has quit [Quit: The Lounge - https://thelounge.chat]
15:34joske has quit [Remote host closed the connection]
15:35bluetail has joined #asahi-dev
15:39gladiac has quit [Quit: k thx bye]
16:09millenialhacker has joined #asahi-dev
16:14atipls has joined #asahi-dev
16:17millenialhacker has quit [Ping timeout: 480 seconds]
16:23atipls has quit [Remote host closed the connection]
16:23atipls has joined #asahi-dev
16:41roxfan2 has joined #asahi-dev
16:45roxfan has quit [Ping timeout: 480 seconds]
16:46marcanthe plan right now is that linux-asahi gets ATCPHY, -edge on top of that gets suspend/s2idle, DCP, and SMC and the chain of RTKit dependencies go y->m due to the removal of simpledrm backlight.
16:56r0ni_ has joined #asahi-dev
17:02r0ni has quit [Ping timeout: 480 seconds]
17:04_jannau_sound good. missed https://github.com/AsahiLinux/linux/pull/66 (dart reserved region fix)
17:06_jannau_I'll look int the dcp x111 performance. I mostly looked at wayland since there's continous communication with dcp
17:06MajorBiscuit has quit [Ping timeout: 480 seconds]
17:13kazuki_ has joined #asahi-dev
17:16kazuki has quit [Ping timeout: 480 seconds]
17:26___nick___ has joined #asahi-dev
17:26___nick___ has quit []
17:28___nick___ has joined #asahi-dev
17:29marcansven: I did, don't have time to do it myself right now, hoping you get bored enough to do it :>
17:30marcangetting one PKGBUILD to build two kernels trying to reuse part of the build and also have them properly installable side-to-side took a bit more work than expected
17:32r0ni_ has quit [Ping timeout: 480 seconds]
17:32svensounds like my adventures in the typec subsystem. That’s also gonna take more work that expected
17:33marcanwhat little I saw of that subsystem looked kind of crazy... I guess I wasn't wrong about that.
17:35millenialhacker has joined #asahi-dev
17:36marcanare we sure that's kosher in the general case? there could well be dynamic PSR involved, such that framebuffer updates don't actually make it to the display in a timely fashion
17:38svenmy favorite part is an ops struct that is shared by two separate components. and each of those is really only allow to implement a distinct subset of callbacks afaict. don’t ask me why it’s not two ops struct then
17:40marcan/home/marcan/asahi/git/PKGBUILDs/linux-asahi/src/linux-asahi-6.1-rc5-9/drivers/gpu/drm/apple/dcp.c: In function ‘dcp_start’:
17:40marcan/home/marcan/asahi/git/PKGBUILDs/linux-asahi/src/linux-asahi-6.1-rc5-9/drivers/gpu/drm/apple/dcp.c:249:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
17:40marcan/home/marcan/asahi/git/PKGBUILDs/linux-asahi/src/linux-asahi-6.1-rc5-9/drivers/gpu/drm/apple/dcp.c:251:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
17:43_jannau_I need to check but I'm reasonable sure that there is no dcp rtkit traffic. so what I've seen with the window resize shouldn't be a scanout issue. the show fps effect reports a frame rate of 4 fps
17:43millenialhacker has quit [Ping timeout: 480 seconds]
17:49marcanincidentally, the brightness control looks like nits-linear to me. is it supposed to be? it feels quite lopsided (normally you'd have some gamma applied to get a reasonable brightness curve, but I don't know if Linux has any standards for this)
17:54marcan_jannau_: I get a black screen after suspend/resume, but closing the lid and opening it brings it back. suspect missing backlight restore?
17:55marcanI *think* prior to this usb2 did survive but with a bus reset (xhci still errored out but recovered)
17:56_jannau_for the brightness hotkeys apple uses their marketing table with around 17 entries. those dteps are probably not linear
17:56atipls has quit [Quit: My laptop probably went to sleep.]
17:57marcanI need to relax a bit and sleep, but I would appreciate testing with both the regular kernel and -edge (available in asahi-dev)
17:57marcanif the regular one is stable with atcphy (sans suspend) and doesn't otherwise regress things, this is releasable this week
17:59svenfamous last words but I think at this stage atcphy can always recover with a hotplug in the worst case
18:07r0ni has joined #asahi-dev
18:55MajorBiscuit has joined #asahi-dev
19:08MajorBiscuit has quit [Ping timeout: 480 seconds]
19:46as400_ has joined #asahi-dev
19:50as400_ has quit [Remote host closed the connection]
19:53blazrasven: I was trying USB3 by plugging my flash disk to the 14" mbp and in one case it broke. However, replug fixed it. Dmesg: https://paste.debian.net/1260812/. Kernel 6.1.0-rc5-asahi-9-1-edge-ARCH from the asahi-dev/linux-asahi-edge package.
19:54bluetail has quit [Quit: The Lounge - https://thelounge.chat]
19:55bluetail has joined #asahi-dev
20:04jannausven: https://github.com/jannau/linux/tree/asahi-6.1-rc5-9-m2-atcphy contains a fix for t8103 efuse unit address
20:04svenand can you reproduce it? if yes it would be interesting to see what’s going on while enabling more debug messages
20:10blazraI have to apologize for playing with the brightness setting and therefore polluting the log :D
20:12jannaumacos does additional writes on t6001 for DP but it works at least partially without that
20:13blazraI don't know if it's related, but sometimes with the port on the right side I get two of these: "[ 732.609484] phy-apple-atc f03000000.phy: timed out waiting for ACIOPHY_TOP_PHY_STAT_LN0_UNK23"
20:19sventhere's still that weird ACIOPHY_TOP_BIST_READ_CTRL_LN0_PHY_STATUS_RE behavior I see on t8103
20:20svenguess i'll try hotplugging some usb3 device >50 times tomorrow and see if I can provoke that -110 error
20:21svenstill happy that the pipehandler sequence seems to be stable enough to recover even if that lock fails now
20:52jluthra has quit [Remote host closed the connection]
20:52jluthra has joined #asahi-dev
21:07___nick___ has quit [Ping timeout: 480 seconds]
21:18millenialhacker has joined #asahi-dev
21:28millenialhacker has quit [Ping timeout: 480 seconds]
21:34coutego has joined #asahi-dev
22:09weitcis has joined #asahi-dev
22:13coutego has left #asahi-dev [#asahi-dev]
22:52pthariensflame has joined #asahi-dev
22:52SSJ_GZ has quit [Ping timeout: 480 seconds]
22:56pthariensflame has quit []
23:10pjakobsson has quit [Ping timeout: 480 seconds]
23:11pjakobsson has joined #asahi-dev
23:14millenialhacker has joined #asahi-dev
23:19jannaumarcan: I only see choppiness with certain rendering operations (window resize, log out screen, ...) but no issues with the mouse pointer at 120Hz
23:20jannauwindow resize seems to be render limited. I see very high CPU use due to fast_composite_src_x888_8888() (pixman) when resizing konsole
23:22jannauhttps://github.com/jannau/linux/tree/asahi-6.1-rc5-9-dcp removes the 120Hz mode and fixes the indent warning
23:22millenialhacker has quit [Ping timeout: 480 seconds]
23:23jannaumarcan: m2 usb3 / atcphy support is in https://github.com/jannau/linux/tree/asahi-6.1-rc5-9-m2-atcphy