[PATCH 27/57] drm/amdgpu: Add vega20 soc init sequence on emulator (v3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 16, 2018 at 8:23 AM, Grazvydas Ignotas <notasas at gmail.com> wrote:
> On Wed, May 16, 2018 at 2:11 PM, Grazvydas Ignotas <notasas at gmail.com> wrote:
>> On Tue, May 15, 2018 at 5:59 PM, Alex Deucher <alexdeucher at gmail.com> wrote:
>>> From: Shaoyun Liu <Shaoyun.Liu at amd.com>
>>>
>>> v2: cleanups (Alex)
>>> v3: make it vega20 only (Alex)
>>>
>>> Signed-off-by: Shaoyun Liu <Shaoyun.Liu at amd.com>
>>> Acked-by: Alex Deucher <alexander.deucher at amd.com>
>>> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
>>> ---
>>>  drivers/gpu/drm/amd/amdgpu/emu_soc.c | 10091 +++++++++++++++++++++++++++++++++
>>>  1 file changed, 10091 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/emu_soc.c b/drivers/gpu/drm/amd/amdgpu/emu_soc.c
>>> index d72c25c1b987..91f00fbe550a 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/emu_soc.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/emu_soc.c
>>> @@ -26,8 +26,10099 @@
>>>  #include "soc15_common.h"
>>>  #include "soc15_hw_ip.h"
>>>
>>> +static void wreg32_idx_byteoffset(struct amdgpu_device *adev, u32 offset, u32 value) {
>>> +
>>> +       static u32 maxoffset = 0;
>>> +       static int count = 0;
>>> +
>>> +       WREG32(0xc, offset);
>>> +       RREG32(0xc);
>>> +       WREG32(0xd, value);
>>> +       RREG32(0xd);
>>> +
>>> +       if (offset > maxoffset)
>>> +               maxoffset = offset;
>>> +
>>> +       count++;
>>> +       if (count % 100 == 0) {
>>> +               DRM_INFO("%5d registers written, max offset %08x\n", count, maxoffset);
>>> +               msleep(1);
>>> +       }
>>> +
>>> +}
>>> +
>>> +static void vg20_lsd_soc_init_with_umc(struct amdgpu_device *adev)
>>> +{
>>> +
>>> +               wreg32_idx_byteoffset(adev, 0x10131800, 0x40a40);
>>> +               wreg32_idx_byteoffset(adev, 0x10141010, 0x10000000);
>>> +               wreg32_idx_byteoffset(adev, 0x10134008, 0xfa042021);
>>> +               wreg32_idx_byteoffset(adev, 0x387C, 0x3);
>>
>> Indentation (double tabs).
>> Could this be done in a similar way as
>> amdgpu_device_program_register_sequence() instead of thousands of
>> function calls?
>
> Actually this will bloat the amdgpu module for everyone, while almost
> nobody needs this, perhaps hide this under Kconfig option at least?
>

Dropped the patch for upstream.

Alex


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux