* [PATCH 0/3] MISC fixes @ 2021-07-14 15:25 Oak Zeng 2021-07-14 15:25 ` [PATCH 1/3] drm/amdkfd: Disallow debugfs to hang hws when GPU is resetting Oak Zeng ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Oak Zeng @ 2021-07-14 15:25 UTC (permalink / raw) To: amd-gfx; +Cc: feifei.xu, Felix.Kuehling, leo.liu, Oak Zeng, hawking.zhang Oak Zeng (3): drm/amdkfd: Disallow debugfs to hang hws when GPU is resetting drm/amdgpu: Fix a printing message drm/amdgpu: Change a few function names drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 16 ++++++++-------- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 5 +++++ 6 files changed, 17 insertions(+), 12 deletions(-) -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/3] drm/amdkfd: Disallow debugfs to hang hws when GPU is resetting 2021-07-14 15:25 [PATCH 0/3] MISC fixes Oak Zeng @ 2021-07-14 15:25 ` Oak Zeng 2021-07-14 16:04 ` Felix Kuehling 2021-07-14 15:25 ` [PATCH 2/3] drm/amdgpu: Fix a printing message Oak Zeng 2021-07-14 15:25 ` [PATCH 3/3] drm/amdgpu: Change a few function names Oak Zeng 2 siblings, 1 reply; 11+ messages in thread From: Oak Zeng @ 2021-07-14 15:25 UTC (permalink / raw) To: amd-gfx; +Cc: feifei.xu, Felix.Kuehling, leo.liu, Oak Zeng, hawking.zhang If GPU is during a resetting cycle, writing to GPU can cause unpredictable protection fault, see below call trace. Disallow using kfd debugfs hang_hws to hang hws if GPU is resetting. [12808.234114] general protection fault: 0000 [#1] SMP NOPTI [12808.234119] CPU: 13 PID: 6334 Comm: tee Tainted: G OE 5.4.0-77-generic #86-Ubuntu [12808.234121] Hardware name: ASUS System Product Name/Pro WS WRX80E-SAGE SE WIFI, BIOS 0211 11/27/2020 [12808.234220] RIP: 0010:kq_submit_packet+0xd/0x50 [amdgpu] [12808.234222] Code: 8b 45 d0 48 c7 00 00 00 00 00 b8 f4 ff ff ff eb df 66 66 2e 0f 1f 84 00 00 00 00 00 90 0f 1f 44 00 00 55 48 8b 17 48 8b 47 48 <48> 8b 52 08 48 89 e5 83 7a 20 08 74 14 8b 77 20 89 30 48 8b 47 10 [12808.234224] RSP: 0018:ffffb0bf4954bdc0 EFLAGS: 00010216 [12808.234226] RAX: ffffb0bf4a1a5a00 RBX: ffff99302895c0c8 RCX: 0000000000000000 [12808.234227] RDX: c3156d43d3a04949 RSI: 0000000000000055 RDI: ffff99302584c300 [12808.234228] RBP: ffffb0bf4954bdf8 R08: 0000000000000543 R09: ffffb0bf4a1a4230 [12808.234229] R10: 000000000000000a R11: f000000000000000 R12: 0000000000000000 [12808.234230] R13: ffff99302895c0d8 R14: 00007ffebb3d18f0 R15: 0000000000000005 [12808.234232] FS: 00007f0d822ef580(0000) GS:ffff99307d340000(0000) knlGS:0000000000000000 [12808.234233] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [12808.234234] CR2: 00007ffebb3d1908 CR3: 0000001efe1ec000 CR4: 0000000000340ee0 [12808.234235] Call Trace: [12808.234324] ? pm_debugfs_hang_hws+0x71/0xd0 [amdgpu] [12808.234408] kfd_debugfs_hang_hws+0x2e/0x50 [amdgpu] [12808.234494] kfd_debugfs_hang_hws_write+0xb6/0xc0 [amdgpu] [12808.234499] full_proxy_write+0x5c/0x90 [12808.234502] __vfs_write+0x1b/0x40 [12808.234504] vfs_write+0xb9/0x1a0 [12808.234506] ksys_write+0x67/0xe0 [12808.234508] __x64_sys_write+0x1a/0x20 [12808.234511] do_syscall_64+0x57/0x190 [12808.234514] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index 9e4a05e..fc77d03 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c @@ -1390,6 +1390,11 @@ int kfd_debugfs_hang_hws(struct kfd_dev *dev) return -EINVAL; } + if (dev->dqm->is_resetting) { + pr_err("HWS is already resetting, please wait for the current reset to finish\n"); + return -EBUSY; + } + r = pm_debugfs_hang_hws(&dev->dqm->packets); if (!r) r = dqm_debugfs_execute_queues(dev->dqm); -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] drm/amdkfd: Disallow debugfs to hang hws when GPU is resetting 2021-07-14 15:25 ` [PATCH 1/3] drm/amdkfd: Disallow debugfs to hang hws when GPU is resetting Oak Zeng @ 2021-07-14 16:04 ` Felix Kuehling 0 siblings, 0 replies; 11+ messages in thread From: Felix Kuehling @ 2021-07-14 16:04 UTC (permalink / raw) To: Oak Zeng, amd-gfx; +Cc: feifei.xu, leo.liu, hawking.zhang Am 2021-07-14 um 11:25 a.m. schrieb Oak Zeng: > If GPU is during a resetting cycle, writing to GPU can cause > unpredictable protection fault, see below call trace. Disallow using kfd debugfs > hang_hws to hang hws if GPU is resetting. > > [12808.234114] general protection fault: 0000 [#1] SMP NOPTI > [12808.234119] CPU: 13 PID: 6334 Comm: tee Tainted: G OE > 5.4.0-77-generic #86-Ubuntu > [12808.234121] Hardware name: ASUS System Product Name/Pro WS WRX80E-SAGE SE > WIFI, BIOS 0211 11/27/2020 > [12808.234220] RIP: 0010:kq_submit_packet+0xd/0x50 [amdgpu] > [12808.234222] Code: 8b 45 d0 48 c7 00 00 00 00 00 b8 f4 ff ff ff eb df 66 66 > 2e 0f 1f 84 00 00 00 00 00 90 0f 1f 44 00 00 55 48 8b 17 48 8b 47 48 <48> 8b 52 > 08 48 89 e5 83 7a 20 08 74 14 8b 77 20 89 30 48 8b 47 10 > [12808.234224] RSP: 0018:ffffb0bf4954bdc0 EFLAGS: 00010216 > [12808.234226] RAX: ffffb0bf4a1a5a00 RBX: ffff99302895c0c8 RCX: > 0000000000000000 > [12808.234227] RDX: c3156d43d3a04949 RSI: 0000000000000055 RDI: > ffff99302584c300 > [12808.234228] RBP: ffffb0bf4954bdf8 R08: 0000000000000543 R09: > ffffb0bf4a1a4230 > [12808.234229] R10: 000000000000000a R11: f000000000000000 R12: > 0000000000000000 > [12808.234230] R13: ffff99302895c0d8 R14: 00007ffebb3d18f0 R15: > 0000000000000005 > [12808.234232] FS: 00007f0d822ef580(0000) GS:ffff99307d340000(0000) > knlGS:0000000000000000 > [12808.234233] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [12808.234234] CR2: 00007ffebb3d1908 CR3: 0000001efe1ec000 CR4: > 0000000000340ee0 > [12808.234235] Call Trace: > [12808.234324] ? pm_debugfs_hang_hws+0x71/0xd0 [amdgpu] > [12808.234408] kfd_debugfs_hang_hws+0x2e/0x50 [amdgpu] > [12808.234494] kfd_debugfs_hang_hws_write+0xb6/0xc0 [amdgpu] > [12808.234499] full_proxy_write+0x5c/0x90 > [12808.234502] __vfs_write+0x1b/0x40 > [12808.234504] vfs_write+0xb9/0x1a0 > [12808.234506] ksys_write+0x67/0xe0 > [12808.234508] __x64_sys_write+0x1a/0x20 > [12808.234511] do_syscall_64+0x57/0x190 > [12808.234514] entry_SYSCALL_64_after_hwframe+0x44/0xa9 > > Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> > --- > drivers/gpu/drm/amd/amdkfd/kfd_device.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c > index 9e4a05e..fc77d03 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c > @@ -1390,6 +1390,11 @@ int kfd_debugfs_hang_hws(struct kfd_dev *dev) > return -EINVAL; > } > > + if (dev->dqm->is_resetting) { Checking dev->dqm->is_resetting without holding the dqm_lock is incorrect. The problem is not really the fact, that it's resetting, but that dqm->packets (the packet manager) is not initialized at that time. A more general solution would be to move the pm_debugfs_hang_hws call into dqm_debugfs_execute_queues, which does take the dqm_lock, and add a check for dqm->packets while holding the lock. Regards, Felix > + pr_err("HWS is already resetting, please wait for the current reset to finish\n"); > + return -EBUSY; > + } > + > r = pm_debugfs_hang_hws(&dev->dqm->packets); > if (!r) > r = dqm_debugfs_execute_queues(dev->dqm); _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/3] drm/amdgpu: Fix a printing message 2021-07-14 15:25 [PATCH 0/3] MISC fixes Oak Zeng 2021-07-14 15:25 ` [PATCH 1/3] drm/amdkfd: Disallow debugfs to hang hws when GPU is resetting Oak Zeng @ 2021-07-14 15:25 ` Oak Zeng 2021-07-14 15:28 ` Christian König 2021-07-14 15:48 ` Alex Deucher 2021-07-14 15:25 ` [PATCH 3/3] drm/amdgpu: Change a few function names Oak Zeng 2 siblings, 2 replies; 11+ messages in thread From: Oak Zeng @ 2021-07-14 15:25 UTC (permalink / raw) To: amd-gfx; +Cc: feifei.xu, Felix.Kuehling, leo.liu, Oak Zeng, hawking.zhang The printing message "PSP loading VCN firmware" is mis-leading because people might think driver is loading VCN firmware. Actually when this message is printed, driver is just preparing some VCN ucode, not loading VCN firmware yet. The actual VCN firmware loading will be in the PSP block hw_init. Fix the printing message Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> --- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c index 284bb42..1f8e902 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c @@ -119,7 +119,7 @@ static int vcn_v1_0_sw_init(void *handle) adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; adev->firmware.fw_size += ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); - DRM_INFO("PSP loading VCN firmware\n"); + DRM_INFO("VCN 1.0: Will use PSP to load VCN firmware\n"); } r = amdgpu_vcn_resume(adev); diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c index 8af567c..ebe4f2b 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c @@ -122,7 +122,7 @@ static int vcn_v2_0_sw_init(void *handle) adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; adev->firmware.fw_size += ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); - DRM_INFO("PSP loading VCN firmware\n"); + DRM_INFO("VCN 2.0: Will use PSP to load VCN firmware\n"); } r = amdgpu_vcn_resume(adev); diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c index 888b17d..5741504 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c @@ -152,7 +152,7 @@ static int vcn_v2_5_sw_init(void *handle) adev->firmware.fw_size += ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); } - DRM_INFO("PSP loading VCN firmware\n"); + DRM_INFO("VCN 2.5: Will use PSP to load VCN firmware\n"); } r = amdgpu_vcn_resume(adev); diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c index c3580de..b81eae3 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c @@ -158,7 +158,7 @@ static int vcn_v3_0_sw_init(void *handle) adev->firmware.fw_size += ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); } - DRM_INFO("PSP loading VCN firmware\n"); + DRM_INFO("VCN 3.0: Will use PSP to load VCN firmware\n"); } r = amdgpu_vcn_resume(adev); -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] drm/amdgpu: Fix a printing message 2021-07-14 15:25 ` [PATCH 2/3] drm/amdgpu: Fix a printing message Oak Zeng @ 2021-07-14 15:28 ` Christian König 2021-07-14 15:48 ` Alex Deucher 1 sibling, 0 replies; 11+ messages in thread From: Christian König @ 2021-07-14 15:28 UTC (permalink / raw) To: Oak Zeng, amd-gfx; +Cc: feifei.xu, Felix.Kuehling, leo.liu, hawking.zhang Am 14.07.21 um 17:25 schrieb Oak Zeng: > The printing message "PSP loading VCN firmware" is mis-leading because > people might think driver is loading VCN firmware. Actually when this > message is printed, driver is just preparing some VCN ucode, not loading > VCN firmware yet. The actual VCN firmware loading will be in the PSP block > hw_init. Fix the printing message > > Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > index 284bb42..1f8e902 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > @@ -119,7 +119,7 @@ static int vcn_v1_0_sw_init(void *handle) > adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 1.0: Will use PSP to load VCN firmware\n"); Good to have, but I'm not sure if we should have the VCN 1.0 prefix here. Christian. > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > index 8af567c..ebe4f2b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > @@ -122,7 +122,7 @@ static int vcn_v2_0_sw_init(void *handle) > adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 2.0: Will use PSP to load VCN firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > index 888b17d..5741504 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > @@ -152,7 +152,7 @@ static int vcn_v2_5_sw_init(void *handle) > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > } > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 2.5: Will use PSP to load VCN firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > index c3580de..b81eae3 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > @@ -158,7 +158,7 @@ static int vcn_v3_0_sw_init(void *handle) > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > } > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 3.0: Will use PSP to load VCN firmware\n"); > } > > r = amdgpu_vcn_resume(adev); _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] drm/amdgpu: Fix a printing message 2021-07-14 15:25 ` [PATCH 2/3] drm/amdgpu: Fix a printing message Oak Zeng 2021-07-14 15:28 ` Christian König @ 2021-07-14 15:48 ` Alex Deucher 2021-07-15 2:51 ` Chen, Jiansong (Simon) 1 sibling, 1 reply; 11+ messages in thread From: Alex Deucher @ 2021-07-14 15:48 UTC (permalink / raw) To: Oak Zeng; +Cc: Feifei Xu, Kuehling, Felix, Leo Liu, amd-gfx list, Hawking Zhang On Wed, Jul 14, 2021 at 11:25 AM Oak Zeng <Oak.Zeng@amd.com> wrote: > > The printing message "PSP loading VCN firmware" is mis-leading because > people might think driver is loading VCN firmware. Actually when this > message is printed, driver is just preparing some VCN ucode, not loading > VCN firmware yet. The actual VCN firmware loading will be in the PSP block > hw_init. Fix the printing message > > Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > index 284bb42..1f8e902 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > @@ -119,7 +119,7 @@ static int vcn_v1_0_sw_init(void *handle) > adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 1.0: Will use PSP to load VCN firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > index 8af567c..ebe4f2b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > @@ -122,7 +122,7 @@ static int vcn_v2_0_sw_init(void *handle) > adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 2.0: Will use PSP to load VCN firmware\n"); While you are here, switch to dev_info() so we get the device information in the output (in case we have multiple GPUs in a system). Alex > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > index 888b17d..5741504 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > @@ -152,7 +152,7 @@ static int vcn_v2_5_sw_init(void *handle) > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > } > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 2.5: Will use PSP to load VCN firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > index c3580de..b81eae3 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > @@ -158,7 +158,7 @@ static int vcn_v3_0_sw_init(void *handle) > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > } > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 3.0: Will use PSP to load VCN firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > -- > 2.7.4 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH 2/3] drm/amdgpu: Fix a printing message 2021-07-14 15:48 ` Alex Deucher @ 2021-07-15 2:51 ` Chen, Jiansong (Simon) 2021-07-15 2:54 ` Deucher, Alexander 0 siblings, 1 reply; 11+ messages in thread From: Chen, Jiansong (Simon) @ 2021-07-15 2:51 UTC (permalink / raw) To: Alex Deucher, Zeng, Oak Cc: Xu, Feifei, Kuehling, Felix, Liu, Leo, amd-gfx list, Zhang, Hawking [Public] Hi Alex, Is DRM_DEV_INFO more suitable than dev_info as far as DRM subsystem is concerned? Thanks! Regards, Jiansong -----Original Message----- From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher Sent: Wednesday, July 14, 2021 11:48 PM To: Zeng, Oak <Oak.Zeng@amd.com> Cc: Xu, Feifei <Feifei.Xu@amd.com>; Kuehling, Felix <Felix.Kuehling@amd.com>; Liu, Leo <Leo.Liu@amd.com>; amd-gfx list <amd-gfx@lists.freedesktop.org>; Zhang, Hawking <Hawking.Zhang@amd.com> Subject: Re: [PATCH 2/3] drm/amdgpu: Fix a printing message On Wed, Jul 14, 2021 at 11:25 AM Oak Zeng <Oak.Zeng@amd.com> wrote: > > The printing message "PSP loading VCN firmware" is mis-leading because > people might think driver is loading VCN firmware. Actually when this > message is printed, driver is just preparing some VCN ucode, not > loading VCN firmware yet. The actual VCN firmware loading will be in > the PSP block hw_init. Fix the printing message > > Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > index 284bb42..1f8e902 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > @@ -119,7 +119,7 @@ static int vcn_v1_0_sw_init(void *handle) > adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 1.0: Will use PSP to load VCN > + firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > index 8af567c..ebe4f2b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > @@ -122,7 +122,7 @@ static int vcn_v2_0_sw_init(void *handle) > adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 2.0: Will use PSP to load VCN > + firmware\n"); While you are here, switch to dev_info() so we get the device information in the output (in case we have multiple GPUs in a system). Alex > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > index 888b17d..5741504 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > @@ -152,7 +152,7 @@ static int vcn_v2_5_sw_init(void *handle) > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > } > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 2.5: Will use PSP to load VCN > + firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > index c3580de..b81eae3 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > @@ -158,7 +158,7 @@ static int vcn_v3_0_sw_init(void *handle) > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > } > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 3.0: Will use PSP to load VCN > + firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > -- > 2.7.4 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist > s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CJi > ansong.Chen%40amd.com%7C051da5b064d944f4c0a908d946ded869%7C3dd8961fe48 > 84e608e11a82d994e183d%7C0%7C0%7C637618745208108548%7CUnknown%7CTWFpbGZ > sb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3 > D%7C1000&sdata=WpGaXXjVSQEjcRgg0E%2FUjRMZT%2FDRe05nwG6xiDJjRbk%3D& > amp;reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CJiansong.Chen%40amd.com%7C051da5b064d944f4c0a908d946ded869%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637618745208108548%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WpGaXXjVSQEjcRgg0E%2FUjRMZT%2FDRe05nwG6xiDJjRbk%3D&reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] drm/amdgpu: Fix a printing message 2021-07-15 2:51 ` Chen, Jiansong (Simon) @ 2021-07-15 2:54 ` Deucher, Alexander 2021-07-15 2:56 ` Chen, Jiansong (Simon) 0 siblings, 1 reply; 11+ messages in thread From: Deucher, Alexander @ 2021-07-15 2:54 UTC (permalink / raw) To: Chen, Jiansong (Simon), Alex Deucher, Zeng, Oak Cc: Xu, Feifei, Kuehling, Felix, Liu, Leo, amd-gfx list, Zhang, Hawking [-- Attachment #1.1: Type: text/plain, Size: 6440 bytes --] [Public] I think it's more consistent to use dev_info since we already use that pretty extensively in the driver. Alex ________________________________ From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Chen, Jiansong (Simon) <Jiansong.Chen@amd.com> Sent: Wednesday, July 14, 2021 10:51 PM To: Alex Deucher <alexdeucher@gmail.com>; Zeng, Oak <Oak.Zeng@amd.com> Cc: Xu, Feifei <Feifei.Xu@amd.com>; Kuehling, Felix <Felix.Kuehling@amd.com>; Liu, Leo <Leo.Liu@amd.com>; amd-gfx list <amd-gfx@lists.freedesktop.org>; Zhang, Hawking <Hawking.Zhang@amd.com> Subject: RE: [PATCH 2/3] drm/amdgpu: Fix a printing message [Public] [Public] Hi Alex, Is DRM_DEV_INFO more suitable than dev_info as far as DRM subsystem is concerned? Thanks! Regards, Jiansong -----Original Message----- From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher Sent: Wednesday, July 14, 2021 11:48 PM To: Zeng, Oak <Oak.Zeng@amd.com> Cc: Xu, Feifei <Feifei.Xu@amd.com>; Kuehling, Felix <Felix.Kuehling@amd.com>; Liu, Leo <Leo.Liu@amd.com>; amd-gfx list <amd-gfx@lists.freedesktop.org>; Zhang, Hawking <Hawking.Zhang@amd.com> Subject: Re: [PATCH 2/3] drm/amdgpu: Fix a printing message On Wed, Jul 14, 2021 at 11:25 AM Oak Zeng <Oak.Zeng@amd.com> wrote: > > The printing message "PSP loading VCN firmware" is mis-leading because > people might think driver is loading VCN firmware. Actually when this > message is printed, driver is just preparing some VCN ucode, not > loading VCN firmware yet. The actual VCN firmware loading will be in > the PSP block hw_init. Fix the printing message > > Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > index 284bb42..1f8e902 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > @@ -119,7 +119,7 @@ static int vcn_v1_0_sw_init(void *handle) > adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 1.0: Will use PSP to load VCN > + firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > index 8af567c..ebe4f2b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > @@ -122,7 +122,7 @@ static int vcn_v2_0_sw_init(void *handle) > adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 2.0: Will use PSP to load VCN > + firmware\n"); While you are here, switch to dev_info() so we get the device information in the output (in case we have multiple GPUs in a system). Alex > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > index 888b17d..5741504 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > @@ -152,7 +152,7 @@ static int vcn_v2_5_sw_init(void *handle) > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > } > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 2.5: Will use PSP to load VCN > + firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > index c3580de..b81eae3 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > @@ -158,7 +158,7 @@ static int vcn_v3_0_sw_init(void *handle) > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > } > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 3.0: Will use PSP to load VCN > + firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > -- > 2.7.4 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist > s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CJi > ansong.Chen%40amd.com%7C051da5b064d944f4c0a908d946ded869%7C3dd8961fe48 > 84e608e11a82d994e183d%7C0%7C0%7C637618745208108548%7CUnknown%7CTWFpbGZ > sb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3 > D%7C1000&sdata=WpGaXXjVSQEjcRgg0E%2FUjRMZT%2FDRe05nwG6xiDJjRbk%3D& > amp;reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7Ce7e186e3c28f4131fdc008d9473b8643%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637619143252510438%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1rIdDQqiz9t9NVditEbTRR6qeqvucqhCvnsg7obVA9c%3D&reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7Ce7e186e3c28f4131fdc008d9473b8643%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637619143252520390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZhcsiGqrIcLHktlp0RBx1qwFJp6RI0nP%2BFFUxddKlRo%3D&reserved=0 [-- Attachment #1.2: Type: text/html, Size: 11804 bytes --] [-- Attachment #2: Type: text/plain, Size: 154 bytes --] _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH 2/3] drm/amdgpu: Fix a printing message 2021-07-15 2:54 ` Deucher, Alexander @ 2021-07-15 2:56 ` Chen, Jiansong (Simon) 0 siblings, 0 replies; 11+ messages in thread From: Chen, Jiansong (Simon) @ 2021-07-15 2:56 UTC (permalink / raw) To: Deucher, Alexander, Alex Deucher, Zeng, Oak Cc: Xu, Feifei, Kuehling, Felix, Liu, Leo, amd-gfx list, Zhang, Hawking [-- Attachment #1.1: Type: text/plain, Size: 7629 bytes --] [Public] Ok, I see. Thanks! Regards, Jiansong From: Deucher, Alexander <Alexander.Deucher@amd.com> Sent: Thursday, July 15, 2021 10:55 AM To: Chen, Jiansong (Simon) <Jiansong.Chen@amd.com>; Alex Deucher <alexdeucher@gmail.com>; Zeng, Oak <Oak.Zeng@amd.com> Cc: Xu, Feifei <Feifei.Xu@amd.com>; Kuehling, Felix <Felix.Kuehling@amd.com>; Liu, Leo <Leo.Liu@amd.com>; amd-gfx list <amd-gfx@lists.freedesktop.org>; Zhang, Hawking <Hawking.Zhang@amd.com> Subject: Re: [PATCH 2/3] drm/amdgpu: Fix a printing message [Public] I think it's more consistent to use dev_info since we already use that pretty extensively in the driver. Alex ________________________________ From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org<mailto:amd-gfx-bounces@lists.freedesktop.org>> on behalf of Chen, Jiansong (Simon) <Jiansong.Chen@amd.com<mailto:Jiansong.Chen@amd.com>> Sent: Wednesday, July 14, 2021 10:51 PM To: Alex Deucher <alexdeucher@gmail.com<mailto:alexdeucher@gmail.com>>; Zeng, Oak <Oak.Zeng@amd.com<mailto:Oak.Zeng@amd.com>> Cc: Xu, Feifei <Feifei.Xu@amd.com<mailto:Feifei.Xu@amd.com>>; Kuehling, Felix <Felix.Kuehling@amd.com<mailto:Felix.Kuehling@amd.com>>; Liu, Leo <Leo.Liu@amd.com<mailto:Leo.Liu@amd.com>>; amd-gfx list <amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>>; Zhang, Hawking <Hawking.Zhang@amd.com<mailto:Hawking.Zhang@amd.com>> Subject: RE: [PATCH 2/3] drm/amdgpu: Fix a printing message [Public] [Public] Hi Alex, Is DRM_DEV_INFO more suitable than dev_info as far as DRM subsystem is concerned? Thanks! Regards, Jiansong -----Original Message----- From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org<mailto:amd-gfx-bounces@lists.freedesktop.org>> On Behalf Of Alex Deucher Sent: Wednesday, July 14, 2021 11:48 PM To: Zeng, Oak <Oak.Zeng@amd.com<mailto:Oak.Zeng@amd.com>> Cc: Xu, Feifei <Feifei.Xu@amd.com<mailto:Feifei.Xu@amd.com>>; Kuehling, Felix <Felix.Kuehling@amd.com<mailto:Felix.Kuehling@amd.com>>; Liu, Leo <Leo.Liu@amd.com<mailto:Leo.Liu@amd.com>>; amd-gfx list <amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>>; Zhang, Hawking <Hawking.Zhang@amd.com<mailto:Hawking.Zhang@amd.com>> Subject: Re: [PATCH 2/3] drm/amdgpu: Fix a printing message On Wed, Jul 14, 2021 at 11:25 AM Oak Zeng <Oak.Zeng@amd.com<mailto:Oak.Zeng@amd.com>> wrote: > > The printing message "PSP loading VCN firmware" is mis-leading because > people might think driver is loading VCN firmware. Actually when this > message is printed, driver is just preparing some VCN ucode, not > loading VCN firmware yet. The actual VCN firmware loading will be in > the PSP block hw_init. Fix the printing message > > Signed-off-by: Oak Zeng <Oak.Zeng@amd.com<mailto:Oak.Zeng@amd.com>> > --- > drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 +- > drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > index 284bb42..1f8e902 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c > @@ -119,7 +119,7 @@ static int vcn_v1_0_sw_init(void *handle) > adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 1.0: Will use PSP to load VCN > + firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > index 8af567c..ebe4f2b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c > @@ -122,7 +122,7 @@ static int vcn_v2_0_sw_init(void *handle) > adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 2.0: Will use PSP to load VCN > + firmware\n"); While you are here, switch to dev_info() so we get the device information in the output (in case we have multiple GPUs in a system). Alex > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > index 888b17d..5741504 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c > @@ -152,7 +152,7 @@ static int vcn_v2_5_sw_init(void *handle) > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > } > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 2.5: Will use PSP to load VCN > + firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > index c3580de..b81eae3 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c > @@ -158,7 +158,7 @@ static int vcn_v3_0_sw_init(void *handle) > adev->firmware.fw_size += > ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); > } > - DRM_INFO("PSP loading VCN firmware\n"); > + DRM_INFO("VCN 3.0: Will use PSP to load VCN > + firmware\n"); > } > > r = amdgpu_vcn_resume(adev); > -- > 2.7.4 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist > s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CJi > ansong.Chen%40amd.com%7C051da5b064d944f4c0a908d946ded869%7C3dd8961fe48 > 84e608e11a82d994e183d%7C0%7C0%7C637618745208108548%7CUnknown%7CTWFpbGZ > sb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3 > D%7C1000&sdata=WpGaXXjVSQEjcRgg0E%2FUjRMZT%2FDRe05nwG6xiDJjRbk%3D& > amp;reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7Ce7e186e3c28f4131fdc008d9473b8643%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637619143252510438%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1rIdDQqiz9t9NVditEbTRR6qeqvucqhCvnsg7obVA9c%3D&reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7Ce7e186e3c28f4131fdc008d9473b8643%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637619143252520390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZhcsiGqrIcLHktlp0RBx1qwFJp6RI0nP%2BFFUxddKlRo%3D&reserved=0 [-- Attachment #1.2: Type: text/html, Size: 15605 bytes --] [-- Attachment #2: Type: text/plain, Size: 154 bytes --] _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/3] drm/amdgpu: Change a few function names 2021-07-14 15:25 [PATCH 0/3] MISC fixes Oak Zeng 2021-07-14 15:25 ` [PATCH 1/3] drm/amdkfd: Disallow debugfs to hang hws when GPU is resetting Oak Zeng 2021-07-14 15:25 ` [PATCH 2/3] drm/amdgpu: Fix a printing message Oak Zeng @ 2021-07-14 15:25 ` Oak Zeng 2021-07-14 15:50 ` Alex Deucher 2 siblings, 1 reply; 11+ messages in thread From: Oak Zeng @ 2021-07-14 15:25 UTC (permalink / raw) To: amd-gfx; +Cc: feifei.xu, Felix.Kuehling, leo.liu, Oak Zeng, hawking.zhang Function name "psp_np_fw_load" is not proper as people don't know _np_fw_ means "non psp firmware". Change the function name to psp_load_non_psp_fw for better understanding. Same thing for function psp_execute_np_fw_load. Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index d9ddb2c..8d1e2b2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -2351,7 +2351,7 @@ static int psp_prep_load_ip_fw_cmd_buf(struct amdgpu_firmware_info *ucode, return ret; } -static int psp_execute_np_fw_load(struct psp_context *psp, +static int psp_execute_non_psp_fw_load(struct psp_context *psp, struct amdgpu_firmware_info *ucode) { int ret = 0; @@ -2387,7 +2387,7 @@ static int psp_load_smu_fw(struct psp_context *psp) } } - ret = psp_execute_np_fw_load(psp, ucode); + ret = psp_execute_non_psp_fw_load(psp, ucode); if (ret) DRM_ERROR("PSP load smu failed!\n"); @@ -2442,14 +2442,14 @@ int psp_load_fw_list(struct psp_context *psp, for (i = 0; i < ucode_count; ++i) { ucode = ucode_list[i]; psp_print_fw_hdr(psp, ucode); - ret = psp_execute_np_fw_load(psp, ucode); + ret = psp_execute_non_psp_fw_load(psp, ucode); if (ret) return ret; } return ret; } -static int psp_np_fw_load(struct psp_context *psp) +static int psp_load_non_psp_fw(struct psp_context *psp) { int i, ret; struct amdgpu_firmware_info *ucode; @@ -2488,7 +2488,7 @@ static int psp_np_fw_load(struct psp_context *psp) psp_print_fw_hdr(psp, ucode); - ret = psp_execute_np_fw_load(psp, ucode); + ret = psp_execute_non_psp_fw_load(psp, ucode); if (ret) return ret; @@ -2565,7 +2565,7 @@ static int psp_load_fw(struct amdgpu_device *adev) if (ret) goto failed; - ret = psp_np_fw_load(psp); + ret = psp_load_non_psp_fw(psp); if (ret) goto failed; @@ -2765,7 +2765,7 @@ static int psp_resume(void *handle) if (ret) goto failed; - ret = psp_np_fw_load(psp); + ret = psp_load_non_psp_fw(psp); if (ret) goto failed; @@ -2863,7 +2863,7 @@ int psp_update_vcn_sram(struct amdgpu_device *adev, int inst_idx, ucode.mc_addr = cmd_gpu_addr; ucode.ucode_size = cmd_size; - return psp_execute_np_fw_load(&adev->psp, &ucode); + return psp_execute_non_psp_fw_load(&adev->psp, &ucode); } int psp_ring_cmd_submit(struct psp_context *psp, -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] drm/amdgpu: Change a few function names 2021-07-14 15:25 ` [PATCH 3/3] drm/amdgpu: Change a few function names Oak Zeng @ 2021-07-14 15:50 ` Alex Deucher 0 siblings, 0 replies; 11+ messages in thread From: Alex Deucher @ 2021-07-14 15:50 UTC (permalink / raw) To: Oak Zeng; +Cc: Feifei Xu, Kuehling, Felix, Leo Liu, amd-gfx list, Hawking Zhang On Wed, Jul 14, 2021 at 11:25 AM Oak Zeng <Oak.Zeng@amd.com> wrote: > > Function name "psp_np_fw_load" is not proper as people don't > know _np_fw_ means "non psp firmware". Change the function > name to psp_load_non_psp_fw for better understanding. Same > thing for function psp_execute_np_fw_load. > > Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > index d9ddb2c..8d1e2b2 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > @@ -2351,7 +2351,7 @@ static int psp_prep_load_ip_fw_cmd_buf(struct amdgpu_firmware_info *ucode, > return ret; > } > > -static int psp_execute_np_fw_load(struct psp_context *psp, > +static int psp_execute_non_psp_fw_load(struct psp_context *psp, > struct amdgpu_firmware_info *ucode) > { > int ret = 0; > @@ -2387,7 +2387,7 @@ static int psp_load_smu_fw(struct psp_context *psp) > } > } > > - ret = psp_execute_np_fw_load(psp, ucode); > + ret = psp_execute_non_psp_fw_load(psp, ucode); > > if (ret) > DRM_ERROR("PSP load smu failed!\n"); > @@ -2442,14 +2442,14 @@ int psp_load_fw_list(struct psp_context *psp, > for (i = 0; i < ucode_count; ++i) { > ucode = ucode_list[i]; > psp_print_fw_hdr(psp, ucode); > - ret = psp_execute_np_fw_load(psp, ucode); > + ret = psp_execute_non_psp_fw_load(psp, ucode); > if (ret) > return ret; > } > return ret; > } > > -static int psp_np_fw_load(struct psp_context *psp) > +static int psp_load_non_psp_fw(struct psp_context *psp) > { > int i, ret; > struct amdgpu_firmware_info *ucode; > @@ -2488,7 +2488,7 @@ static int psp_np_fw_load(struct psp_context *psp) > > psp_print_fw_hdr(psp, ucode); > > - ret = psp_execute_np_fw_load(psp, ucode); > + ret = psp_execute_non_psp_fw_load(psp, ucode); > if (ret) > return ret; > > @@ -2565,7 +2565,7 @@ static int psp_load_fw(struct amdgpu_device *adev) > if (ret) > goto failed; > > - ret = psp_np_fw_load(psp); > + ret = psp_load_non_psp_fw(psp); > if (ret) > goto failed; > > @@ -2765,7 +2765,7 @@ static int psp_resume(void *handle) > if (ret) > goto failed; > > - ret = psp_np_fw_load(psp); > + ret = psp_load_non_psp_fw(psp); > if (ret) > goto failed; > > @@ -2863,7 +2863,7 @@ int psp_update_vcn_sram(struct amdgpu_device *adev, int inst_idx, > ucode.mc_addr = cmd_gpu_addr; > ucode.ucode_size = cmd_size; > > - return psp_execute_np_fw_load(&adev->psp, &ucode); > + return psp_execute_non_psp_fw_load(&adev->psp, &ucode); > } > > int psp_ring_cmd_submit(struct psp_context *psp, > -- > 2.7.4 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-07-15 2:56 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-07-14 15:25 [PATCH 0/3] MISC fixes Oak Zeng 2021-07-14 15:25 ` [PATCH 1/3] drm/amdkfd: Disallow debugfs to hang hws when GPU is resetting Oak Zeng 2021-07-14 16:04 ` Felix Kuehling 2021-07-14 15:25 ` [PATCH 2/3] drm/amdgpu: Fix a printing message Oak Zeng 2021-07-14 15:28 ` Christian König 2021-07-14 15:48 ` Alex Deucher 2021-07-15 2:51 ` Chen, Jiansong (Simon) 2021-07-15 2:54 ` Deucher, Alexander 2021-07-15 2:56 ` Chen, Jiansong (Simon) 2021-07-14 15:25 ` [PATCH 3/3] drm/amdgpu: Change a few function names Oak Zeng 2021-07-14 15:50 ` Alex Deucher
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.