#asahi-dev · 2022-02-03 19:28
jannaunot resetting any dart? or just the ones with reserved regions?#asahi-dev · 2022-02-03 18:37
jannauthis problem would go also vanish if I removed apple_dart_hw_reset()#asahi-dev · 2022-02-03 18:35
jannaujust checking if I missed something before I reply to https://lore.kernel.org/dri-devel/YUIPCxnyRutMS47%2F@orome.fritz.box/#asahi-dev · 2022-02-03 18:34
jannaubut that means I would need to find the devices using (via "iommus" phandle) the probed dart#asahi-dev · 2022-02-03 18:33
jannauthe reserved regions are stored in the device node using the region and think that's a sensible aproach#asahi-dev · 2022-02-03 18:30
jannauI don't think I can use anything else than device tree processing since I need the information even when no driver is present#asahi-dev · 2022-02-03 18:29
jannauI want to use that to determine reserved regions on an dart probe#asahi-dev · 2022-02-03 18:28
jannauis there a way to resolve device tree phandle references in reverse? the device tree api doesn't offer it. I wouldn't have expected that since it requires a preparsed tree or iterating over all nodes#asahi-dev · 2022-02-02 21:04
jannauthe macho parsing in python was something needed for loading macos kernels in the HV#asahi-dev · 2022-02-02 21:02
jannaudo we need that? we probably should think of a simpler solution now that we have raw binaries anyway for macos 12.1 and later#asahi-dev · 2022-02-02 19:10
jannauseems to be enough to have just the framebuffer as reserved region#asahi-dev · 2022-02-02 18:53
jannaumostly to catch unexpected changes in the adt not catch a nefarious iboot#asahi-dev · 2022-02-02 18:52
jannauchecking every page looks indeed over the top. checking the last mapped page shouldbe enough of a sanity check#asahi-dev · 2022-02-02 18:47
jannauok, easier for me then. I laready check if the reserved regions are mapped continuously in m1n1 but not if anything else is mapped#asahi-dev · 2022-02-02 18:42
jannauI'm not sure if it would be desirable to verify that only the the reserved resgions are mapped at probe#asahi-dev · 2022-02-02 18:40
jannauI got rid of the force-locked dart-disp0 using reserved regions from the devicetree. Works by not resetting stream ids with reserved regions on probe and recreating the regions on device attach#asahi-dev · 2022-01-29 07:16
jannauso display wise only the framebuffer works, okay for now on laptops and imacs, less so on the mac mini especially when using a monitor which is not full hd#asahi-dev · 2022-01-29 07:12
jannauthat means hardware which which is behind by darts without bypass support (pice/thunderbolt) or locked (dcp) will not work#asahi-dev · 2022-01-29 07:09
jannaunothing has changed with wrt 4k support. the darts are configured to bypass mode with 4k page size#asahi-dev · 2022-01-28 19:39
jannauusleep_range()#asahi-dev · 2022-01-28 19:39
jannauhttps://www.kernel.org/doc/html/latest/timers/timers-howto.html#inserting-delays#asahi-dev · 2022-01-28 19:38
jannauit will not be shorter but can much longer, iirc another function is recommended for low single digit msleep#asahi-dev · 2022-01-28 09:03
jannaustill zero after a full linux boot, so those might not be used/needed (for normal operation)#asahi-dev · 2022-01-28 08:50
jannauboth additional buffers are all 0 after iboot#asahi-dev · 2022-01-28 08:24
jannauI've have not yet thouroughly checked if the region ids are stable over devices/iboot versions#asahi-dev · 2022-01-28 08:22
jannaucurrently just by checking if the last io address translates to the last physical address#asahi-dev · 2022-01-28 08:21
jannauall are described in "/chosen/carveout-memory-map" and I have m1n1 code which verifies that the region is continously mapped in the dart stream we expect#asahi-dev · 2022-01-28 08:18
jannauit's not too bad, there are two regions for for stream 0 and one region for stream 4#asahi-dev · 2022-01-28 07:37
jannaushould have looked closer at the other patches in the thread#asahi-dev · 2022-01-28 07:36
jannauyes, it resets during probe so the simple solution to do this during device attache will not work#asahi-dev · 2022-01-28 07:27
jannauhttps://gist.github.com/jannau/c8f037cac275b9666a8df5b31cd4232f#asahi-dev · 2022-01-28 07:27
jannauif the page faults are logged I don't see anything. kernel seems to hang after dcp-piodma attaches to the iommu#asahi-dev · 2022-01-28 07:23
jannauusing apple_dart_map_pages() which does not complains, addresses and sinze is what I expect#asahi-dev · 2022-01-28 07:22
jannausven: I install the reserved mappings in apple_dart_setup_translation() before apple_dart_hw_enable_translation()#asahi-dev · 2022-01-28 07:21
jannaustill does not work with all dart-disp0 as reserved regions/mappings#asahi-dev · 2022-01-27 23:26
jannauyes, except for dealing with devicetree#asahi-dev · 2022-01-27 23:16
jannaustream 0 has also one additional page mapped#asahi-dev · 2022-01-27 23:15
jannauit has a region just after the framebuffer mapped, only referenced in carveout-memory-map#asahi-dev · 2022-01-27 23:06
jannaumapping the framebuffer also for stream 4 of dart-disp0 is not enough#asahi-dev · 2022-01-27 23:05
jannausven: I guess noboby checked if something else needs to be mapped. proof of concept seems to work but kernel hangs after dcp-piodma attaches to the iommu domain#asahi-dev · 2022-01-26 23:20
jannauprobably still worth postponing it to after the initial merge#asahi-dev · 2022-01-26 23:15
jannauthat would be the least ugly solution I can think of#asahi-dev · 2022-01-26 23:15
jannaucan we easily overallocate the framebuffer? i.e. allocate 128x128 if userspace wants a 64x64 cursor, expose only the bottom right quadrant as cursor and keep the rest transparent?#asahi-dev · 2022-01-26 22:21
jannaujust lying about the width and height of the cursor buffer doesn't seem to work#asahi-dev · 2022-01-26 22:20
jannauyes, it's only the cursor that vanishes. video playback on the primary plane is not affected#asahi-dev · 2022-01-26 22:15
jannauagraf: I assume just the cursor is not rendered. desktop was static so I can't tell if it's updated#asahi-dev · 2022-01-26 22:14
jannauthere was some cursed behavior wrt the cursor and blending, maybe macos switches to sw blending when the cursor is clipped#asahi-dev · 2022-01-26 22:09
jannauI haven't check what happens on macos with vidoe playback#asahi-dev · 2022-01-26 22:08
jannauI think nobody has looked into it yet#asahi-dev · 2022-01-26 22:08
jannauso it's possible that only the dcp in the m1 pro/max have 4 planes