[PATCH 1/2] drm/amdgpu/atomfirmware: add function to update engine hang status

Christian König deathsimple at vodafone.de
Tue May 9 09:45:27 UTC 2017


Am 08.05.2017 um 22:43 schrieb Harry Wentland:
> On 2017-05-08 02:32 PM, Alex Deucher wrote:
>> On Fri, May 5, 2017 at 10:27 AM, Alex Deucher <alexdeucher at gmail.com> 
>> wrote:
>>> Update the scratch reg for when the engine is hung.
>>>
>>> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
>>
>> 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.

> Acked-by: Harry Wentland <harry.wentland at amd.com>

Acked-by: Christian König <christian.koenig at amd.com> as well.

Christian.

>
> Harry
>
>
>> Alex
>>
>>> ---
>>>  drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 13 +++++++++++++
>>>  drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h |  2 ++
>>>  2 files changed, 15 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c 
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
>>> index d735cd1..4bdda56 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
>>> @@ -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;
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h 
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h
>>> index d0c4dcd..a2c3ebe 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h
>>> @@ -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
>>> -- 
>>> 2.5.5
>>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>>
> _______________________________________________
> 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