[PATCH 3/3] drm/amdgpu: fix to clear ASIC INIT COMPLETE bit on resuming phase

Deucher, Alexander Alexander.Deucher at amd.com
Mon Apr 10 14:55:13 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Huang Rui
> Sent: Monday, April 10, 2017 5:38 AM
> To: amd-gfx at lists.freedesktop.org; Deucher, Alexander
> Cc: Huang, Ray
> Subject: [PATCH 3/3] drm/amdgpu: fix to clear ASIC INIT COMPLETE bit on
> resuming phase
> 
> ASIC_INIT_COMPLETE bit must be cleared during S3 resuming phase,
> because VBIOS will check the bit to decide if execute ASIC_Init
> posting via kernel driver.
> 
> Signed-off-by: Huang Rui <ray.huang at amd.com>

Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c     | 5 ++++-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 6 +++++-
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> index ad43299..b0dd72a8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> @@ -1727,8 +1727,11 @@ void
> amdgpu_atombios_scratch_regs_restore(struct amdgpu_device *adev)
>  {
>  	int i;
> 
> -	for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++)
> +	for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) {
> +		if (i == 7)
> +			adev->bios_scratch[i] &=
> ~ATOM_S7_ASIC_INIT_COMPLETE_MASK;
>  		WREG32(mmBIOS_SCRATCH_0 + i, adev->bios_scratch[i]);
> +	}
>  }
> 
>  void amdgpu_atombios_scratch_regs_engine_hung(struct amdgpu_device
> *adev,
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
> index 4b9abd6..c7e28bf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
> @@ -26,6 +26,7 @@
>  #include "atomfirmware.h"
>  #include "amdgpu_atomfirmware.h"
>  #include "atom.h"
> +#include "atombios.h"
> 
>  #define get_index_into_master_table(master_table, table_name)
> (offsetof(struct master_table, table_name) / sizeof(uint16_t))
> 
> @@ -77,8 +78,11 @@ void
> amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device
> *adev)
>  {
>  	int i;
> 
> -	for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++)
> +	for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) {
> +		if (i == 7)
> +			adev->bios_scratch[i] &=
> ~ATOM_S7_ASIC_INIT_COMPLETE_MASK;
>  		WREG32(adev->bios_scratch_reg_offset + i, adev-
> >bios_scratch[i]);
> +	}
>  }
> 
>  int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device
> *adev)
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list