drm/amdgpu: refactor MQD/HQD initialization v3
authorAndres Rodriguez <andresx7@gmail.com>
Wed, 12 Apr 2017 21:19:54 +0000 (17:19 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 31 May 2017 20:48:46 +0000 (16:48 -0400)
commit34130fb1493c91d50b04daaeb25e82eecc4483c6
tree4e812b3923272a80312ab061c4eab446048abde2
parent268cb4c7dff0aac96b1c5d596b321aa197d31360
drm/amdgpu: refactor MQD/HQD initialization v3

The MQD programming sequence currently exists in 3 different places.
Refactor it to absorb all the duplicates.

The success path remains mostly identical except for a slightly
different order in the non-kiq case. This shouldn't matter if the HQD
is disabled.

The error handling paths have been updated to deal with the new code
structure.

v2: the non-kiq path for gfxv8 was dropped in the rebase
v3: split MEC_HPD_SIZE rename, dropped doorbell changes

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c