From: Oak Zeng Date: Mon, 26 Nov 2018 16:41:23 +0000 (-0600) Subject: drm/amdgpu: Add asic func interface to init doorbell index X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5253163a11fba4ad0a0fafc2f7486ca02e56f295;p=openwrt%2Fstaging%2Fblogic.git drm/amdgpu: Add asic func interface to init doorbell index This is preparation to move doorbell index initialization to amdgpu_asic_funcs Signed-off-by: Oak Zeng Proposed-by: Alex Deucher Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 66a4da783899..78406cd45047 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -654,6 +654,8 @@ struct amdgpu_asic_funcs { struct amdgpu_ring *ring); /* check if the asic needs a full reset of if soft reset will work */ bool (*need_full_reset)(struct amdgpu_device *adev); + /* initialize doorbell layout for specific asic*/ + void (*init_doorbell_index)(struct amdgpu_device *adev); }; /* @@ -1209,6 +1211,7 @@ int emu_soc_asic_init(struct amdgpu_device *adev); #define amdgpu_asic_flush_hdp(adev, r) (adev)->asic_funcs->flush_hdp((adev), (r)) #define amdgpu_asic_invalidate_hdp(adev, r) (adev)->asic_funcs->invalidate_hdp((adev), (r)) #define amdgpu_asic_need_full_reset(adev) (adev)->asic_funcs->need_full_reset((adev)) +#define amdgpu_asic_init_doorbell_index(adev) (adev)->asic_funcs->init_doorbell_index((adev)) /* Common functions */ bool amdgpu_device_should_recover_gpu(struct amdgpu_device *adev);