amdgpu_psp.c (1.1) | amdgpu_psp.c (1.2) |
---|---|
1/* 2 * Copyright 2016 Advanced Micro Devices, Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the --- 23 unchanged lines hidden (view full) --- 32#include "psp_v3_1.h" 33#include "psp_v10_0.h" 34 35static void psp_set_funcs(struct amdgpu_device *adev); 36 37static int psp_early_init(void *handle) 38{ 39 struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 1/* 2 * Copyright 2016 Advanced Micro Devices, Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the --- 23 unchanged lines hidden (view full) --- 32#include "psp_v3_1.h" 33#include "psp_v10_0.h" 34 35static void psp_set_funcs(struct amdgpu_device *adev); 36 37static int psp_early_init(void *handle) 38{ 39 struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
40 struct psp_context *psp = &adev->psp; |
|
40 41 psp_set_funcs(adev); 42 | 41 42 psp_set_funcs(adev); 43 |
43 return 0; 44} 45 46static int psp_sw_init(void *handle) 47{ 48 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 49 struct psp_context *psp = &adev->psp; 50 int ret; 51 | |
52 switch (adev->asic_type) { 53 case CHIP_VEGA10: 54 case CHIP_VEGA12: 55 case CHIP_VEGA20: 56 psp_v3_1_set_psp_funcs(psp); 57 break; 58 case CHIP_RAVEN: 59 psp_v10_0_set_psp_funcs(psp); 60 break; 61 default: 62 return -EINVAL; 63 } 64 65 psp->adev = adev; 66 67 if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) 68 return 0; 69 | 44 switch (adev->asic_type) { 45 case CHIP_VEGA10: 46 case CHIP_VEGA12: 47 case CHIP_VEGA20: 48 psp_v3_1_set_psp_funcs(psp); 49 break; 50 case CHIP_RAVEN: 51 psp_v10_0_set_psp_funcs(psp); 52 break; 53 default: 54 return -EINVAL; 55 } 56 57 psp->adev = adev; 58 59 if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) 60 return 0; 61 |
62 return 0; 63} 64 65static 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 if (ret) { 72 DRM_ERROR("Failed to load psp firmware!\n"); 73 return ret; 74 } 75 76 return 0; 77} --- 519 unchanged lines hidden --- | 71 ret = psp_init_microcode(psp); 72 if (ret) { 73 DRM_ERROR("Failed to load psp firmware!\n"); 74 return ret; 75 } 76 77 return 0; 78} --- 519 unchanged lines hidden --- |