[PATCH 1/2] drm/amdgpu: remove power on/off SDMA in SMU hw_init/fini()

Josef Johansson josef at oderland.se
Tue Dec 21 08:41:26 UTC 2021


On 12/8/21 12:11, Wang, Yang(Kevin) wrote:
>
> [AMD Official Use Only]
>
>
> OK, I miss this call path.
>
> Reviewed-by: Kevin Wang <kevinyang.wang at amd.com>
>
> Best Regards,
> Kevin
>
> ------------------------------------------------------------------------
> *From:* Yu, Lang <Lang.Yu at amd.com>
> *Sent:* Wednesday, December 8, 2021 6:58 PM
> *To:* Wang, Yang(Kevin) <KevinYang.Wang at amd.com>
> *Cc:* amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>;
> Deucher, Alexander <Alexander.Deucher at amd.com>; Lazar, Lijo
> <Lijo.Lazar at amd.com>; Huang, Ray <Ray.Huang at amd.com>
> *Subject:* Re: [PATCH 1/2] drm/amdgpu: remove power on/off SDMA in SMU
> hw_init/fini()
>  
> On 12/08/ , Wang, Yang(Kevin) wrote:
> >    [AMD Official Use Only]
> >
> >    Hi Lang,
> >    the function of smu_powergate_sdma() is only valid on renoir chip.
> >    if you want to remove it, please also remove following callback
> pointer
> >    in struct pptable_funcs{}.
> >    related macro definitions also need to be cleaned up.
> >    int (*powergate_sdma)(struct smu_context *smu, bool gate);
>
>      It will be still called by amdgpu_dpm_set_powergating_by_smu()
>      in sdma_v4_0_hw_init/fini().
>        
>      Regards,
>      Lang
>
> >    Best Regards,
> >    Kevin
> >      __________________________________________________________________
> >
> >    From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf
> of Lang
> >    Yu <lang.yu at amd.com>
> >    Sent: Wednesday, December 8, 2021 5:26 PM
> >    To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
> >    Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Yu, Lang
> >    <Lang.Yu at amd.com>; Lazar, Lijo <Lijo.Lazar at amd.com>; Huang, Ray
> >    <Ray.Huang at amd.com>
> >    Subject: [PATCH 1/2] drm/amdgpu: remove power on/off SDMA in SMU
> >    hw_init/fini()
> >
> >    Currently, we don't find some neccesities to power on/off
> >    SDMA in SMU hw_init/fini(). It makes more sense in SDMA
> >    hw_init/fini().
> >    Signed-off-by: Lang Yu <lang.yu at amd.com>
> >    ---
> >     drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 5 -----
> >     1 file changed, 5 deletions(-)
> >    diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> >    b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> >    index 5839918cb574..2d718c30c8eb 100644
> >    --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> >    +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> >    @@ -1350,7 +1350,6 @@ static int smu_hw_init(void *handle)
> >             }
> >
> >             if (smu->is_apu) {
> >    -               smu_powergate_sdma(&adev->smu, false);
> >                     smu_dpm_set_vcn_enable(smu, true);
> >                     smu_dpm_set_jpeg_enable(smu, true);
> >                     smu_set_gfx_cgpg(&adev->smu, true);
> >    @@ -1512,10 +1511,6 @@ static int smu_hw_fini(void *handle)
> >             if (amdgpu_sriov_vf(adev)&&
> !amdgpu_sriov_is_pp_one_vf(adev))
> >                     return 0;
> >
> >    -       if (smu->is_apu) {
> >    -               smu_powergate_sdma(&adev->smu, true);
> >    -       }
> >    -
> >             smu_dpm_set_vcn_enable(smu, false);
> >             smu_dpm_set_jpeg_enable(smu, false);
> >
> >    --
> >    2.25.1
Hi,

Could this patch be related to the stacktrace I get when setting
amdgpu.dpm=0 on Renoir?
I tried to clear it up as much as possible (translated via OTR).

amdgpu 0000:07:00.0: amdgpu: amdgpu_device_ip_init failed
amdgpu 0000:07:00.0: amdgpu: Fatal error during GPU init
hid-multitouch 2003:04F3:ZACC.0001: Input,hiddeu 96, hidrawo: USB HID v1.10 Device CELAN Touchscreen on 00.3-4/inputor
amdgpu 0000:07:00.0: amdgpu: amdgpu: finishing device.
[drm] free PSP TMR buffer
amdgpu: probe of 0000:07:00.0 failed with error -95
BUG: unable to handle page fault for address: ffffc90080ccc000
#PF: supervisor write access in kernel modes
#PF: error_code(0x0002) - not-present page
PGD cd7cc067 P4D cd7cc067 PUD 10d93b067 PMD 10db30067 PTE O
Oops: 0002 (#1) SMP NOPTI
CPU: 4 PID: 427 Conn: systend-udevd Tainted: G V
5.16.0-0.rcs.8.fc32.qubes.x86_64 eur
Hardware name: LENOVO 20Y1S02400/2041502400, BIOS RIBET66U(1.35 ) 07/30/2021
RIP: e030:vcn_v2_0_sw_fini+0x72/0x90 [amdgpu]
Code: 89 ef eB 41 17 FE FE 85 c0 75 08 48 69 ef e8 65 10 FE ER 48 Bb 54 24 08 65 48 2b 14 25 28 00 00 00 75 18 48 83 4 10 51 5d c3 c?> 03 00 00 00 00 66 70 24 04 e8 af 07 do ff eb be es
RSP: e02b:feffc9004070bc18 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffffc900B0ccc000 RCX: 0000000000000000
RDX: 0000607ebf40a 100 RSI: feffc9004070bcic RDI: PEEEEEEfco2760401
RBP: ffff88810fe20000 ROB: 0000000000000000 RO9: 0000000080200018
R10: 0000000040000000 R11: 0000000000000004 R12: FF188810fe35a2er
R13: fer88810fe36980 R14: 000000000000000b R15: ffff88810111137cf
FS: 00007033B0a08b80C0000) GS: PEF 88814070000000000) knlGS:000000000000
CS: e030 DS: 0000 ES: 0000 CRO: 0000000080050033
CR2: ffffc90088ccc000 CR3: 0000000100b9c000 CR4: 0000000000050660
Call Trace:
<TASK>
amdgpu_device_ip_fini.isra.O+Oxb6/0x1bo [amdgpu]
amdgpu_device_fini_sw+Ox16/Oxe0 [amdgpu]
amdgpu_driver release_kms.0x12/0x30 [amdgpu]
devm_drm_dev_init_release+Ox3d/0x60 tarnir
devres_release_all.0xb8/0x100
really probe.x100/BX3108
_driver_probe_device.exfe/0x180P
driver probe_device-Oxle/8x90
_driver_attach•OxcB/Oxice
? _device_attach_driver Oxee/exeos
? _device_attach_driver.exe/Oxeos
bus_for_each_dev at x89/exdes
Bus_add_driver Ox149/Oxices
driver register.Ox8f/xee
? Oxffffffffcobddooos
do_one_initcall.0257/8x200
do_init_module=0x5c/8x260
_do_sys_finit_module.Oxae Exi1er
do_syscall_64.0x3b/Bx90
entry_SYSCALL_64_after_huframe.8x44 Axael
RIP: 0033:0x70308ee351345
Code: 00 c3 66 Ze of 1f 84 00 00 00 00 90 83 or le fa 48 89 68 48 89 67 48 89 46 48 89 ca 40 89 c2 40 69 cb 4c 8b 4c 24 08 of 05 <48> 30  01 to ff ff 73 01 c3 48 8b od 2b 6d Oc '00 f? d8 64 89 01 4
RSP: 002b:00007fff2a5c6198 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
RAX: ffffffffffffffda RBX: 00005a0b9881a640 RCX: 0000703d8ee35131
RDX: 0000000000000000 RSI: 00005a0b98819100 RDI: 00000000000000148
RBP: 0000000000020000 ROB: 0000000000000000 RO9; 00005ab9875700N
R10: 0000000000000014 R11: 0000000000000246 R12: 0000000000000000
R13: 00005a0b98819000 R14: 00005ab9881b9a0 R15: 0000000000000006
<TASKS
Modules linked in: hid_multitouch andgpul) commu_y2 gpu_sched 
12c_algo_bit dem_ttn_helper ttn sdhcl_pcl crct1001f_pclmul crc32_pc Imul
 drm_kms_helper crc32c_intel cqhci xhci_pci cec sdhci inme 
xhci_ci_remesa
serio_raw ghash_clmulni_intel xhci_hcd muc_core ehci 
Jhcd nume_core xen_acpl_processor xen_pr lucnd xen_pelback xen_blkback 
xen_gntalloc xen_gntdeu xen_eutchn uinputs
CR2: ffffc900B0cce000
--- end trace 6bbd70000e18e7a9 )---



More information about the amd-gfx mailing list