diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2017-05-15 02:20:00 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-05-24 18:10:06 -0400 |
commit | 0c49e0b8a43c8addb0498cd32390f4ef08b5dd27 (patch) | |
tree | 154439f0b20cba71463f67ccaf5913a29ebf30d8 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | e0ec45063609b4a583e7f4d843275888f2480321 (diff) |
drm/amdgpu: check if vram is lost v2
backup first 64 byte of gart table as reset magic, check if magic is same
after gpu hw reset.
v2: use memcmp instead of manual innovation.
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 8274d8e23e98..ec9774c0d1d9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -1427,6 +1427,7 @@ typedef void (*amdgpu_wreg_t)(struct amdgpu_device*, uint32_t, uint32_t); | |||
1427 | typedef uint32_t (*amdgpu_block_rreg_t)(struct amdgpu_device*, uint32_t, uint32_t); | 1427 | typedef uint32_t (*amdgpu_block_rreg_t)(struct amdgpu_device*, uint32_t, uint32_t); |
1428 | typedef void (*amdgpu_block_wreg_t)(struct amdgpu_device*, uint32_t, uint32_t, uint32_t); | 1428 | typedef void (*amdgpu_block_wreg_t)(struct amdgpu_device*, uint32_t, uint32_t, uint32_t); |
1429 | 1429 | ||
1430 | #define AMDGPU_RESET_MAGIC_NUM 64 | ||
1430 | struct amdgpu_device { | 1431 | struct amdgpu_device { |
1431 | struct device *dev; | 1432 | struct device *dev; |
1432 | struct drm_device *ddev; | 1433 | struct drm_device *ddev; |
@@ -1619,6 +1620,7 @@ struct amdgpu_device { | |||
1619 | 1620 | ||
1620 | /* record hw reset is performed */ | 1621 | /* record hw reset is performed */ |
1621 | bool has_hw_reset; | 1622 | bool has_hw_reset; |
1623 | u8 reset_magic[AMDGPU_RESET_MAGIC_NUM]; | ||
1622 | 1624 | ||
1623 | }; | 1625 | }; |
1624 | 1626 | ||