[PATCH] drm/amdgpu/vcn: remove irq disabling in vcn 5 suspend

David Wu davidwu2 at amd.com
Mon May 13 17:41:06 UTC 2024


On 2024-05-13 13:11, Christian König wrote:
>
>
> Am 09.05.24 um 20:40 schrieb David (Ming Qiang) Wu:
>> We do not directly enable/disable VCN IRQ in vcn 5.0.0.
>> And we do not handle the IRQ state as well. So the calls to
>> disable IRQ and set state are removed. This effectively gets
>> rid of the warining of
>>        "WARN_ON(!amdgpu_irq_enabled(adev, src, type))"
>> in amdgpu_irq_put().
>>
>> Signed-off-by: David (Ming Qiang) Wu <David.Wu3 at amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 19 -------------------
>>   1 file changed, 19 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c 
>> b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
>> index 851975b5ce29..9b87d6a49b39 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
>> @@ -229,8 +229,6 @@ static int vcn_v5_0_0_hw_fini(void *handle)
>>       for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
>>           if (adev->vcn.harvest_config & (1 << i))
>>               continue;
>> -
>> -        amdgpu_irq_put(adev, &adev->vcn.inst[i].irq, 0);
>>       }
>
> Looks like you can now remove the whole for loop.
I realized that but there is a new patch added inside this loop to cover 
the suspend/resume issue.
>
> Apart from that looks good to me,
> Christian.
>
>>         return 0;
>> @@ -1226,22 +1224,6 @@ static int 
>> vcn_v5_0_0_set_powergating_state(void *handle, enum amd_powergating_s
>>       return ret;
>>   }
>>   -/**
>> - * vcn_v5_0_0_set_interrupt_state - set VCN block interrupt state
>> - *
>> - * @adev: amdgpu_device pointer
>> - * @source: interrupt sources
>> - * @type: interrupt types
>> - * @state: interrupt states
>> - *
>> - * Set VCN block interrupt state
>> - */
>> -static int vcn_v5_0_0_set_interrupt_state(struct amdgpu_device 
>> *adev, struct amdgpu_irq_src *source,
>> -    unsigned type, enum amdgpu_interrupt_state state)
>> -{
>> -    return 0;
>> -}
>> -
>>   /**
>>    * vcn_v5_0_0_process_interrupt - process VCN block interrupt
>>    *
>> @@ -1287,7 +1269,6 @@ static int vcn_v5_0_0_process_interrupt(struct 
>> amdgpu_device *adev, struct amdgp
>>   }
>>     static const struct amdgpu_irq_src_funcs vcn_v5_0_0_irq_funcs = {
>> -    .set = vcn_v5_0_0_set_interrupt_state,
>>       .process = vcn_v5_0_0_process_interrupt,
>>   };
>


More information about the amd-gfx mailing list