#
…

2022-01-23

00:07thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
00:10aleasto has quit [Remote host closed the connection]
00:16KDDLB has quit [Server closed connection]
00:16KDDLB has joined #asahi-dev
00:19user982492 has joined #asahi-dev
00:27tbodt_ has quit [Server closed connection]
00:27tbodt has joined #asahi-dev
00:31thevar1able has joined #asahi-dev
00:44thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
00:49thevar1able has joined #asahi-dev
01:07thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
01:17user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:27thevar1able has joined #asahi-dev
02:00yamii has quit [Quit: WeeChat 3.3]
02:02aead has quit [Server closed connection]
02:03aead has joined #asahi-dev
02:12user982492 has joined #asahi-dev
02:20thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
02:28jbowen has quit [Quit: leaving]
02:30Method has quit [Server closed connection]
02:31Method has joined #asahi-dev
02:34skipwich has quit [Server closed connection]
02:34skipwich has joined #asahi-dev
02:37emptynine has quit [Server closed connection]
02:37emptynine has joined #asahi-dev
02:42nafod has quit [Server closed connection]
02:42nafod has joined #asahi-dev
02:43user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:47thevar1able has joined #asahi-dev
02:57user982492 has joined #asahi-dev
03:04krbtgt has quit [Server closed connection]
03:04krbtgt has joined #asahi-dev
03:05tmlind has quit [Server closed connection]
03:05tmlind has joined #asahi-dev
03:20opticron has quit [Server closed connection]
03:20opticron has joined #asahi-dev
03:23PhilippvK has joined #asahi-dev
03:26phiologe has quit [Ping timeout: 480 seconds]
03:59kov has quit [Quit: Coyote finally caught me]
03:59kov has joined #asahi-dev
04:01rbenua has quit [Server closed connection]
04:01rbenua has joined #asahi-dev
04:09gruetzkopf has quit [Server closed connection]
04:09gruetzkopf has joined #asahi-dev
04:24balrog has quit [Server closed connection]
04:26balrog has joined #asahi-dev
05:01user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:11thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
06:00TheFirst has quit [Server closed connection]
06:00TheFirst has joined #asahi-dev
06:07jeffmiw has quit [Remote host closed the connection]
06:08jeffmiw has joined #asahi-dev
06:17linuxgemini has quit [Server closed connection]
06:17linuxgemini has joined #asahi-dev
06:23akemin_dayo has quit [Ping timeout: 480 seconds]
07:24Chinese_soup has joined #asahi-dev
09:29jannauthe dcp crashlog buffer is in one of the carveout-memory-map regions. I don't see a mapping of carveout regions to devices in the ADT
09:29thevar1able has joined #asahi-dev
09:55esden has joined #asahi-dev
09:56thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
10:28aleasto has joined #asahi-dev
10:30marcanthe carveout-memory-map regions include all of RAM :-)
10:31marcanso we need something else
10:31marcanI guess at the very least we could just say "outside the main RAM area" or something...
10:42jannauugh, I just looked at the carveouts at the top of the memory. the crashlog buffer is in a 3 megabyte carveout so that would be fine if the ADT would tell to which device nodes a carveout belongs
10:44austriancoder has joined #asahi-dev
10:44svenno bug_on please. Just returns a error code
10:45svenI’d also get rid of flags competely and just have some is_iomem variable as part of the shmem struct
10:46gabuscus has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
10:46gabuscus has joined #asahi-dev
11:06pFalken has joined #asahi-dev
11:38Ariadne has quit [Server closed connection]
11:39Ariadne has joined #asahi-dev
11:47jannausven: ah, firmware might change behavior, BUG_ON not really appropiate then. I only considered the new RTKit using driver case
11:49svenlooks good, is_iomem should be set from the driver though. DCP never needs it but SMC always needs
11:49svenIt’s different from who owns the buffers
11:49svenIt’s just to check if we need to use memcpy_fromio instead of memcpy
11:50svenrtkit.c itself doesn’t need to care who owns the buffer I think
11:57akemin_dayo has joined #asahi-dev
11:57jannauit cares in apple_rtkit_memcpy()
11:59svenit doesn’t care who owns the buffers
11:59svenit cares if the buffer is iomem (MMIO) or normal RAM
11:59jannauah right
11:59svenDCP has the crashlog buffer as owned by rtkit but the rest owned by Linux but both are normal RAM
12:00jannauI currently use ioremap_wc for the dcp crashlog, mostly since I'm drowned in noise when looking how to map carveout memory
12:00svenah, right. take a look at alyssa’s locked dart hacks
12:00svenshe also has to
12:01svenshe also has to map carve out memory somewhre
12:10jannaumemremap, that was too simple. I need anther flag to track the ownership then
12:13jannauthe drivers care on destroy and rtkit only replies for AP owned buffers
12:16svenhm, true
12:21jannauand we don't need an is_iomem flag, we can infer that from bfr->iomem != NULL
12:28philpax_ has quit [Server closed connection]
12:28philpax_ has joined #asahi-dev
12:34alyssajannau: fwiw I don't know if memremap is 'correct'
12:34alyssabut it works
12:34alyssa(correct in the sense of passing code review, not in the sense of working)
12:36ketteniswhat matters is what memeory attributes the other side uses
12:36jabashque_ has quit [Server closed connection]
12:36jabashque_ has joined #asahi-dev
12:37kettenisin particular whether it is mapped cachable or non-cachable
12:39kettenisdo we know what memory attributes macOS uses for these buffers?
12:42tardyp has quit [Server closed connection]
12:42tardyp has joined #asahi-dev
12:45svenjannau: true
12:45svenkettenis: for the DCP ones the same as RAM
12:46svenand for SMC the same as MMIO (nGnRE or whatever non-pcie uses)
12:51jannauare you sure it is not uncached like the framebuffer for dcp?
12:51kettenisyeah, SMC has to use nGnRnE
12:53sven50:50 chance I chose the wrong mode ;)
12:53svenjannau: I’d have to double check but the frame buffer is the only thing that’s special iirc
12:53svenisn’t the frame buffer also mapped through the disp0 dart instead?
12:58kettenisthe SoC tends to be completely cache-coherent, so Normal WB is plausible
13:00kettenisif you get it wrong, you might not immediately see what the other side writes into the buffer
13:02jannauI don't think we will ever see it in this case as we should read the crashlog buffer only once (at most) and never write
13:02psykose has quit [Remote host closed the connection]
13:04svenI’d be surprised if that’s one isn’t just normal RAM
13:07psykose has joined #asahi-dev
13:15marcanthe framebuffer has to be mapped non-cacheable because while the SoC is cache-coherent, apparently that coherency does not come with realtime guarantees
13:16marcanso on t6000 the memory controller throws a hissy fit if you end up with framebuffer cache lines in CPU cache (even though it still works)
13:16marcanthat's why m1n1 switched to uncached and a shadow copy
13:16marcanI imagine the GPU will have some way to blast out framebuffers as write-through so that doesn't happen there
13:17marcanbut I think Normal WB is likely to be fine for any ASC comms via carveouts
13:19jannauit works for the dcp crashlog
13:26thevar1able has joined #asahi-dev
13:33gladiac has quit [Read error: Connection reset by peer]
13:35gladiac has joined #asahi-dev
13:37yamii has joined #asahi-dev
13:45thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
13:46svenhrm, that still has the if (iova) is_iomem = true; logic, doesn’t it?
13:47svenbut it’s just the is_iomem name that’s misleading now
13:47svenhrm, no
13:48svenits still treating “owned by rtkit” and “is iomem” as the same thing
13:49jannausorry, I must have messed up the rebase
13:50thevar1able has joined #asahi-dev
13:55jannauI did, I somehow dropped the patch changing rtkit
13:58svennow it looks great :)
13:59thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
14:03jannaufeel free to squash them in the nvme branch
14:08nathanchance has quit [Server closed connection]
14:08nathanchance has joined #asahi-dev
14:22thevar1able has joined #asahi-dev
14:25MajorBiscuit has joined #asahi-dev
14:26MajorBiscuit has quit []
14:34thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
14:37StupidYui has joined #asahi-dev
14:45svensure, thanks!
14:53thevar1able has joined #asahi-dev
15:03skoobasteeve_ has quit [Server closed connection]
15:03skoobasteeve has joined #asahi-dev
15:23JTL has quit [Server closed connection]
15:23JTL has joined #asahi-dev
16:00jkkm has quit [Server closed connection]
16:00jkkm has joined #asahi-dev
16:16akemin_dayo has quit [Ping timeout: 480 seconds]
16:21___nick___ has joined #asahi-dev
16:21___nick___ has quit []
16:22___nick___ has joined #asahi-dev
16:23ids1024 has quit [Server closed connection]
16:23ids1024 has joined #asahi-dev
16:27thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
16:32user982492 has joined #asahi-dev
16:39jabashque_ is now known as jabashque
16:45pbc has joined #asahi-dev
16:47thevar1able has joined #asahi-dev
17:14akemin_dayo has joined #asahi-dev
17:30NekomimiScience has quit [Server closed connection]
17:30NekomimiScience has joined #asahi-dev
17:31nkaretnikov has quit [Server closed connection]
17:31nkaretnikov has joined #asahi-dev
17:37thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
17:40cptcobalt has quit [Server closed connection]
17:40cptcobalt has joined #asahi-dev
17:53weems_ has quit [Server closed connection]
17:53weems_ has joined #asahi-dev
18:17alyssamarcan: generally you want framebuffer mapped write-combine, I assume that works here no?
18:17alyssaGPU allocated memory can be either write-combine or not, it's a flag the AGX kernel driver (or IOGPU kext) takes
18:23ketteniswrite-combine is an x86 term that isn't very well defined
18:24kettenisbut in our case Normal NC is almost certainly the appropriate memory attribute
18:25kettenissince the framebuffer is in RAM
18:25kettenisalyssa: what does "or not" mean? write-back cachable?
18:31blueriseWhen I looked into the LX2K amdgpu(4) issue I think Linux is using normal uncached for write-combine on arm64.
18:32snek has quit [Server closed connection]
18:32snek has joined #asahi-dev
18:33user982492 has quit [Remote host closed the connection]
18:33user982492 has joined #asahi-dev
18:38DarkShadow4444 has quit [Quit: ZNC - https://znc.in]
18:38DarkShadow44 has joined #asahi-dev
18:52amarioguy has joined #asahi-dev
18:56user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:04amarioguy has quit [Ping timeout: 480 seconds]
19:10alyssakettenis: I guess so? I don't know the nomenclature well
19:11sjg1 has quit [Server closed connection]
19:11sjg1 has joined #asahi-dev
19:29amarioguy has joined #asahi-dev
19:32arnd_ has quit [Server closed connection]
19:32arnd_ has joined #asahi-dev
19:55aleasto has quit [Remote host closed the connection]
20:40robher has quit [Server closed connection]
20:40robher has joined #asahi-dev
20:47aleasto has joined #asahi-dev
20:56aleasto has quit [Remote host closed the connection]
20:58aleasto has joined #asahi-dev
21:07___nick___ has quit [Ping timeout: 480 seconds]
21:31amarioguy has quit [Remote host closed the connection]
21:49roxfan2 has quit [Ping timeout: 480 seconds]
22:04tpw_rules has joined #asahi-dev
22:31boardwalk has quit [Server closed connection]
22:31boardwalk has joined #asahi-dev
23:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
23:01yrlf has joined #asahi-dev
23:04aleasto has quit [Quit: Konversation terminated!]
23:14unrelentingtechand all I did for amdgpu was make `ioremap_nocache`, `ioremap_wt` and `ioremap` all map as device-nGnRnE.. (which, yeah, probably wt shouldn't be, but whatever)
…