On Thu, 13 Nov 2025 11:56:03 +0100 Philipp Stanner <[email protected]> wrote:
> On Wed, 2025-11-12 at 15:12 +0100, Boris Brezillon wrote: > > On Wed, 12 Nov 2025 14:48:51 +0100 > > Philipp Stanner <[email protected]> wrote: > > > > > > > […] > > > > > > > > > > > > > > > You could write a proper drm_sched API function which serves your > > > > > usecase. > > > > > > > > It's not really lack of support for our usecase that drives this > > > > change, but more the fact the current helpers are racy for drivers that > > > > have a 1:1 entity:sched relationship with queues that can be scheduled > > > > out behind drm_gpu_scheduler's back. > > > > > > And you also can't stop drm_sched to prevent races? > > > > That's the thing, I don't want to stop the drm_gpu_scheduler attached > > to a panthor_queue, I want new jobs to be queued to the ring buffer > > until this ring buffer is full (which is controller with the > > ::credit_limit property), even if the group this queue belongs to is > > not currently active on the FW side. Those jobs will get executed at > > some later point when the group gets picked by the panthor scheduler. > > Ah, OK! Understood. > > > > > > > As you know I only learned a few weeks ago about your group scheduler > > > on top of drm_sched. I wish I had heard about it when it was > > > implemented; we might have come up with the idea for drm_jobqueue > > > sooner. > > > > Might have simplified things, I guess, but that's life, and I'm happy > > to transition to drm_jobqueue when it's deemed ready. > > JQ is in Rust, potentially one day with a C ABI. So that could only > happen if your driver's users are OK with relying on LLVM for building > the kernel. > > BTW would be interesting for me to know to what degree that's a problem > for common distributions and users. That's a good question. I must admit I never thought of this because I usually build my kernels on a full-blown distro with both llvm and gcc installed, so I can easily pick the one I need for the task. For distro builds that should be okay, but for {yocto,buildroot,custom}-based build systems the transition might be painful/annoying, but I'd expect people to move to llvm if they have to. I mean, the ultimate goal is for Tyr to replace Panthor so we don't have to maintain two drivers, so if that's going to be a problem, I'd rather know it now :-).
