drm/etnaviv: always start/stop scheduler in timeout processing
authorLucas Stach <l.stach@pengutronix.de>
Mon, 24 Aug 2020 10:55:37 +0000 (12:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:28 +0000 (11:29 +0200)
commita416b1e870b15a93c492951cc2ee1e1aa06759cd
tree90de25ab58562b6b166f84ee7fac7373041b4886
parent87789f561e39588bafefd6892c9ffccfb6b80b24
drm/etnaviv: always start/stop scheduler in timeout processing

[ Upstream commit 50248a3ec0f5e5debd18033eb2a29f0b793a7000 ]

The drm scheduler currently expects that the stop/start sequence is always
executed in the timeout handling, as the job at the head of the hardware
execution list is always removed from the ring mirror before the driver
function is called and only inserted back into the list when starting the
scheduler.

This adds some unnecessary overhead if the timeout handler determines
that the GPU is still executing jobs normally and just wished to extend
the timeout, but a better solution requires a major rearchitecture of the
scheduler, which is not applicable as a fix.

Fixes: 135517d3565b ("drm/scheduler: Avoid accessing freed bad job.")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/etnaviv/etnaviv_sched.c