[PATCH v5 10/14] drm/panthor: Add the scheduler logical block

Boris Brezillon boris.brezillon at collabora.com
Wed Feb 28 18:11:40 UTC 2024


On Sun, 18 Feb 2024 22:41:24 +0100
Boris Brezillon <boris.brezillon at collabora.com> wrote:

> +static void panthor_sched_immediate_tick(struct panthor_device *ptdev)
> +{
> +	struct panthor_scheduler *sched = ptdev->scheduler;
> +
> +	sched_queue_delayed_work(sched, tick, 0);
> +}
> +
> +/**
> + * panthor_sched_report_mmu_fault() - Report MMU faults to the scheduler.
> + */
> +void panthor_sched_report_mmu_fault(struct panthor_device *ptdev)
> +{
> +	/* Force a tick to immediately kill faulty groups. */
> +	panthor_sched_immediate_tick(ptdev);

We need

	if (ptdev->scheduler)
		panthor_sched_immediate_tick(ptdev);

to prevent a NULL deref in panthor_sched_immediate_tick() if the MMU
fault handler is called before the scheduler block is initialized (FW
boot might trigger MMU faults on AS0).

> +}


More information about the dri-devel mailing list