]> git.baikalelectronics.ru Git - kernel.git/commit
drm/lima: add timeout to drm scheduler init
authorErico Nunes <nunes.erico@gmail.com>
Mon, 20 May 2019 22:42:29 +0000 (00:42 +0200)
committerQiang Yu <yuq825@gmail.com>
Tue, 21 May 2019 12:47:36 +0000 (20:47 +0800)
commit77f021d56101ca0d5e9171f594a0c8450c07cba7
treea38bf78aac55ec7e8438e5b3e0696680910d01c0
parentb1b6bfa9783c8f29b0b4f3ca867a4b6aeafc490b
drm/lima: add timeout to drm scheduler init

After "91f13e4f38c6 drm/scheduler: rework job destruction", lima started
to leak memory due to buffers not being destroyed after job execution in
the drm scheduler.

This started happening because the drm scheduler only destroyed buffers
after cancelling the job timeout handler, and for lima this handler was
never started as lima specified a MAX_SCHEDULE_TIMEOUT timeout.

Lima seems to run well in its current state with a real timeout, so to
make it more aligned with the other drivers from now on, let's use a
real default timeout.

This also fixes the observed memory leaks.

The 500ms value was chosen as it is the current value for all other
embedded gpu drivers using drm sched.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190520224229.21111-1-nunes.erico@gmail.com
drivers/gpu/drm/lima/lima_drv.c
drivers/gpu/drm/lima/lima_sched.c