#asahi-dev · 2023-07-20 08:05
jannauupdating how locked darts are handled. This is required for dispext* on M2 and presumedly t602x#asahi-dev · 2023-07-20 08:02
jannau000-devicetree and 200-dcp are simple fast forward updates but bits/020-dart is almost a complete rewrite#asahi-dev · 2023-07-20 08:01
jannaumarcan: please pull bits/000-devicetree, bits/020-dart and bits/200-dcp from https://github.com/jannau/linux#asahi-dev · 2023-07-19 07:06
jannaunice, the dummy_piodma module and driver is gone and so is the unsafe dma_get_sgtable/dma_map_sgtable usage#asahi-dev · 2023-07-18 20:11
jannauhttps://github.com/intel/thunderbolt-utils/issues/1#asahi-dev · 2023-07-18 20:07
jannauhigh quality Makefile: "gcc -g -Wall -W -O2 -o /usr/bin/lstbt $(OBJECTS) -lm"#asahi-dev · 2023-07-18 19:54
jannau"will work" == "will work once we have thunderbolt support". there is no thunderbolt in asahi#asahi-dev · 2023-07-18 19:51
jannauanyone willing to take bets whether https://github.com/intel/thunderbolt-utils will work unmodified?#asahi-dev · 2023-07-18 17:55
jannauit means I have to add special blocked domain handling for locked DARTs but otherwise it should be ok to leave the TTBRs after disabling DMA#asahi-dev · 2023-07-18 17:39
jannauit looks like it is fine otherwise as well since the iommu code switches to the blocking domain#asahi-dev · 2023-07-18 17:37
jannausven: apple_dart_domain_free() is fine as is. it's called on the previous domain after switching#asahi-dev · 2023-07-17 19:21
jannausven: shouldn't we clear the ttbrs and disable translation in apple_dart_domain_free(). they are pointing to freed memory after free_io_pgtable_ops() as far as the kernel is concerned#asahi-dev · 2023-07-16 21:03
jannauand I fear I will run into that once I use an unmanaged domain for dcp piodma#asahi-dev · 2023-07-16 21:01
jannauI was looking at .release_device which should be fine. attaching to new iommu domain might be a problem if apple_dart_domain_free() is called#asahi-dev · 2023-07-16 20:43
jannaudcp should be fine in the sense that we will never return to simpledrm. also the use case for detaching from the iommu is a bit esoteric to begin with#asahi-dev · 2023-07-16 20:41
jannaushould be fine in the sane that we restore reserved boot regions when the device re-attaches#asahi-dev · 2023-07-16 20:39
jannauso I guess I should be answer that for dcp but I guess other coprocessor without locked darts are affected as well#asahi-dev · 2023-07-16 20:38
jannaulooking into whether I need to save and restore the boot level one table for locked darts#asahi-dev · 2023-07-16 20:37
jannauis it reasonable to assume that devices are shutdown sufficiently when they detach from the iommu so they don't access memory#asahi-dev · 2023-07-16 15:26
jannausven: I think we concluded that the crossbars are per die without ultrafusion links#asahi-dev · 2023-07-16 12:54
jannauoh. `for b in $(seq 255); echo $b > /sys/class/backlight/apple-panel-bl/brightness; done` freezes/deadlocks dcp#asahi-dev · 2023-07-16 10:20
jannaunot sure what happens with the CTM updates but I can't avoid the swap in the current form. I need to check what kwin does and if other drivers have special shortcuts for this. night color on intel (using gamma tables is smother)#asahi-dev · 2023-07-16 08:43
jannaudottedmag: no, at least from the FW interface CTM updates and swaps are decoupled, it's a driver limitation that it swaps after an CTM update#asahi-dev · 2023-07-16 08:42
jannaubrightness updates probably consume a swap as well. I thought I left the code in which waits and checks if a swap already updated the brightness#asahi-dev · 2023-07-16 08:36
jannaustandalone CTM updates will consume one swap which can't be sed for screen updates. it shouldn't and probably doesn't need to#asahi-dev · 2023-07-16 08:27
jannaustrange, except for the lag it has always worked here#asahi-dev · 2023-07-16 08:15
jannaucolor preview works with all settings here#asahi-dev · 2023-07-16 08:14
jannauwhich setting was the previous one? I have "Force smoothest animations" and "Reduce latency by allowing screen tearing ...", not sure if/how the latter would make a difference with wayland #asahi-dev · 2023-07-16 08:10
jannauthe question is whether it's necessary to a swap with DCP. It lives in the function responsible for atomic updates#asahi-dev · 2023-07-16 08:08
jannauit does here#asahi-dev · 2023-07-16 08:07
jannaudefine correctly#asahi-dev · 2023-07-16 08:04
jannauI suppose I should check if CTM updates need a swap, they probably don't#asahi-dev · 2023-07-16 08:04
jannauif you move it fast you can see lag which is caused by blocking ctm updates and "stealing" frame updates from rendering#asahi-dev · 2023-07-16 08:02
jannaudoes that mean the color temperature preview in system settings doesn't work for you? change the setting to "always on night color" and move the "night color temperature" around while keep the left mouse button presses#asahi-dev · 2023-07-16 07:44
jannaubrightness should be ok though but I better should check the implementation\#asahi-dev · 2023-07-16 07:44
jannauchadmed: I haven't noticed that but haven't tested specifically for it. For CTM updates it depends on how userspace handles them. if it does a CTM update independently of FB updates it will lose one FB update#asahi-dev · 2023-07-16 07:38
jannauI suppose DCP reports the swap as completed in vblank, i.e. after it stopped accessing the old FB#asahi-dev · 2023-07-16 07:37
jannauon DRM side we can release the FB only after DCP reported the swap to the new FB as completed. everything else led to crashes of the HW display controller due to reading unmapped memory#asahi-dev · 2023-07-16 07:28
jannauunsure, DRM atomic helpers might handle DRM_MODE_ATOMIC_NONBLOCK for us but the fw/hw swap is blocking#asahi-dev · 2023-07-16 07:23
jannaudottedmag: for now the swaps are immediate and blocking so you have a rough idea when the previous one was. the FW interface has timestamps, supposedly for VRR and async swaps. The driver doesn't use that yet and I haven't really looked into how that fits into drm/kms#asahi-dev · 2023-07-15 18:03
jannauother things like the SEP firmware is copied#asahi-dev · 2023-07-15 18:02
jannauas fresh as it is after iboot ran. the adt is in the bootargs and remains at it's location#asahi-dev · 2023-07-15 13:17
jannau"this" == my draft device tree model and the sub drivers I'm writing#asahi-dev · 2023-07-15 13:15
jannauthis tries to copy the drm/kms device model which is a terrible fit for DCP#asahi-dev · 2023-07-15 13:12
jannauI hope we can shove into the dp controller as well altough the second dcp dp out will be a strange fit#asahi-dev · 2023-07-15 13:11
jannaudcp connects via ports/graph to those dp controller but I'm unsure how dp-tunneling fits into that#asahi-dev · 2023-07-15 13:09
jannaucurrent plan is to have "fake" (as in not backed by HW) displayport controllers which control the phy and mux#asahi-dev · 2023-07-15 13:07
jannaudon't or talk to me first, I'm working on that to at least allow in principle dynamic switching#asahi-dev · 2023-07-15 12:55
jannausven: dcp is mostly still the same hardcoded hacks regarding phy and mux?#asahi-dev · 2023-07-15 12:54
jannausplit usb3 and DP seems to be sane default and is good up to 4k60 (8bpp, rgb 4:4:4, no compression) which should cover most displays and many dp-altmode usb-c displays will have an usb hub