[PATCH 3/8] drm/amdgpu: add pre_asic_init callback for SI

Christian König christian.koenig at amd.com
Fri Aug 28 14:30:39 UTC 2020


Am 28.08.20 um 15:38 schrieb Alex Deucher:
> On Fri, Aug 28, 2020 at 4:06 AM Christian König
> <ckoenig.leichtzumerken at gmail.com> wrote:
>> Am 24.08.20 um 18:15 schrieb Alex Deucher:
>>> Nothing to do for this family.
>> Uff, no. Can't we just make the callback optional?
>>
> I guess we could, but all of the other asic callbacks are assumed to be present.

Yeah, but those aren't empty. Aren't they?

When we got an empty callback we really should make it optional, except 
if it is extremely performance critical.

Christian.

>
> Alex
>
>>> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
>>> ---
>>>    drivers/gpu/drm/amd/amdgpu/si.c | 5 +++++
>>>    1 file changed, 5 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c
>>> index eaa2f071b139..455d5e366c69 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/si.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/si.c
>>> @@ -1871,6 +1871,10 @@ static int si_set_vce_clocks(struct amdgpu_device *adev, u32 evclk, u32 ecclk)
>>>        return 0;
>>>    }
>>>
>>> +static void si_pre_asic_init(struct amdgpu_device *adev)
>>> +{
>>> +}
>>> +
>>>    static const struct amdgpu_asic_funcs si_asic_funcs =
>>>    {
>>>        .read_disabled_bios = &si_read_disabled_bios,
>>> @@ -1892,6 +1896,7 @@ static const struct amdgpu_asic_funcs si_asic_funcs =
>>>        .need_reset_on_init = &si_need_reset_on_init,
>>>        .get_pcie_replay_count = &si_get_pcie_replay_count,
>>>        .supports_baco = &si_asic_supports_baco,
>>> +     .pre_asic_init = &si_pre_asic_init,
>>>    };
>>>
>>>    static uint32_t si_get_rev_id(struct amdgpu_device *adev)



More information about the amd-gfx mailing list