#
…

2022-11-04

00:10bisko has joined #asahi-dev
00:12millenialhacker has joined #asahi-dev
00:13lkron has quit [Quit: Lost terminal]
00:18bisko has quit [Ping timeout: 480 seconds]
00:20millenialhacker has quit [Ping timeout: 480 seconds]
00:25millenialhacker has joined #asahi-dev
00:47os has joined #asahi-dev
00:53thelounge7571340 has joined #asahi-dev
00:53thelounge7571340 has quit [Remote host closed the connection]
01:02millenialhacker has quit [Remote host closed the connection]
01:07marcanrmk: the other mfd cells are not expressed in the DT at all right now, and don't need to be. also I thought we agreed to drop the compatible for gpio?
01:07marcan(except rtc, rtc will need the nvram nonsense)
01:08marcani.e. having a cell does not imply having required DT documentation. that documentation should come with the driver itself, if that subdevice needs DT info.
01:09marcanrmk: re the last patch, I think the main Kconfig should also be moved under mfd, not just left as a dummy option
01:10marcanthen the kconfig can just mention that this module requires platform-specific backend drivers to function, or whatever
01:13millenialhacker has joined #asahi-dev
01:13marcanthe dpe stuff is probably a bunch of magic math, like the GPU, based on device tree data. good luck have fun, Lina's spent the past two weeks figuring out that for the GPU :p
01:14marcanhint: you want to mutate the device tree data before booting macos and diff the resulting writes (then shut down the system after them to avoid bad power data from actually breaking something)
01:14marcanlamlam: ^
01:27millenialhacker has quit [Ping timeout: 480 seconds]
01:30millenialhacker has joined #asahi-dev
01:32millenialhacker has quit [Remote host closed the connection]
01:33millenialhacker has joined #asahi-dev
01:36chadmedzzwysm: the DTs are fine, it looks like theres a race between adding a node to opp_list and parsing the next OPP. there doesnt seem to be any other way that branch could be taken
01:38chadmedi have to put the opp stuff on ice for a few days now though, but i think the smart long term solution is to detangle the opp-microwatt prop from the regulator stuff altogether, since its stated purpose hasnt really got much to do with regulators anyway and tethering it to that stuff was a lazy hack
01:41millenialhacker has quit [Ping timeout: 480 seconds]
01:47thelounge7571340 has joined #asahi-dev
01:47millenialhacker has joined #asahi-dev
01:47thelounge7571340 has quit [Remote host closed the connection]
01:55millenialhacker has quit [Ping timeout: 480 seconds]
01:57Dcow has quit [Remote host closed the connection]
02:49thelounge7571340 has joined #asahi-dev
02:49thelounge7571340 has quit [Remote host closed the connection]
03:00nicolas17 has quit [Ping timeout: 480 seconds]
03:31thelounge7571340 has joined #asahi-dev
03:31thelounge7571340 has quit [Remote host closed the connection]
03:45bisko has joined #asahi-dev
03:57bisko has quit [Ping timeout: 480 seconds]
04:33thelounge7571340 has joined #asahi-dev
04:33thelounge7571340 has quit [Remote host closed the connection]
04:51millenialhacker has joined #asahi-dev
04:53nyx_o has quit [Ping timeout: 480 seconds]
04:55nyx_o has joined #asahi-dev
04:59millenialhacker has quit [Ping timeout: 480 seconds]
05:23snowcra5h has quit [Quit: B1tch eX]
05:34thelounge7571340 has joined #asahi-dev
05:35thelounge7571340 has quit [Remote host closed the connection]
05:57millenialhacker has joined #asahi-dev
06:00thelounge7571340 has joined #asahi-dev
06:00thelounge7571340 has quit [Remote host closed the connection]
06:00ajv009 has joined #asahi-dev
06:03Skirmisher has quit [Remote host closed the connection]
06:04Skirmisher has joined #asahi-dev
06:10millenialhacker has quit [Ping timeout: 480 seconds]
06:27cylm has quit [Ping timeout: 480 seconds]
06:35bisko has joined #asahi-dev
06:37Dementor1 has joined #asahi-dev
06:42Dementor has quit [Ping timeout: 480 seconds]
06:42Dementor1 is now known as Dementor
06:43bisko has quit [Ping timeout: 480 seconds]
07:03thelounge7571340 has joined #asahi-dev
07:04thelounge7571340 has quit [Remote host closed the connection]
07:17thelounge7571340 has joined #asahi-dev
07:18thelounge7571340 has quit [Remote host closed the connection]
07:35millenialhacker has joined #asahi-dev
07:46millenialhacker has quit [Ping timeout: 480 seconds]
07:51SSJ_GZ has joined #asahi-dev
08:04m5zs7k has quit [Ping timeout: 480 seconds]
08:06m5zs7k has joined #asahi-dev
08:14MajorBiscuit has joined #asahi-dev
08:19thelounge7571340 has joined #asahi-dev
08:19thelounge7571340 has quit [Remote host closed the connection]
08:20Major_Biscuit has joined #asahi-dev
08:25Dcow has joined #asahi-dev
08:26MajorBiscuit has quit [Ping timeout: 480 seconds]
08:37bgb has joined #asahi-dev
08:37ccs1 has joined #asahi-dev
08:50kujeger has quit [Ping timeout: 480 seconds]
08:56cylm has joined #asahi-dev
09:00millenialhacker has joined #asahi-dev
09:02Mrmaxmeier has quit [Quit: The Lounge - https://thelounge.chat]
09:03Mrmaxmeier has joined #asahi-dev
09:09millenialhacker has quit [Ping timeout: 480 seconds]
09:20thelounge7571340 has joined #asahi-dev
09:20thelounge7571340 has quit [Read error: Connection reset by peer]
09:24rmkmarcan: if we don't have DT compatibles in the mfd cell, MFD doesn't populate the of_node/fw_node in the device.
09:25rmkthere was a discussion about this in the initial posting, and the decision there was rather than messing about in each client, we'd add compatibles - that came from the review of the DT bindings iirc.
09:25rmkwhat was more recently suggested to be dropped was the t8103 specific compatible, not the generic one
09:59gladiac has joined #asahi-dev
10:01bpye has quit [Quit: Ping timeout (120 seconds)]
10:01bpye has joined #asahi-dev
10:07millenialhacker has joined #asahi-dev
10:15millenialhacker has quit [Ping timeout: 480 seconds]
10:35thelounge7571340 has joined #asahi-dev
10:35thelounge7571340 has quit [Remote host closed the connection]
10:50ccs1 has quit [Ping timeout: 480 seconds]
11:08Dementor has quit [Ping timeout: 480 seconds]
11:14as400 has joined #asahi-dev
11:26as400_ has joined #asahi-dev
11:27as400 has quit [Remote host closed the connection]
11:31as400_ is now known as as400
11:40thelounge7571340 has joined #asahi-dev
11:40thelounge7571340 has quit [Remote host closed the connection]
11:41as400 has quit [Remote host closed the connection]
11:42as400 has joined #asahi-dev
11:54amateurece has quit [Quit: Connection closed for inactivity]
12:13as400 has quit [Remote host closed the connection]
12:13as400 has joined #asahi-dev
12:16roxfan has joined #asahi-dev
12:18millenialhacker has joined #asahi-dev
12:21roxfan2 has quit [Ping timeout: 480 seconds]
12:24as400 has quit [Remote host closed the connection]
12:26bgb has quit [Remote host closed the connection]
12:26millenialhacker has quit [Ping timeout: 480 seconds]
12:27bgb has joined #asahi-dev
12:30as400 has joined #asahi-dev
12:42cy8aer has quit [Remote host closed the connection]
12:42cy8aer has joined #asahi-dev
12:53thelounge7571340 has joined #asahi-dev
12:53thelounge7571340 has quit [Remote host closed the connection]
13:00as400 has quit [Ping timeout: 480 seconds]
13:01as400 has joined #asahi-dev
13:05bisko has joined #asahi-dev
13:10bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:34as400_ has joined #asahi-dev
13:35as400 has quit [Remote host closed the connection]
13:39as400_ is now known as as400
13:48ChaosPrincessmarcan: it looks like there is a bug in apple_smc_rtkit_get_key_info: the key_info variable is not actually passed to the apple_smc_cmd
14:01thelounge7571340 has joined #asahi-dev
14:02thelounge7571340 has quit [Remote host closed the connection]
14:06as400 has quit [Ping timeout: 480 seconds]
14:08as400 has joined #asahi-dev
14:30millenialhacker has joined #asahi-dev
14:38millenialhacker has quit [Ping timeout: 480 seconds]
14:40as400 has quit [Ping timeout: 480 seconds]
14:41as400 has joined #asahi-dev
15:02thelounge7571340 has joined #asahi-dev
15:03thelounge7571340 has quit [Remote host closed the connection]
15:03as400 has quit [Ping timeout: 480 seconds]
15:11hxliew has joined #asahi-dev
15:15as400 has joined #asahi-dev
15:18Dcow has quit [Remote host closed the connection]
15:32svenhrm, looks like macos has another way that's not the tps6598x chip to figure out HPD. my usb3+dp hub doesn't trigger any irq in the tps chip when I disconnect the hdmi cable
15:32svenmacos somehow detects that disconnect though
15:36as400 has quit [Ping timeout: 480 seconds]
15:41as400 has joined #asahi-dev
15:43sven*sigh*, the HPD in "DP SID Status" is correct but no interrupt is triggered when that changes
15:43sventhe hpd in "Data Status" is incorrect and can get stuck but there is an interrupt triggered when it changes :(
15:48Dcow has joined #asahi-dev
15:51svenjannau: https://f.svpe.de/32f2cafe3d6a663ee824841f8bdd4ee9f1a2dafdc234abd2ffceccaf215cedbf_dcpext-panic.txt no idea how I hit that once. looks like you can also look forward to dcpext fun though!
15:55_jannau_two concurrent hotplug events maybe?
15:56svenI've enabled all IRQs in the tps chip and nothing triggered when I unplugged the HDMI cable
15:56sventhere's probably yet enother out of band mechanism
15:56sven*another
15:59Dcow has quit [Ping timeout: 480 seconds]
15:59svenoh, you meant for the crash?
15:59svencould be
16:01Dementor has joined #asahi-dev
16:03as400 has quit [Ping timeout: 480 seconds]
16:05millenialhacker has joined #asahi-dev
16:08_jannau_yes, the crash
16:08_jannau_at least for the tps65982 the super speed pairs are not mapped through it so it probably doesn't notice if you disconnect the DP cable
16:09svenyeah, I think I accidentally trigger two hotplug events when shutting down but only if tipd shuts down before DCP
16:09sventps6598x notices, it just doesn’t allow me to trigger an interrupt :(
16:10svenapparently there’s some PD messages that is exchanged which changes this “DP SID Status”
16:10svenThere’s just no interrupt when that changes happens
16:13svenbut at least I think I found the missing delay that broke insertion/removal in the type c side
16:13svenit switches pretty reliably between usb3/DP-only/usb3+DP now
16:13sven*on the typec
16:14millenialhacker has quit [Ping timeout: 480 seconds]
16:14thelounge7571340 has joined #asahi-dev
16:15thelounge7571340 has quit [Remote host closed the connection]
16:19as400 has joined #asahi-dev
16:28gladiac is now known as Guest433
16:28gladiac has joined #asahi-dev
16:30psykose has quit [Remote host closed the connection]
16:31psykose has joined #asahi-dev
16:34Guest433 has quit [Ping timeout: 480 seconds]
16:45as400 has quit [Ping timeout: 480 seconds]
16:54as400 has joined #asahi-dev
17:09as400_ has joined #asahi-dev
17:09as400 has quit [Remote host closed the connection]
17:14as400_ is now known as as400
17:28thelounge7571340 has joined #asahi-dev
17:29thelounge7571340 has quit [Remote host closed the connection]
17:53millenialhacker has joined #asahi-dev
18:02millenialhacker has quit [Ping timeout: 480 seconds]
18:11Dcow has joined #asahi-dev
18:33thelounge7571340 has joined #asahi-dev
18:34thelounge7571340 has quit [Remote host closed the connection]
18:50jlco_ has quit []
18:54as400_ has joined #asahi-dev
18:55as400 has quit [Remote host closed the connection]
18:55jlco has joined #asahi-dev
18:59as400_ is now known as as400
19:00jlco has quit []
19:01jlco has joined #asahi-dev
19:09bisko has joined #asahi-dev
19:10bisko has quit []
19:17svenweird, I don’t see anything special when tracing macOS :/
19:17svenno idea how it gets the HPD updates
19:21bisko has joined #asahi-dev
19:24bisko has quit []
19:30millenialhacker has joined #asahi-dev
19:32millenialhackersven: naive question, there is no ring buffer / shared memory mapped between usb3 controller & AP?
19:32svenuh... define usb3 controller
19:33svenxhci has a bunch of rings
19:33svenbut that's entirely unrelated to the displayport HPD
19:34millenialhackerIs the Display Port controlled by a dedicated processor right?
19:34millenialhackerA co-processor* I mean
19:34svennot really
19:34jannauyes, that is dcp(ext)
19:35svenit's complicated ;)
19:35millenialhackerI got confused yes or no? :D
19:35svendcpext controls parts of it. mainly the actual display stream and all the link training stuff
19:35sventhen there's atcphy which controls the actual physical layer
19:35millenialhackerIt may be possible that the status change you are looking for is exposed in a IRQ or ring buffer of a co-processor
19:36svenand then there's this tps6598x chip that (among other things) negotiates the cable mode (e.g. usb3, dp altmode, etc.)
19:37millenialhackerIs really weird you see no extra data in refs for tps chip
19:38millenialhackerEverything points towards another comm channel, maybe a IO mapped register somewhere else
19:38sventhe tps chip can only speak i2c to the main SoC afaik
19:39thelounge7571340 has joined #asahi-dev
19:39thelounge7571340 has quit [Remote host closed the connection]
19:39millenia_ has joined #asahi-dev
19:40millenialhackerNothing happens on SPMI?
19:41as400_ has joined #asahi-dev
19:42as400 has quit [Remote host closed the connection]
19:43svenhrm, it might be a GPIO but that would be a bit strange
19:44svenoh, but then it would be in the ADT and last time I checked I didn't see anything there
19:44millenialhackerStrange is a interesting word for Apple
19:46as400_ is now known as as400
19:47jannauthe hdmi hpd on the macbook pro 14" is a gpio and in the adt
19:48millenialhackerjannau what about MbP M1 ?
19:49jannauso it seems to be unlikely that tps6598x uses a gpio without mention in the ADT
19:49millenia_ has quit [Ping timeout: 480 seconds]
19:49svenit's also a bit weird when they have a perfectly cable i2c bus and a gpio for the irq to waste another gpio on hpd
19:52svens/cable/capable/
19:55Major_Biscuit has quit [Ping timeout: 480 seconds]
20:00jannauthe tps65987 data sheet says that it can be configured to use gpio3 for hpd when hpd is signaled through usb pd, see "8.3.8 DisplayPort HPD"
20:01sventhe TPS65987DDH datasheet claims there is an interrupt for changes to that DP SID register but it looks like that one just doesn't exist on the CD321X chips
20:03svenhm.. but we'd still need the gpio configured in the ADT, wouldn't we?
20:04svenmaybe there's some magic configuration for the cd321x missing that somehow enables that DP SID interrupt
20:05as400 has quit [Ping timeout: 480 seconds]
20:05millenialhacker has quit [Remote host closed the connection]
20:06millenialhacker has joined #asahi-dev
20:07millenialhacker_ has joined #asahi-dev
20:08millenialhacker_ has quit [Remote host closed the connection]
20:14millenialhacker has quit [Ping timeout: 480 seconds]
20:15as400 has joined #asahi-dev
20:20millenialhacker has joined #asahi-dev
20:21gladiac has quit [Quit: k thx bye]
20:31as400 has quit [Ping timeout: 480 seconds]
20:33millenialhacker has quit [Remote host closed the connection]
20:39millenialhacker has joined #asahi-dev
20:41jannauare missing interrupts only a problem with the usb3+dp hub? I see tps6598x irq on dp connect and disconnect with a sample usb-c to dp dongle
20:41svenit works fine on my usb-c to hdmi and my usb-c to dp cable
20:42svenit only doesn't work with this USB3/DP hub that has a HDMI out when I disconnect the HDMI side
20:42thelounge7571340 has joined #asahi-dev
20:42sven#define APPLE_CD_DATA_STATUS_DP_HPD BIT(15)
20:43sventhat's what works for HPD in TPS_REG_DATA_STATUS most of the time
20:43svenbut for the usb3/dp hub it only transitions to 1 once and is then stuck there
20:46jannaucould it be that the dp to hdmi brigde in the hub keeps the dp connection up after the hdmi unplug?
20:46jannauor maybe not up but in a weird state?
20:47thelounge7571340 has quit [Remote host closed the connection]
20:47jluthra has quit [Remote host closed the connection]
20:48as400 has joined #asahi-dev
20:48jluthra has joined #asahi-dev
20:48svenyeah, pretty much
20:48svenbut the HPD state in that DP SID register does change
20:48svenand macos somehow notices that the HDMI cable is disconnected and removes the display from system settings
20:49sven#define TPS_REG_DP_SID 0x58 <-- that thing is updated
20:49thelounge7571340 has joined #asahi-dev
20:50svenBIT(7) in byte 5 of that thing
20:50svenI can just plug the hdmi in again and it recovers the connection
20:50svenbut I assume it will break if I e.g. plug in a different screen that can't work with the previously negotiated link
20:52svenoh well, I think I'll spend some time to clean this up a bit tomorrow so that other people can play with it as well
21:01jannauI guess I should then start looking into why dcpext0 doesn't work on m1 max/ultra
21:03sventhere's also the DT bindings, right now they are pretty hack as you will notice tomorrow
21:04sven*pretty big
21:08cylm has quit [Quit: WeeChat 3.7.1]
21:09cylm has joined #asahi-dev
21:11lamlam has joined #asahi-dev
21:12lamlammillenialhacker: that's really nice work. thank you, it's helping me understand alot regarding the channels.
21:12lamlamwould not be surprised if it's the same team behind it. there's an entire apfs file-sharing protocol between the two. first ane wake is actually called by isp to init apfs lol.
21:12lamlamalso i boot guest w/ these ane-specific args added:
21:12lamlam"amfi_allow_any_signature=1 enforceModelSignatureChecks=0 removeAuthCodeChecks=1 IOReportEnable=1 aneFWTrace=1 aneFWTraceBuffer=1 aneDebug=1 aneLogging=1"
21:12lamlamnot sure which is the culprit but am seeing some *really* detailed isp logs by ane (log show --last 5m --debug --info)... might help
21:15as400 has quit [Ping timeout: 480 seconds]
21:22as400 has joined #asahi-dev
21:22thelounge7571340 has quit []
21:30povikwait, what's that? how does ane/isp need to know anything about apfs?
21:44os has quit [Ping timeout: 480 seconds]
21:46ajv009 has quit [Remote host closed the connection]
21:49millenialhacker has quit [Remote host closed the connection]
21:50as400 has quit [Ping timeout: 480 seconds]
21:52millenialhacker has joined #asahi-dev
21:53amarioguymarcan: okay so preparing the v4 now (and testing it and all)
21:53amarioguysince you authored the improved error recovery, i'm intentionally not including it in my v4 (my patch purely adds back the reg_write in the IRQ and increases the timeout) to preserve your authorship and all
21:55amarioguydo we want to send both patches as a 2 patch series? (this seems like best option in my view - gets both in at the same time but i'm open to other views on this)
21:55as400 has joined #asahi-dev
21:56amarioguyreg_write in the IRQ handler*
22:01millenialhacker has quit [Ping timeout: 480 seconds]
22:08svenI’d just send your patch first, it strictly improves things
22:08svenand then the error handling can come later and make things even better
22:09svenI’d only send them as a single series if they are strongly related (e.g. new dt bindings or subsystem quirks/changes followed by a driver)
22:19jannauI would also leave the error recovery patch out. it has little to do with the topic of this already in progress "series".
22:20cylm has quit [Quit: WeeChat 3.7.1]
22:21jannausome might prefer it though if the timeout increase and the irq change are two separate commits
22:23jannauthe justification to send them both together is that 10ms timeout breaks the typec chip on some apple silicon system in combination with faster processing with irqs
22:25svenif you do decide to split the timeout off I’d make sure that patch comes first. otherwise the in between state is broken
22:37os has joined #asahi-dev
22:37amarioguyalright, i'll probably just keep the increased timeout on my patch here, it's just easier in that case
22:38amarioguygoing to do some testing here then it's off to the mailing lists (hopefully this time, we won't need a v5)
22:39amarioguy(though in fairness i've seen v11 patches before, the SEV series was a lot lol)
22:39amarioguy(think it was also the case for the tdx series lol)
22:42lamlam has quit [Remote host closed the connection]
22:42amarioguyone thing i do think should be clarified though - given that i'm keeping the timeout change should i also change the polled mode case?
22:45cy8aer has quit [Remote host closed the connection]
22:49amarioguyoh wait, my patch does that by default, nvm lol had a dumb moment
22:55cy8aer has joined #asahi-dev
23:32SSJ_GZ has quit [Ping timeout: 480 seconds]
23:55amarioguyalright so i've formatted the patch, testing is good on the irq path, should be good to go
23:55amarioguyjust want to make sure i don't need to send a v5 lol
23:55amarioguyso the changes are simply as such from v3 - added the reg_imask write in the irq handler, bumped the timeout to 100 ms
23:56amarioguycommit message will simply be the description of the patch with the signed-off-by, changelog after the '---' and no tested-by tags
23:56amarioguysorry i just get a bit nervous, esp. now as this is the 4th time i've tried for upstreaming lol
…