aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2017-04-09 21:29:13 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-04-28 17:32:13 -0400
commit692bb1ac038a0b736c2b6e9bba41ac2da38e16cf (patch)
treef4d90fb41a9ca78295d8dd4feab269c9dace76f7 /drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
parentb4de2c5aab2d5cd84c2a648d825b0e48ca426e27 (diff)
drm/amdgpu: fix to clear ASIC INIT COMPLETE bit on resuming phase
ASIC_INIT_COMPLETE bit must be cleared during S3 resuming phase, because VBIOS will check the bit to decide if execute ASIC_Init posting via kernel driver. Signed-off-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
index 4b9abd68e04f..d735cd1807b3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
@@ -26,6 +26,7 @@
26#include "atomfirmware.h" 26#include "atomfirmware.h"
27#include "amdgpu_atomfirmware.h" 27#include "amdgpu_atomfirmware.h"
28#include "atom.h" 28#include "atom.h"
29#include "atombios.h"
29 30
30#define get_index_into_master_table(master_table, table_name) (offsetof(struct master_table, table_name) / sizeof(uint16_t)) 31#define get_index_into_master_table(master_table, table_name) (offsetof(struct master_table, table_name) / sizeof(uint16_t))
31 32
@@ -77,6 +78,12 @@ void amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device *adev)
77{ 78{
78 int i; 79 int i;
79 80
81 /*
82 * VBIOS will check ASIC_INIT_COMPLETE bit to decide if
83 * execute ASIC_Init posting via driver
84 */
85 adev->bios_scratch[7] &= ~ATOM_S7_ASIC_INIT_COMPLETE_MASK;
86
80 for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) 87 for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++)
81 WREG32(adev->bios_scratch_reg_offset + i, adev->bios_scratch[i]); 88 WREG32(adev->bios_scratch_reg_offset + i, adev->bios_scratch[i]);
82} 89}