drm/amdgpu/gfx10: set SH_MEM_CONFIG.INITIAL_INST_PREFETCH
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 16 Jul 2019 18:11:22 +0000 (13:11 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 16 Jul 2019 19:49:57 +0000 (14:49 -0500)
commit08473888e09b0136ceb4d65784b02b537d977a2a
tree29f01c6dc00d3d8e5b8266d489b5cd56765aa88c
parent597292eb73eefe4e48f9f72640955813d59b733a
drm/amdgpu/gfx10: set SH_MEM_CONFIG.INITIAL_INST_PREFETCH

Prefetch mode 0 is not supported and can lead to hangs with certain very
specific code patterns. Set a sound prefetch mode for all VMIDs rather
than forcing all shaders to set the prefetch mode at the beginning.

Reduce code duplication a bit while we're at it. Note that the 64-bit
address mode enum and the retry all enum are both 0, so the only
functional change is in the INITIAL_INST_PREFETCH field.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c