drm/amdgpu/psp: move psp version specific function pointers to early_init
Subsystems (2)
PATCH 1/1 drm/amdgpu/psp: move psp version specific function pointers to early_init
In case we need to use them for GPU reset prior initializing the asic. Fixes a crash if the driver attempts to reset the GPU at driver load time.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +10 -9
@@ -38,18 +38,10 @@ static void psp_set_funcs(struct amdgpu_device *adev);static int psp_early_init (void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; +struct psp_context *psp = &adev->psp;psp_set_funcs (adev); -return 0 ; -} - -static int psp_sw_init (void *handle) -{ -struct amdgpu_device *adev = (struct amdgpu_device *)handle; -struct psp_context *psp = &adev->psp; -int ret; -switch (adev->asic_type) {case CHIP_VEGA10 :case CHIP_VEGA12 :
@@ -67,6 +59,15 @@ static int psp_sw_init(void *handle) psp->adev = adev; +return 0 ; +} + +static int psp_sw_init (void *handle) +{ +struct amdgpu_device *adev = (struct amdgpu_device *)handle; +struct psp_context *psp = &adev->psp; +int ret; + ret =psp_init_microcode (psp);if (ret) {DRM_ERROR ("Failed to load psp firmware!\n" );
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190509142334.24760-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Christian König
Acked-byAm 09.05.19 um 16:23 schrieb Alex Deucher:
Quoted 5 lines
In case we need to use them for GPU reset prior initializing the asic. Fixes a crash if the driver attempts to reset the GPU at driver load time.
Signed-off-by Alex Deucher <[email protected]>
Quoted 34 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +3
-9@@ -38,18 +38,10 @@ static void psp_set_funcs(struct amdgpu_device *adev);static int psp_early_init (void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; +struct psp_context *psp = &adev->psp;psp_set_funcs (adev); -return 0 ; -} - -static int psp_sw_init (void *handle) -{ -struct amdgpu_device *adev = (struct amdgpu_device *)handle; -struct psp_context *psp = &adev->psp; -int ret; -switch (adev->asic_type) {case CHIP_VEGA10 :case CHIP_VEGA12 :@@ -67,6 +59,15 @@ static int psp_sw_init(void *handle) psp->adev = adev; +return 0 ; +}
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c static int psp_sw_init(void *handle) · line 73
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +7
-0+ +static int psp_sw_init (void *handle) +{ +struct amdgpu_device *adev = (struct amdgpu_device *)handle; +struct psp_context *psp = &adev->psp; +int ret; + ret =psp_init_microcode (psp);if (ret) {DRM_ERROR ("Failed to load psp firmware!\n" );
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 054e9ddd-c373-8908-ba8f-cced87b61813-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Christian König
Sent: Thursday, May 9, 2019 10:25 AM
To: Alex Deucher <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu/psp: move psp version specific function pointers to early_init
Am 09.05.19 um 16:23 schrieb Alex Deucher:
Quoted 5 lines
In case we need to use them for GPU reset prior initializing the asic. Fixes a crash if the driver attempts to reset the GPU at driver load time.
Signed-off-by Alex Deucher <[email protected]>
Quoted 35 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +3
-9@@ -38,18 +38,10 @@ static void psp_set_funcs(struct amdgpu_device *adev);static int psp_early_init (void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; +struct psp_context *psp = &adev->psp;psp_set_funcs (adev); -return 0 ; -} - -static int psp_sw_init (void *handle) -{ -struct amdgpu_device *adev = (struct amdgpu_device *)handle; -struct psp_context *psp = &adev->psp; -int ret; -switch (adev->asic_type) {case CHIP_VEGA10 :case CHIP_VEGA12 :@@ -67,6 +59,15 @@ static int psp_sw_init(void *handle) psp->adev = adev; +return 0 ; +}
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c static int psp_sw_init(void *handle) · line 73
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +7
-0+ +static int psp_sw_init (void *handle) +{ +struct amdgpu_device *adev = (struct amdgpu_device *)handle; +struct psp_context *psp = &adev->psp; +int ret; + ret =psp_init_microcode (psp);if (ret) {DRM_ERROR ("Failed to load psp firmware!\n" );
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx