#asahi-gpu · 2022-10-12 19:07
alyssathat is a legitimate assertion, it can only ever fail due to a bug in the dcp kernel driver#asahi-gpu · 2022-10-12 19:06
alyssa{ WARN_ON((*depth) == 0);#asahi-gpu · 2022-10-12 19:06
alyssastatic u8 dcp_pop_depth(u8 *depth)#asahi-gpu · 2022-10-12 19:06
alyssaI see a bunch of legitimate asserions and a bunch of bogus ones that should indeed be dev_err, bah#asahi-gpu · 2022-10-12 19:06
svenbut some of them looked like they want to be dev_err instead#asahi-gpu · 2022-10-12 19:06
alyssano i'm looking now#asahi-gpu · 2022-10-12 19:06
svenmaybe i'm wrong, i just skipped over the code fwiw#asahi-gpu · 2022-10-12 19:06
alyssaOkay, well, that's wrong, complain to Alyssa about that.#asahi-gpu · 2022-10-12 19:05
alyssaThose should all be errors that become dev_err and should never be asserted it#asahi-gpu · 2022-10-12 19:05
sveniirc there are at least a few warns inside DCP that are more like "dcp did something strange"#asahi-gpu · 2022-10-12 19:05
alyssaNOT a bug in the firmware or the device or the userspace#asahi-gpu · 2022-10-12 19:05
alyssaAn assertion failure means a bug in my code.#asahi-gpu · 2022-10-12 19:05
svenso if DCP does something slightly unexpected you just panicked the entire kernel#asahi-gpu · 2022-10-12 19:05
alyssaThat is the right behaviour yes#asahi-gpu · 2022-10-12 19:04
sventhere are also people who run kernels with panic on warn #asahi-gpu · 2022-10-12 19:04
alyssaI thought kernel C assert() is just WARN_ON(!)#asahi-gpu · 2022-10-12 19:04
svendev_err or something #asahi-gpu · 2022-10-12 19:04
alyssaasserts are the best tool we have to write correct code#asahi-gpu · 2022-10-12 19:04
alyssasven: what is the right way to do asserts then#asahi-gpu · 2022-10-12 19:04
jannauI guess glmark selects an an unusual mode with the capture card and dcp doesn't verify it#asahi-gpu · 2022-10-12 19:03
svenwarn_on spams dmesg and most of the time the stack isn’t all that useful because it will always be the same #asahi-gpu · 2022-10-12 19:03
sven*not more#asahi-gpu · 2022-10-12 19:03
svenDCP needs less WARN_ON and nit#asahi-gpu · 2022-10-12 19:02
jannauI don't think it's the parser's fault. this happens when starting glmark2-es2-drm after it already booted#asahi-gpu · 2022-10-12 19:02
alyssathis thing really wants to be rust doesn't it.#asahi-gpu · 2022-10-12 19:02
alyssareads the code#asahi-gpu · 2022-10-12 19:00
alyssa(I don't remember how the parser worked ..)#asahi-gpu · 2022-10-12 18:59
alyssaor more precisely WARN_ON(IS_ERR(mode))#asahi-gpu · 2022-10-12 18:59
alyssamaybe we need a WARN_ON(mode < 0) in there#asahi-gpu · 2022-10-12 18:59
alyssajannau: ...no, that does not indeed.#asahi-gpu · 2022-10-12 18:25
jannaudrm complains that the driver didn't call drm_crtc_vblank_off#asahi-gpu · 2022-10-12 18:24
jannauset_digital_out_mode(color=-1, timing=43) doesn't look healthy (from dcp error from the stream at 10:04:29)#asahi-gpu · 2022-10-12 17:28
linaFor the coprocessor I'm just never unmapping/freeing anything for now, to eliminate variables (besides, I plan to do that in my allocator later on anyway, there's no good reason to thrash those mappings)#asahi-gpu · 2022-10-12 17:27
linaBut there's something else wonky going on with the GPU. If I force it to stay on on purpose, sometimes it crashes on the second frame, sometimes a bit later.#asahi-gpu · 2022-10-12 17:27
linaI might still have a TLB issue with the coprocessor, which was being hidden by the GPU shutdown thing beacuse I think the coprocessor shuts down shortly after the GPU (so it mostly worked in practice)#asahi-gpu · 2022-10-12 17:26
linaI actually don't think I have a TLB issue at this point, at least not with the GPU. As far as I can tell from the m1n1 experiment, TLBI actually works fine#asahi-gpu · 2022-10-12 17:25
eric_engestromI don't really know anything about all this so I'm really just guessing#asahi-gpu · 2022-10-12 17:25
eric_engestromno, but perhaps the same kind of thing applies?#asahi-gpu · 2022-10-12 17:25
linaI doubt Apple's cores have Cortex errata... ^^;#asahi-gpu · 2022-10-12 17:25
eric_engestrom(sorry if this is irrelevant, and/or if you've already seen it :)#asahi-gpu · 2022-10-12 17:24
eric_engestrom(in kernel config)#asahi-gpu · 2022-10-12 17:24
eric_engestromlina: I just randomly saw ARM64_ERRATUM_2441009 "Cortex-A510: Completion of affected memory accesses might not be guaranteed by completion of a TLBI"; might be relevant to your TLB issue?#asahi-gpu · 2022-10-12 17:05
linaNow it crashes even more! (Which is probably a good thing for debugging)#asahi-gpu · 2022-10-12 17:04
linaNope!#asahi-gpu · 2022-10-12 17:04
boulabiar[m]So did you get over the gpu restart each frame issue today?#asahi-gpu · 2022-10-12 17:03
alyssawhat a delight#asahi-gpu · 2022-10-12 17:02
linaI think it was drawing 512x512 squares for the cursor or something like that ^^#asahi-gpu · 2022-10-12 16:54
alyssadelightful#asahi-gpu · 2022-10-12 16:54
jannauthe cursor triggered the most glaring glamor rendering bugs