drm/scheduler: fix last_scheduled handling
authorChristian König <christian.koenig@amd.com>
Tue, 7 Aug 2018 12:52:13 +0000 (14:52 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Aug 2018 16:10:06 +0000 (11:10 -0500)
commit573edb241b44162a1478cc74429f94df86e6e71d
tree34085a1e35cdea88890aaf8afd70e5cc4c08f8c9
parent93f15e1c0796f102a62fdc4931e4c5f847c98a12
drm/scheduler: fix last_scheduled handling

Make sure we access last_scheduled only after checking that there are no
more jobs on the entity.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/scheduler/gpu_scheduler.c