aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2015-07-28 11:50:31 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-07-29 15:50:36 -0400
commit8faf0e08d5a78ae5f1752b1d69f97ed70afa625f (patch)
tree7332edf65919a1630666c3eb8e2406f932646210 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parent0a90a0cff9f429f886f423967ae053150dce9259 (diff)
drm/amdgpu: clean up init sequence for failures
If we fail during device init, record what state each block is in so that we can tear down clearly. Fixes various problems on device init failure. 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.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index e9fde72cf038..31b00f91cfcd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1866,6 +1866,12 @@ typedef void (*amdgpu_wreg_t)(struct amdgpu_device*, uint32_t, uint32_t);
1866typedef uint32_t (*amdgpu_block_rreg_t)(struct amdgpu_device*, uint32_t, uint32_t); 1866typedef uint32_t (*amdgpu_block_rreg_t)(struct amdgpu_device*, uint32_t, uint32_t);
1867typedef void (*amdgpu_block_wreg_t)(struct amdgpu_device*, uint32_t, uint32_t, uint32_t); 1867typedef void (*amdgpu_block_wreg_t)(struct amdgpu_device*, uint32_t, uint32_t, uint32_t);
1868 1868
1869struct amdgpu_ip_block_status {
1870 bool valid;
1871 bool sw;
1872 bool hw;
1873};
1874
1869struct amdgpu_device { 1875struct amdgpu_device {
1870 struct device *dev; 1876 struct device *dev;
1871 struct drm_device *ddev; 1877 struct drm_device *ddev;
@@ -2008,7 +2014,7 @@ struct amdgpu_device {
2008 2014
2009 const struct amdgpu_ip_block_version *ip_blocks; 2015 const struct amdgpu_ip_block_version *ip_blocks;
2010 int num_ip_blocks; 2016 int num_ip_blocks;
2011 bool *ip_block_enabled; 2017 struct amdgpu_ip_block_status *ip_block_status;
2012 struct mutex mn_lock; 2018 struct mutex mn_lock;
2013 DECLARE_HASHTABLE(mn_hash, 7); 2019 DECLARE_HASHTABLE(mn_hash, 7);
2014 2020