drm/amdgpu/psp: add a few more fw load type checks
Subsystems (2)
PATCH 1/5 drm/amdgpu/psp: add a few more fw load type checks
We already checked and returned early in most of the IP functions, fill in the rest as well.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +9 -0
@@ -62,6 +62,9 @@ static int psp_sw_init(void *handle) psp->adev = adev; +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) +return 0 ; + ret =psp_init_microcode (psp);if (ret) {DRM_ERROR ("Failed to load psp firmware!\n" );
@@ -75,6 +78,9 @@ static int psp_sw_fini(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) +return 0 ; +release_firmware (adev->psp.sos_fw); adev->psp.sos_fw =NULL ;release_firmware (adev->psp.asd_fw);
@@ -453,6 +459,9 @@ static int psp_suspend(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;struct psp_context *psp = &adev->psp; +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) +return 0 ; + ret =psp_ring_stop (psp,PSP_RING_TYPE__KM );if (ret) {DRM_ERROR ("PSP ring stop failed\n" );
Signature · 6 lines
2.13.6 _______________________________________________ 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): 20180309202523.5269-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 2/5 drm/amdgpu: move firmware loading type setup to common code
No need to replicate it in several places.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ drivers/gpu/drm/amd/amdgpu/cik.c | 2 -- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 -- drivers/gpu/drm/amd/amdgpu/vi.c | 3 --- 4 files changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
@@ -830,6 +830,8 @@ static void amdgpu_device_check_arguments(struct amdgpu_device *adev)dev_warn (adev->dev,"lockup_timeout msut be > 0, adjusting to 10000\n" ); amdgpu_lockup_timeout =10000 ; } + + adev->firmware.load_type =amdgpu_ucode_get_load_type (adev, amdgpu_fw_load_type); }/**
drivers/gpu/drm/amd/amdgpu/cik.c +0 -2
@@ -1887,8 +1887,6 @@ static int cik_common_early_init(void *handle)return -EINVAL ; } - adev->firmware.load_type =amdgpu_ucode_get_load_type (adev, amdgpu_fw_load_type); -amdgpu_device_get_pcie_info (adev);return 0 ;
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -2
@@ -692,8 +692,6 @@ static int soc15_common_early_init(void *handle)xgpu_ai_mailbox_set_irq_funcs (adev); } - adev->firmware.load_type =amdgpu_ucode_get_load_type (adev, amdgpu_fw_load_type); -amdgpu_device_get_pcie_info (adev);return 0 ;
drivers/gpu/drm/amd/amdgpu/vi.c +0 -3
@@ -1097,9 +1097,6 @@ static int vi_common_early_init(void *handle)xgpu_vi_mailbox_set_irq_funcs (adev); } -/* vi use smc load by default */ - adev->firmware.load_type =amdgpu_ucode_get_load_type (adev, amdgpu_fw_load_type); -amdgpu_device_get_pcie_info (adev);return 0 ;
Signature · 6 lines
2.13.6 _______________________________________________ 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): 20180309202523.5269-2-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Zhu, Rex
Reviewed-by Rex ZhuRe: [PATCH 2/5] drm/amdgpu: move firmware loading type setup to common code
Best Regards
Rex
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Alex Deucher <[email protected]>
Sent: Saturday, March 10, 2018 4:25 AM
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH 2/5] drm/amdgpu: move firmware loading type setup to common code
No need to replicate it in several places.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ drivers/gpu/drm/amd/amdgpu/cik.c | 2 -- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 -- drivers/gpu/drm/amd/amdgpu/vi.c | 3 --- 4 files changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
@@ -830,6 +830,8 @@ static void amdgpu_device_check_arguments(struct amdgpu_device *adev)dev_warn (adev->dev,"lockup_timeout msut be > 0, adjusting to 10000\n" ); amdgpu_lockup_timeout =10000 ; } + + adev->firmware.load_type =amdgpu_ucode_get_load_type (adev, amdgpu_fw_load_type); }/**
drivers/gpu/drm/amd/amdgpu/cik.c +0 -2
@@ -1887,8 +1887,6 @@ static int cik_common_early_init(void *handle)return -EINVAL ; } - adev->firmware.load_type =amdgpu_ucode_get_load_type (adev, amdgpu_fw_load_type); -amdgpu_device_get_pcie_info (adev);return 0 ;
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -2
@@ -692,8 +692,6 @@ static int soc15_common_early_init(void *handle)xgpu_ai_mailbox_set_irq_funcs (adev); } - adev->firmware.load_type =amdgpu_ucode_get_load_type (adev, amdgpu_fw_load_type); -amdgpu_device_get_pcie_info (adev);return 0 ;
drivers/gpu/drm/amd/amdgpu/vi.c +0 -3
@@ -1097,9 +1097,6 @@ static int vi_common_early_init(void *handle)xgpu_vi_mailbox_set_irq_funcs (adev); } -/* vi use smc load by default */ - adev->firmware.load_type =amdgpu_ucode_get_load_type (adev, amdgpu_fw_load_type); -amdgpu_device_get_pcie_info (adev);return 0 ;
--
2.13.6
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/5 drm/amdgpu: use adev->firmware to determine whether to load the PSP module
In reply to a message not in the archiveThe per device firmware load method is limited to what makes sense for that asic rather than whatever arbitrary value may have been set by the user.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +1 -1
@@ -531,7 +531,7 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &vega10_common_ip_block);amdgpu_device_ip_block_add (adev, &gmc_v9_0_ip_block);amdgpu_device_ip_block_add (adev, &vega10_ih_ip_block); -if (amdgpu_fw_load_type ==2 || amdgpu_fw_load_type ==-1 ) +if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP )amdgpu_device_ip_block_add (adev, &psp_v3_1_ip_block);if (!amdgpu_sriov_vf (adev))amdgpu_device_ip_block_add (adev, &amdgpu_pp_ip_block);
Signature · 6 lines
2.13.6 _______________________________________________ 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): 20180309202523.5269-3-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Zhu, Rex
Reviewed-by Rex ZhuRe: [PATCH 3/5] drm/amdgpu: use adev->firmware to determine whether to load the PSP module
Best Regards
Rex
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Alex Deucher <[email protected]>
Sent: Saturday, March 10, 2018 4:25 AM
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH 3/5] drm/amdgpu: use adev->firmware to determine whether to load the PSP module
The per device firmware load method is limited to what makes sense for that asic rather than whatever arbitrary value may have been set by the user.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +1 -1
@@ -531,7 +531,7 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &vega10_common_ip_block);amdgpu_device_ip_block_add (adev, &gmc_v9_0_ip_block);amdgpu_device_ip_block_add (adev, &vega10_ih_ip_block); -if (amdgpu_fw_load_type ==2 || amdgpu_fw_load_type ==-1 ) +if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP )amdgpu_device_ip_block_add (adev, &psp_v3_1_ip_block);if (!amdgpu_sriov_vf (adev))amdgpu_device_ip_block_add (adev, &amdgpu_pp_ip_block);
--
2.13.6
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/5 drm/amdgpu/soc15: always load the psp module
In reply to a message not in the archiveRegardless of whether the user has selected psp fw loading or not. It's still needed for GPU reset among other things. There are already guards in place to avoid setting up the full psp if PSP fw loading is not enabled.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +1 -2
@@ -531,8 +531,7 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &vega10_common_ip_block);amdgpu_device_ip_block_add (adev, &gmc_v9_0_ip_block);amdgpu_device_ip_block_add (adev, &vega10_ih_ip_block); -if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) -amdgpu_device_ip_block_add (adev, &psp_v3_1_ip_block); +amdgpu_device_ip_block_add (adev, &psp_v3_1_ip_block);if (!amdgpu_sriov_vf (adev))amdgpu_device_ip_block_add (adev, &amdgpu_pp_ip_block);if (adev->enable_virtual_display ||amdgpu_sriov_vf (adev))
Signature · 6 lines
2.13.6 _______________________________________________ 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): 20180309202523.5269-4-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Zhu, Rex
Reviewed-by Rex ZhuRe: [PATCH 4/5] drm/amdgpu/soc15: always load the psp module
Best Regards
Rex
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Alex Deucher <[email protected]>
Sent: Saturday, March 10, 2018 4:25 AM
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH 4/5] drm/amdgpu/soc15: always load the psp module
Regardless of whether the user has selected psp fw loading or not. It's still needed for GPU reset among other things. There are already guards in place to avoid setting up the full psp if PSP fw loading is not enabled.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +1 -2
@@ -531,8 +531,7 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &vega10_common_ip_block);amdgpu_device_ip_block_add (adev, &gmc_v9_0_ip_block);amdgpu_device_ip_block_add (adev, &vega10_ih_ip_block); -if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) -amdgpu_device_ip_block_add (adev, &psp_v3_1_ip_block); +amdgpu_device_ip_block_add (adev, &psp_v3_1_ip_block);if (!amdgpu_sriov_vf (adev))amdgpu_device_ip_block_add (adev, &amdgpu_pp_ip_block);if (adev->enable_virtual_display ||amdgpu_sriov_vf (adev))
--
2.13.6
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/5 drm/amdgpu: move getting pcie info to common code
In reply to a message not in the archiveNo need to replicate it in several places.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/cik.c | 2 -- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 -- drivers/gpu/drm/amd/amdgpu/vi.c | 2 -- 5 files changed, 5 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -2
@@ -1082,8 +1082,6 @@ struct amdgpu_wb {int amdgpu_device_wb_get (struct amdgpu_device *adev,u32 *wb);void amdgpu_device_wb_free (struct amdgpu_device *adev,u32 wb); -void amdgpu_device_get_pcie_info (struct amdgpu_device *adev); -/* * SDMA */
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +5 -1
@@ -87,6 +87,8 @@ static const char *amdgpu_asic_name[] = { "LAST", }; +static void amdgpu_device_get_pcie_info (struct amdgpu_device *adev); +bool amdgpu_device_is_px (struct drm_device *dev) {struct amdgpu_device *adev = dev->dev_private;
@@ -1880,6 +1882,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,if (adev->rio_mem ==NULL )DRM_INFO ("PCI I/O BAR is not found.\n" ); +amdgpu_device_get_pcie_info (adev); +/* early init functions */ r =amdgpu_device_ip_early_init (adev);if (r)
@@ -2757,7 +2761,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,return r; } -void amdgpu_device_get_pcie_info (struct amdgpu_device *adev) +static void amdgpu_device_get_pcie_info (struct amdgpu_device *adev) {u32 mask;int ret;
drivers/gpu/drm/amd/amdgpu/cik.c +0 -2
@@ -1887,8 +1887,6 @@ static int cik_common_early_init(void *handle)return -EINVAL ; } -amdgpu_device_get_pcie_info (adev); -return 0 ; }
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -2
@@ -691,8 +691,6 @@ static int soc15_common_early_init(void *handle)xgpu_ai_mailbox_set_irq_funcs (adev); } -amdgpu_device_get_pcie_info (adev); -return 0 ; }
drivers/gpu/drm/amd/amdgpu/vi.c +0 -2
@@ -1097,8 +1097,6 @@ static int vi_common_early_init(void *handle)xgpu_vi_mailbox_set_irq_funcs (adev); } -amdgpu_device_get_pcie_info (adev); -return 0 ; }
Signature · 6 lines
2.13.6 _______________________________________________ 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): 20180309202523.5269-5-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Zhu, Rex
Reviewed-by Rex ZhuRe: [PATCH 5/5] drm/amdgpu: move getting pcie info to common code
Best Regards
Rex
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Alex Deucher <[email protected]>
Sent: Saturday, March 10, 2018 4:25 AM
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH 5/5] drm/amdgpu: move getting pcie info to common code
No need to replicate it in several places.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/cik.c | 2 -- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 -- drivers/gpu/drm/amd/amdgpu/vi.c | 2 -- 5 files changed, 5 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -2
@@ -1082,8 +1082,6 @@ struct amdgpu_wb {int amdgpu_device_wb_get (struct amdgpu_device *adev,u32 *wb);void amdgpu_device_wb_free (struct amdgpu_device *adev,u32 wb); -void amdgpu_device_get_pcie_info (struct amdgpu_device *adev); -/* * SDMA */
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +5 -1
@@ -87,6 +87,8 @@ static const char *amdgpu_asic_name[] = { "LAST", }; +static void amdgpu_device_get_pcie_info (struct amdgpu_device *adev); +bool amdgpu_device_is_px (struct drm_device *dev) {struct amdgpu_device *adev = dev->dev_private;
@@ -1880,6 +1882,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,if (adev->rio_mem ==NULL )DRM_INFO ("PCI I/O BAR is not found.\n" ); +amdgpu_device_get_pcie_info (adev); +/* early init functions */ r =amdgpu_device_ip_early_init (adev);if (r)
@@ -2757,7 +2761,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,return r; } -void amdgpu_device_get_pcie_info (struct amdgpu_device *adev) +static void amdgpu_device_get_pcie_info (struct amdgpu_device *adev) {u32 mask;int ret;
drivers/gpu/drm/amd/amdgpu/cik.c +0 -2
@@ -1887,8 +1887,6 @@ static int cik_common_early_init(void *handle)return -EINVAL ; } -amdgpu_device_get_pcie_info (adev); -return 0 ; }
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -2
@@ -691,8 +691,6 @@ static int soc15_common_early_init(void *handle)xgpu_ai_mailbox_set_irq_funcs (adev); } -amdgpu_device_get_pcie_info (adev); -return 0 ; }
drivers/gpu/drm/amd/amdgpu/vi.c +0 -2
@@ -1097,8 +1097,6 @@ static int vi_common_early_init(void *handle)xgpu_vi_mailbox_set_irq_funcs (adev); } -amdgpu_device_get_pcie_info (adev); -return 0 ; }
--
2.13.6
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
Acked-byAm 09.03.2018 um 21:25 schrieb Alex Deucher:
Quoted 4 lines
We already checked and returned early in most of the IP functions, fill in the rest as well.
Signed-off-by Alex Deucher <[email protected]>
Quoted 29 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +6
-0@@ -62,6 +62,9 @@ static int psp_sw_init(void *handle) psp->adev = adev; +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) +return 0 ; + ret =psp_init_microcode (psp);if (ret) {DRM_ERROR ("Failed to load psp firmware!\n" );@@ -75,6 +78,9 @@ static int psp_sw_fini(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) +return 0 ; +release_firmware (adev->psp.sos_fw); adev->psp.sos_fw =NULL ;release_firmware (adev->psp.asd_fw);
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c static int psp_suspend(void *handle) · line 467
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +3
-0@@ -453,6 +459,9 @@ static int psp_suspend(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;struct psp_context *psp = &adev->psp; +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) +return 0 ; + ret =psp_ring_stop (psp,PSP_RING_TYPE__KM );if (ret) {DRM_ERROR ("PSP ring stop failed\n" );
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Zhu, Rex
Reviewed-by Rex ZhuBest Regards
Rex
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Alex Deucher <[email protected]>
Sent: Saturday, March 10, 2018 4:25 AM
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH 1/5] drm/amdgpu/psp: add a few more fw load type checks
We already checked and returned early in most of the IP functions, fill in the rest as well.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +9 -0
@@ -62,6 +62,9 @@ static int psp_sw_init(void *handle) psp->adev = adev; +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) +return 0 ; + ret =psp_init_microcode (psp);if (ret) {DRM_ERROR ("Failed to load psp firmware!\n" );
@@ -75,6 +78,9 @@ static int psp_sw_fini(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) +return 0 ; +release_firmware (adev->psp.sos_fw); adev->psp.sos_fw =NULL ;release_firmware (adev->psp.asd_fw);
@@ -453,6 +459,9 @@ static int psp_suspend(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;struct psp_context *psp = &adev->psp; +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) +return 0 ; + ret =psp_ring_stop (psp,PSP_RING_TYPE__KM );if (ret) {DRM_ERROR ("PSP ring stop failed\n" );
--
2.13.6
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx