drm/amdgpu: defer test IBs on the rings at boot (V3)
authorShirish S <shirish.s@amd.com>
Mon, 16 Apr 2018 06:47:57 +0000 (12:17 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 May 2018 18:43:21 +0000 (13:43 -0500)
commit2c773de2ecb8c327f2448bd1eecad224e9227087
tree3ce57e7cf61d6c61e6716358d7b9fcf7f9bafd0a
parent5c3517d0c2ead443f378173c698f3bd09cb89d72
drm/amdgpu: defer test IBs on the rings at boot (V3)

amdgpu_ib_ring_tests() runs test IB's on rings at boot
contributes to ~500 ms of amdgpu driver's boot time.

This patch defers it and ensures that its executed
in amdgpu_info_ioctl() if it wasn't scheduled.

V2: Use queue_delayed_work() & flush_delayed_work().
V3: removed usage of separate wq, ensure ib tests is
    run before enabling clockgating.

Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c