diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 905cce1814f3..05897b05766b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |||
| @@ -38,18 +38,10 @@ static void psp_set_funcs(struct amdgpu_device *adev); | |||
| 38 | static int psp_early_init(void *handle) | 38 | static int psp_early_init(void *handle) |
| 39 | { | 39 | { |
| 40 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 40 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
| 41 | struct psp_context *psp = &adev->psp; | ||
| 41 | 42 | ||
| 42 | psp_set_funcs(adev); | 43 | psp_set_funcs(adev); |
| 43 | 44 | ||
| 44 | return 0; | ||
| 45 | } | ||
| 46 | |||
| 47 | static int psp_sw_init(void *handle) | ||
| 48 | { | ||
| 49 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | ||
| 50 | struct psp_context *psp = &adev->psp; | ||
| 51 | int ret; | ||
| 52 | |||
| 53 | switch (adev->asic_type) { | 45 | switch (adev->asic_type) { |
| 54 | case CHIP_VEGA10: | 46 | case CHIP_VEGA10: |
| 55 | case CHIP_VEGA12: | 47 | case CHIP_VEGA12: |
| @@ -67,6 +59,15 @@ static int psp_sw_init(void *handle) | |||
| 67 | 59 | ||
| 68 | psp->adev = adev; | 60 | psp->adev = adev; |
| 69 | 61 | ||
| 62 | return 0; | ||
| 63 | } | ||
| 64 | |||
| 65 | static int psp_sw_init(void *handle) | ||
| 66 | { | ||
| 67 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | ||
| 68 | struct psp_context *psp = &adev->psp; | ||
| 69 | int ret; | ||
| 70 | |||
| 70 | ret = psp_init_microcode(psp); | 71 | ret = psp_init_microcode(psp); |
| 71 | if (ret) { | 72 | if (ret) { |
| 72 | DRM_ERROR("Failed to load psp firmware!\n"); | 73 | DRM_ERROR("Failed to load psp firmware!\n"); |
