#
…

2022-01-26

00:03aleasto has quit [Quit: Konversation terminated!]
00:13chadmed has quit [Remote host closed the connection]
00:19chadmed has joined #asahi-dev
01:02yuyichao_ has quit [Ping timeout: 480 seconds]
01:17jbowen has joined #asahi-dev
01:25jbowen has quit [Ping timeout: 480 seconds]
01:46yuyichao_ has joined #asahi-dev
03:08PhilippvK has joined #asahi-dev
03:17jbowen has joined #asahi-dev
03:26jbowen has quit [Ping timeout: 480 seconds]
05:12ChristianOndaatje[m] has joined #asahi-dev
05:18jbowen has joined #asahi-dev
05:26jbowen has quit [Ping timeout: 480 seconds]
05:39the_lanetly_052 has joined #asahi-dev
06:34espo has joined #asahi-dev
06:37chadmed has quit [Read error: No route to host]
06:37chadmed has joined #asahi-dev
07:11jbowen has joined #asahi-dev
07:19jbowen has quit [Ping timeout: 480 seconds]
07:20pbc has joined #asahi-dev
08:06pbc has quit [Ping timeout: 480 seconds]
08:08Major_Biscuit has joined #asahi-dev
08:41Major_Biscuit has quit [Ping timeout: 480 seconds]
08:46mazjannau: the only solution I have so far is to hack grub to provide a different DTB per kernel. i really hope we won't have to do that too often...
08:47ketteniswon't work, since you'd miss the modifications that m1n1 makes
08:48kettenisalthough with the minimal hardware support that 5.16 and 5.17 have you may actually get away with that
08:52ChaosPrincessoh, so thats why wifi broke on my machine when i tried to override the dtb
08:53IbrahimMAkrab[m] has joined #asahi-dev
08:54mazkettenis: yeah, this is a massive hack, and it may not even be reliable (nothing says that the CPU release addresses are constants).
08:55klaus has joined #asahi-dev
08:56Major_Biscuit has joined #asahi-dev
09:03jbowen has joined #asahi-dev
09:05MajorBiscuit has joined #asahi-dev
09:06Major_Biscuit has quit [Ping timeout: 480 seconds]
09:11jbowen has quit [Ping timeout: 480 seconds]
09:13jannaubummer, I guess for 5.17 we need a way to force APPLE_PMGR_PWRSTATE on. Not sure how exactly, I guess every driver using device nodes with "power-domains" needs to to depend on APPLE_PMGR_PWRSTATE
09:14jannauthe kernel still works without APPLE_PMGR_PWRSTATE but is mostly useless since no hardware is available
09:30gabuscus has quit [Ping timeout: 480 seconds]
09:34gabuscus has joined #asahi-dev
09:36aleasto has joined #asahi-dev
09:55roxfan has quit [Remote host closed the connection]
09:57roxfan has joined #asahi-dev
10:11kettenishow do other SoCs make sure their clock/reset/powerdomain drivers are enabled?
10:12kettenisisn't it just a matter of something like:
10:12kettenisdefault y if ARCH_APPLE
10:13kettenisin the appropriate Kconfig file?
10:14chadmedthats how broadcom does it at least, afaik
10:14svenpretty sure we already have default ARCH_APPLE for APPLE_PMGR_PWRSTATE
10:15_jannau_I think the default Y is already there
10:15chadmedARCH_APPLE already enables all the mission critical stuff. the only thing i had to enable myself was ANS2
10:16chadmedwe should probably turn that on automatically if ARCH_APPLE and NVME are both set to Y. i doubt anyones going to want to compile in nvme and not have ans2 come with it
11:22espo_ has joined #asahi-dev
11:27espo__ has joined #asahi-dev
11:29espo has quit [Ping timeout: 480 seconds]
11:35espo_ has quit [Ping timeout: 480 seconds]
11:50chadmed has quit [Read error: Connection reset by peer]
12:02chadmed has joined #asahi-dev
12:11espo_ has joined #asahi-dev
12:17espo has joined #asahi-dev
12:19espo__ has quit [Ping timeout: 480 seconds]
12:24espo_ has quit [Ping timeout: 480 seconds]
12:54espo has quit [Quit: Leaving]
13:19chadmed has quit [Ping timeout: 480 seconds]
13:22MajorBiscuit has quit [Ping timeout: 480 seconds]
13:25MajorBiscuit has joined #asahi-dev
14:03* alyssatries to boot new kernel
14:05alyssadid the err way to boot change why is m1n1 mad at me
14:06alyssajannau: ^
14:06alyssam1n1 is spamming exceptions at me trying to boot
14:07alyssaoh right need to chainload m1n1 maybe
14:09alyssaok, chainloading m1n1 first now I am stuck at the Asahi logo ..
14:09alyssainterestingly my USB lights up so I guess Linux did boot a little bit
14:09alyssaoh right DCP firmware ABI
14:12_jannau_alyssa: still using 11.x? revert 6d4a4d359928ad15084b1addd965d2b78bb8635c and bcc0fa44ebd5ce11c2b1964b0952cf918965f5b1
14:14alyssayep right
14:14alyssawondering why git rebase -i is giving me ridiculous things
14:15alyssaoh the merge commits ok
14:15alyssaNow is probably the time to update to 12.x but one thing at atime
14:17alyssa_jannau_: it works! :-)
14:17alyssa5.16.0-asahi-next-20220108m1+
14:17alyssaNo Wi-Fi, mumble
14:18alyssanew name okay
14:18alyssaI guess I should really use marcan's extractor now
14:24_jannau_someone is slacking on the smc gpio driver, so the wifi device has to be enabled either by pcie_enable_devices.py in proxyclient/experiments or u-boot
14:25alyssa_jannau_: I already had smc.py in m1n1 for that :-p
14:25alyssa"ImportError: attempted relative import with no known parent package" grumble
14:27_jannau_ah, ok then it is one of the needed files for the brcmfmac driver, not just the firmware
14:27alyssapython3 -m firmware.wifi i guess
14:29jbowen has joined #asahi-dev
14:29_jannau_also make sure you have the user space fallback firmware loader disabled. the driver ask for so many alternate names that the 1 minute timeouts results in waiting over 15 minutes until all firmware is loaded
14:34alyssa*thinking*
14:34alyssathat sounds.. not great...
14:36alyssawhy is DCP not coming up now... it was a boot ago
14:40alyssagah now it's not
14:42yuyichao_ has quit [Ping timeout: 480 seconds]
14:43alyssait boots under the hypervisor >.<
14:49alyssaOh, fun. Got the back trace. enumerate_modes is crashing
14:50alyssatrying to load modes[best_id].mode.type if I'm reading the assembly right
14:56alyssaOh, I see the bug
15:02jannauyou have virtual modes with an higher score than non-virtual modes?
15:03alyssajannau: Possibly, but the actual issue is sillier
15:03alyssaPatch incoming
15:03* alyssarebuilds and reboots
15:05alyssaRight, I think that's why it happens
15:06alyssabut more generally, parse_mode could return success without actually parsing a mode,
15:06yuyichao_ has joined #asahi-dev
15:06alyssaif that happens for the first mode *count will be 0
15:06alyssaso then *count - 1 will be -1 and everything is wrong
15:06alyssawe shouldn't be doing the score compare logic at all for modes that don't exist (eg because virtual)
15:06alyssanot sure the sol'n in that patch is reasonable but it fixes it
15:06alyssaif you have a prettier fix, by all means
15:09jannaulooks reasonable to me and is an improvement even ignoring the bug fix
15:13alyssaif you think so
15:13alyssaI wasn't sure if handling virtual modes as errors and then ignoring errors is an improvement :-p
15:15alyssaummm why does it hate my initramfs
15:16alyssafirmware load fail.. they are defn there..
15:17alyssaoh, packed wrong derp
15:19alyssaK, wi-fi works again
15:19alyssajannau: thank you :
15:24_jannau_3I think it's fine as long as we don't understand what the virtual modes are and if/how we can use them
15:24_jannau_you're welcome
15:25alyssanext up figure out why audio no work
15:25_jannau_do you have todo's for the DCP driver? sven promised some remarks on how the locked dart should be handled
15:26alyssaMake it less bad
15:26* alyssawaves hand
15:26alyssaOriginally I was going to send it off for review months ago, but then life happened
15:27svenah, yes. locked DARTs. i keep forgetting
15:27alyssacs42l42: probe of 2-0048 failed with error -61
15:27alyssafailed to read device ID ..
15:27svenit'll also need to stop doing these dma-buf pretend exports and switch to the IOMMU api IIRC
15:27alyssatps6598x also probe failing incidentally
15:27alyssasven: yep that too
15:32_jannau_I think poovik had patch for audio i2c
15:34Glanzmannalyssa: curl -s https://tg.st/u/5nly | git am -
15:34Glanzmann^ that is the patch you're missing.
15:35povikthis is not a patch for i2c per-se
15:35povikbut it makes codecs more responsive over i2c
15:35Glanzmannalyssa: Also make sure that you have all the kernel options on for sound: https://github.com/AsahiLinux/docs/wiki/DesktopKernel
15:38alyssastill seeing cs42l42 fail probing, also mca says "no rx DMA channel at /soc/mca/route{2} (lookip returned -19)"
15:39povikthat mca message is mca being happy, just doesn't know how to express it
15:39alyssapovik: so why don't I have any alsa devices hm
15:39povikbecause cs42l42 failed to probe obviously :-p
15:39alyssaand that's failing because errrrrr
15:40povikyou tell me
15:40alyssa"No cache used with register defaults set" maybe
15:40povikno that's ok
15:40alyssaand then Get Device ID failed
15:40Glanzmannalyssa: Are you on the latest and gratest 12.0.1 stub?
15:40alyssaGlanzmann: No, this is still 11.x .. which I thought worked but maybe not, was trying to do one breaking thing at a time
15:42Glanzmannalyssa: I'm not sure if that is a problem, but that is what I would try. On my mini with the config on the desktopkernel wiki page, sound works.
15:43poviki don't think that probe issue can be related to config
15:43povikjust alyssa being unlucky with that codec i2c breakage that still haunts us
15:46alyssai do have the touch
15:47alyssameh whatever, DCP+wifi works that's good enough
15:47alyssaout of spoons
16:58willemml has joined #asahi-dev
17:06willemml has quit [Remote host closed the connection]
17:07willemml has joined #asahi-dev
17:10willemml has quit []
17:11willemml has joined #asahi-dev
17:15Gaspare has joined #asahi-dev
17:56espo has joined #asahi-dev
18:23espo has quit [Ping timeout: 480 seconds]
18:36the_lanetly_052__ has joined #asahi-dev
18:36Gaspare has quit [Read error: Connection reset by peer]
18:42the_lanetly_052 has quit [Ping timeout: 480 seconds]
18:54MajorBiscuit has quit [Ping timeout: 480 seconds]
19:21MajorBiscuit has joined #asahi-dev
19:29espo has joined #asahi-dev
19:35okt has left #asahi-dev [#asahi-dev]
19:40MajorBiscuit has quit [Ping timeout: 480 seconds]
19:44jannauwow, adding a cursor plane in the dcp driver just works
19:45Glanzmannjannau: What is a cursor plane? Do you have a screenshot?
19:53jannaudcp has 3 or 4 planes which are composited and blended together in hardware. one is the primary plane which holds the framebuffer of what you consider the screen content
19:54jannauwithout cursor plane that frame buffer has constantly updated when the mouse cursor moves
19:57jannauthe cursor plane holds just the mouse. those to planes are then blended in hw. that means neither of the buffers have to be updated on mouse moves. only the position of the mouse cursor overlay is updated
19:58jannaudoesn't work 100% though, the mouse cursor can not be moved completelt to the right or bottom edge
20:00sveni vaguely remember alyssa talking about that issue (and maybe even suggesting a workaround)
20:01svensomething about create a bigger cursed by passing that plane maybe? It’s been a while
20:01sven*cursor
20:01svenand s/passing/padding/ :(
20:02jannauI remember that as well, the cursor fb can't move off screen iirc
20:03willemml has quit [Quit: willemml]
20:04willemml has joined #asahi-dev
20:15___nick___ has joined #asahi-dev
20:16___nick___ has quit []
20:17willemml has quit [Quit: willemml]
20:17___nick___ has joined #asahi-dev
20:25willemml has joined #asahi-dev
20:48willemml has quit [Quit: willemml]
20:55j`eyjannau: sounds interesting, does drm have some native concept for a cursor plane, or how do you hook it up?
20:58j`eyjannau: neat
20:59espo has quit [Quit: Leaving]
21:07willemml has joined #asahi-dev
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:13DragoonAethis has quit [Quit: hej-hej!]
21:13DragoonAethis has joined #asahi-dev
21:19willemml has quit [Quit: willemml]
21:55agrafjannau: Nice, does that work automatically with xv as well? :) I remember that was the mechanism of the day ~20 years ago to overlay video inside a window quickly. Feels so out of touch now that everything is texture rendered
21:56agrafjannau: Also, what happens when you move towards the edge? It just won't keep moving, so the cursor stays fully displayed while it should be half hidden?
22:02jannauagraf: xv == xvideo extension? hopefully not with the cursor plane. but we can support overlay planes and wayland compositors should support that. I forgot most details about X11 already
22:03agrafjannau: if it only has 4 total, that leaves 2 generic overlay panes to use, no? :)
22:03agrafAnd yes, xvideo. Obviously not with the cursor pane but with a generic one. But I assumed you implement generic pane support in the DRM driver?
22:05jannauthe cursor remains fully on the screen and is not clipped. it is just not rendered when the cursor fb needs to be clipped
22:05yamii has quit [Quit: WeeChat 3.3]
22:06agrafOh, so the whole screen stops rendering?
22:07jannauwe are not sure if there 3 or 4 planes. the horrid dcp co-processor API had only 3 planes in 11.x but has 4 in 12.x
22:07svenWasn’t there some limitation where the DCP could only blend two planes and macOS just ended up fusing the cursor into the bg plane?
22:07svenor maybe it was three :D
22:08jannauso it's possible that only the dcp in the m1 pro/max have 4 planes
22:08jannauI think nobody has looked into it yet
22:08svenyeah, or maybe the hardware supports 4 but the DCP firmware didn’t and they fixed that
22:09jannauI haven't check what happens on macos with vidoe playback
22:10svenI vaguely remember that there was some way to force it to blend the cursor in software
22:14jannauthere was some cursed behavior wrt the cursor and blending, maybe macos switches to sw blending when the cursor is clipped
22:14svenhm.. could be
22:15jannauagraf: I assume just the cursor is not rendered. desktop was static so I can't tell if it's updated
22:15j`eywas it marcan that streamed some cursor/dcp stuff? I remember something with a pink cursor
22:16agrafjannau: I see :). Well, definitely something you can work around by blending manually I guess. Or fiddling with the overlay plane's size & contents.
22:20jannauyes, it's only the cursor that vanishes. video playback on the primary plane is not affected
22:21jannaujust lying about the width and height of the cursor buffer doesn't seem to work
22:43timokrgr has quit [Quit: User left the chat]
22:44chadmed has joined #asahi-dev
22:48timokrgr has joined #asahi-dev
22:57chadmed has quit [Ping timeout: 480 seconds]
22:58alyssajannau: I wrote support for cursor planes in the DCP driver, then deleted the part where I actually add a cursor plane because it's broken as you discovered shortly there after.
22:59alyssasven: I believe the M1 has 2 planes only, although the 11.x ABI has 3 and 12.x ABI has 4. I imagine M1 Pro/Max has 3 or 4 planes.
22:59krbtgtxv? sure, i wanna view some PNGs on my Sun3
23:00alyssajannau: The problem is not clipping /per se/, broken clipping is a symptom of the real hardware limitation -- DCP planes must be at least 64x64
23:00alyssa(or maybe it was 32x32, forget the details)
23:01alyssaat the same time, DCP doesn't allow partially off screen planes so we're forced to shrink the width/height when clipping
23:01alyssaThe interaction of those constraints means that sufficient clipping causes planes to shrink below the minimum size.
23:02alyssa...which causes wonky scaling or faulting (depending on conditions).
23:02chadmed has joined #asahi-dev
23:03alyssaThere are a few ways to workaround but they're all ugly so I was planning to delay overlay/cursor plane support until after the core mode set code is merged.
23:06MajorBiscuit has joined #asahi-dev
23:12willemml has joined #asahi-dev
23:12klaus has quit [Quit: Lost terminal]
23:15jannaucan 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?
23:15jannauthat would be the least ugly solution I can think of
23:18alyssawhen I thought through it, I ran into other difficulties unless I eat the cost of blitting in edge cases
23:18aleasto has quit [Quit: Konversation terminated!]
23:18alyssaalthough... overallocating /at the start/ and playing games with the stride and playing games with the coordinate system... for linear planes (which includes cursors)... might actually work?
23:19alyssaThat saves the blit, needs some more gymnastics for memory management but... yes, in principle I think that approach is ok, nice one :)
23:20jannauprobably still worth postponing it to after the initial merge
23:21alyssayeah, I think so
23:22alyssaI woul really love to see this driver cleaned up and merged ... I can't say I would love it enough to finish that work myself though 😅
23:23willemml has quit [Quit: willemml]
23:25willemml has joined #asahi-dev
23:28MajorBiscuit has quit [Ping timeout: 480 seconds]
…