drm/amdgpu/atomfirmware: add function to update engine hang status
Subsystems (2)
PATCH 1/2 drm/amdgpu/atomfirmware: add function to update engine hang status
Update the scratch reg for when the engine is hung.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h | 2 ++ 2 files changed, 15 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +13 -0
@@ -88,6 +88,19 @@ void amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device *adev)WREG32 (adev->bios_scratch_reg_offset + i, adev->bios_scratch[i]); } +void amdgpu_atomfirmware_scratch_regs_engine_hung (struct amdgpu_device *adev, +bool hung) +{ +u32 tmp =RREG32 (adev->bios_scratch_reg_offset +3 ); + +if (hung) + tmp |=ATOM_S3_ASIC_GUI_ENGINE_HUNG ; +else + tmp &= ~ATOM_S3_ASIC_GUI_ENGINE_HUNG ; + +WREG32 (adev->bios_scratch_reg_offset +3 , tmp); +} +int amdgpu_atomfirmware_allocate_fb_scratch (struct amdgpu_device *adev) {struct atom_context *ctx = adev->mode_info.atom_context;
drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h +2 -0
@@ -28,6 +28,8 @@ bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev)void amdgpu_atomfirmware_scratch_regs_init (struct amdgpu_device *adev);void amdgpu_atomfirmware_scratch_regs_save (struct amdgpu_device *adev);void amdgpu_atomfirmware_scratch_regs_restore (struct amdgpu_device *adev); +void amdgpu_atomfirmware_scratch_regs_engine_hung (struct amdgpu_device *adev, +bool hung);int amdgpu_atomfirmware_allocate_fb_scratch (struct amdgpu_device *adev);#endif
Signature · 6 lines
2.5.5 _______________________________________________ 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): 1493994447-20285-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/amdgpu/soc15: use atomfirmware for setting bios scratch for reset
Need to use the atomfirmware interface rather than atombios since soc15 is atomfirmware based.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +3 -3
@@ -25,7 +25,7 @@#include <linux/module.h> #include "drmP.h" #include "amdgpu.h" -#include "amdgpu_atombios.h" +#include "amdgpu_atomfirmware.h" #include "amdgpu_ih.h" #include "amdgpu_uvd.h" #include "amdgpu_vce.h"
@@ -392,11 +392,11 @@ static void soc15_gpu_pci_config_reset(struct amdgpu_device *adev)static int soc15_asic_reset (struct amdgpu_device *adev) { -amdgpu_atombios_scratch_regs_engine_hung (adev, true); +amdgpu_atomfirmware_scratch_regs_engine_hung (adev, true);soc15_gpu_pci_config_reset (adev); -amdgpu_atombios_scratch_regs_engine_hung (adev, false); +amdgpu_atomfirmware_scratch_regs_engine_hung (adev, false);return 0 ; }
Signature · 6 lines
2.5.5 _______________________________________________ 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): 1493994447-20285-2-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Re: [PATCH 2/2] drm/amdgpu/soc15: use atomfirmware for setting bios scratch for reset
Quoted 4 lines · Alex Deucher
Need to use the atomfirmware interface rather than atombios since soc15 is atomfirmware based.
Signed-off-by Alex Deucher <[email protected]>
The series is Reviewed-by: Chunming Zhou <[email protected]>
Quoted 21 lines
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/soc15.c +1
-1@@ -25,7 +25,7 @@#include <linux/module.h> #include "drmP.h" #include "amdgpu.h" -#include "amdgpu_atombios.h" +#include "amdgpu_atomfirmware.h" #include "amdgpu_ih.h" #include "amdgpu_uvd.h" #include "amdgpu_vce.h" @@ -392,11 +392,11 @@ static void soc15_gpu_pci_config_reset(struct amdgpu_device *adev)static int soc15_asic_reset (struct amdgpu_device *adev) {
drivers/gpu/drm/amd/amdgpu/soc15.c static void soc15_gpu_pci_config_reset(struct amdgpu_device *adev) · line 402
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/soc15.c +2
-2-amdgpu_atombios_scratch_regs_engine_hung (adev, true); +amdgpu_atomfirmware_scratch_regs_engine_hung (adev, true);soc15_gpu_pci_config_reset (adev); -amdgpu_atombios_scratch_regs_engine_hung (adev, false); +amdgpu_atomfirmware_scratch_regs_engine_hung (adev, false);return 0 ; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 3 lines · Alex Deucher
Update the scratch reg for when the engine is hung.
Signed-off-by Alex Deucher <[email protected]>
ping on this series.
Alex
Quoted 43 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h | 2 ++ 2 files changed, 15 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +13
-0@@ -88,6 +88,19 @@ void amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device *adev)WREG32 (adev->bios_scratch_reg_offset + i, adev->bios_scratch[i]); } +void amdgpu_atomfirmware_scratch_regs_engine_hung (struct amdgpu_device *adev, +bool hung) +{ +u32 tmp =RREG32 (adev->bios_scratch_reg_offset +3 ); + +if (hung) + tmp |=ATOM_S3_ASIC_GUI_ENGINE_HUNG ; +else + tmp &= ~ATOM_S3_ASIC_GUI_ENGINE_HUNG ; + +WREG32 (adev->bios_scratch_reg_offset +3 , tmp); +} +int amdgpu_atomfirmware_allocate_fb_scratch (struct amdgpu_device *adev) {struct atom_context *ctx = adev->mode_info.atom_context;drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h +2
-1@@ -28,6 +28,8 @@ bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev)void amdgpu_atomfirmware_scratch_regs_init (struct amdgpu_device *adev);void amdgpu_atomfirmware_scratch_regs_save (struct amdgpu_device *adev);void amdgpu_atomfirmware_scratch_regs_restore (struct amdgpu_device *adev); +void amdgpu_atomfirmware_scratch_regs_engine_hung (struct amdgpu_device *adev, +bool hung);int amdgpu_atomfirmware_allocate_fb_scratch (struct amdgpu_device *adev);#endif --
Quoted 2 lines
2.5.5
_______________________________________________
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): CADnq5_M4M47SvQdaC550Sc89Zu2oXRDXa2MjTEZuN4NsjqcXeA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Harry Wentland
Acked-byQuoted 7 lines · Alex Deucher
Quoted 3 lines · Alex Deucher
Update the scratch reg for when the engine is hung.
Signed-off-by Alex Deucher <[email protected]>ping on this series.
I'm not an expert on this and haven't had a chance to look up the atomfirmware definitions but this looks reasonable to me.
Harry
Quoted 43 lines
Alex
Quoted 41 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h | 2 ++ 2 files changed, 15 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +13
-0@@ -88,6 +88,19 @@ void amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device *adev)WREG32 (adev->bios_scratch_reg_offset + i, adev->bios_scratch[i]); } +void amdgpu_atomfirmware_scratch_regs_engine_hung (struct amdgpu_device *adev, +bool hung) +{ +u32 tmp =RREG32 (adev->bios_scratch_reg_offset +3 ); + +if (hung) + tmp |=ATOM_S3_ASIC_GUI_ENGINE_HUNG ; +else + tmp &= ~ATOM_S3_ASIC_GUI_ENGINE_HUNG ; + +WREG32 (adev->bios_scratch_reg_offset +3 , tmp); +} +int amdgpu_atomfirmware_allocate_fb_scratch (struct amdgpu_device *adev) {struct atom_context *ctx = adev->mode_info.atom_context;drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h +2
-0@@ -28,6 +28,8 @@ bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev)void amdgpu_atomfirmware_scratch_regs_init (struct amdgpu_device *adev);void amdgpu_atomfirmware_scratch_regs_save (struct amdgpu_device *adev);void amdgpu_atomfirmware_scratch_regs_restore (struct amdgpu_device *adev); +void amdgpu_atomfirmware_scratch_regs_engine_hung (struct amdgpu_device *adev, +bool hung);int amdgpu_atomfirmware_allocate_fb_scratch (struct amdgpu_device *adev);
Quoted 9 lines
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h +0
-1#endif --2.5.5
_______________________________________________
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
A message that is not in the archive (sent off-list or not yet received): 039ed304-e365-ba38-1501-4e81fee639d1-5C7GfCeVMHo@public.gmane.org
Christian König
Acked-byAm 08.05.2017 um 22:43 schrieb Harry Wentland:
Quoted 10 lines · Alex Deucher
Quoted 7 lines · Alex Deucher
Quoted 3 lines
Update the scratch reg for when the engine is hung.
Signed-off-by Alex Deucher <[email protected]>ping on this series.
I'm not an expert on this and haven't had a chance to look up the atomfirmware definitions but this looks reasonable to me.
Dito. Problem is as far as I know nobody else is deeply into atombios and reviewing patches.
Quoted 1 line
Acked-by Harry Wentland <[email protected]>
Christian.
Quoted 66 lines
Harry
Quoted 53 lines
Alex
Quoted 51 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h | 2 ++ 2 files changed, 15 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +13
-0@@ -88,6 +88,19 @@ void amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device *adev) WREG32(adev->bios_scratch_reg_offset + i, adev->bios_scratch[i]); } +void amdgpu_atomfirmware_scratch_regs_engine_hung (struct amdgpu_device *adev, +bool hung) +{ +u32 tmp =RREG32 (adev->bios_scratch_reg_offset +3 ); + +if (hung) + tmp |=ATOM_S3_ASIC_GUI_ENGINE_HUNG ; +else + tmp &= ~ATOM_S3_ASIC_GUI_ENGINE_HUNG ; + +WREG32 (adev->bios_scratch_reg_offset +3 , tmp); +} +int amdgpu_atomfirmware_allocate_fb_scratch(struct
amdgpu_device
*adev){ struct atom_context *ctx = adev->mode_info.atom_context;drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h +0
-0@@ -28,6 +28,8 @@ bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev) void amdgpu_atomfirmware_scratch_regs_init(struct amdgpu_device *adev);void amdgpu_atomfirmware_scratch_regs_save (struct amdgpu_device *adev); void amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device*adev);
+void amdgpu_atomfirmware_scratch_regs_engine_hung(structamdgpu_device*adev,
+ bool hung);
int amdgpu_atomfirmware_allocate_fb_scratch(structamdgpu_device
*adev);Quoted 9 lines
Quoted 4 lines
#endif
Signature · 1 line
2.5.5_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 4 lines
_______________________________________________
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