ChanServ changed the topic of #etnaviv to: #etnaviv - the home of the reverse-engineered Vivante GPU driver - Logs https://oftc.irclog.whitequark.org/etnaviv
samuelig_ has quit []
pcercuei has joined #etnaviv
<tomeu> lynxeye: austriancoder I'm looking again at this problem with compositors trying to render with a NPU-only Vivante GPU, and I'm quite unsure of how etnaviv's architecture could ever handle this scenario
<tomeu> from what I have seen, a render node will always be created if there is a vivante,gc in the DT, regardless of whether anything can be rendered with it
<tomeu> and compositors and Mesa will happily try to use that render node to create EGL contexts and then fail spectacularly, of course
<tomeu> from what I have seen, the hw-independent parts of the stack assume that if there is a render node, then rendering can be done with it
<tomeu> but the etnaviv kernel driver would create a render node on purpose before even knowing if there is rendering hw from vivante on the machine
<tomeu> afaics, the exact same problem would happen if there was a SoC with a 2D engine but no 3D engine, do those cases exist and if so, how do people cope with them?
<tomeu> do you have any ideas on how this should work?
<austriancoder> what would happen if DRIVER_COMPUTE_ACCEL would be used for NPU-only GPUs instead of DRIVER_RENDER?
<austriancoder> tomeu: as hwdb landed now I think it would make sense to revert some kernel changes that happend in 6.9 rc cycle like https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/drm/etnaviv?h=v6.9-rc4&id=1dccdba084897443d116508a8ed71e0ac8a031a4 - what is your opinion?
f_ has joined #etnaviv
<tomeu> <austriancoder> "tomeu: as hwdb landed now I..." <- yes, no problem with that
<tomeu> <austriancoder> "what would happen if DRIVER_COMP..." <- I think that would be a good thing in itself, but currently the DRM device gets created way before any GPU's register can be read
<tomeu> but I could look at refactoring if we think that is a good idea
pcercuei has quit [Quit: brb]
pcercuei has joined #etnaviv
<tomeu> another possibility would be to add a compatible label for the npu, so we don't need to read from the GPU to figure out what kind of piece of HW it is
<tomeu> which is I guess how this was supposed to work
<tomeu> lynxeye: what do you think of adding a new DT compatible for NPU-only GPUs?
<tomeu> alternatively, we could try instantiating a rendernode, and fail if there is no rendering HW, then retry for an accel node
* tomeu wonders why the compiler chokes at DRIVER_RENDEER
<austriancoder> tomeu: hmm?
<tomeu> was just chuckling at my typo :)
<tomeu> lynxeye: austriancoder: I drafted a quick PoC for the retrying possibility: https://gitlab.freedesktop.org/tomeu/linux/-/commit/ff65a197d37e8f838b488595c371b2095f2e6700
<tomeu> seems to work, with minimal changes to the existing code base
<tomeu> probes of NPUs will be a bit slower, but maybe that is fine
<austriancoder> tomeu: I'll leave the decision up to Lucas. for me both ways are okay (dt binding, and somthing like your PoC).
<tomeu> cool, thanks for taking a look
alarumbe has quit [Read error: Connection reset by peer]
alarumbe has joined #etnaviv
f_ has quit [Ping timeout: 480 seconds]
samuelig has joined #etnaviv
samuelig has quit [Quit: Bye!]
pcercuei has quit [Quit: dodo]