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

Grazvydas Ignotas notasas at gmail.com
Mon Apr 10 12:09:17 UTC 2017


On Mon, Apr 10, 2017 at 12:37 PM, Huang Rui <ray.huang at amd.com> wrote:

> 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>
> ---
>  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;
>

Maybe move this line before the loop?
A comment may also be useful so that somebody doesn't delete the code again
in future.

GraÅžvydas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20170410/65a53a30/attachment.html>


More information about the amd-gfx mailing list