Re: [RFC PATCH 2/3] drm/amdgpu: Add range param to amdgpu_vm_update_range

2023-01-03 Thread Christian König
Am 21.12.22 um 00:27 schrieb Felix Kuehling: This allows page table updates to be coordinated with interval notifiers to avoid writing stale page table entries to the pabe table. Moving the critical section inside the page table update avoids lock dependencies with page table allocations under th

Re: [PATCH 1/2] drm/amdgpu: return the PCIe gen and lanes from the INFO

2023-01-03 Thread Christian König
Sure they can, those files are accessible to everyone. The massive advantage is that this is standard for all PCIe devices, so it should work vendor independent. Christian. Am 02.01.23 um 18:55 schrieb Marek Olšák: Userspace drivers can't access sysfs. Marek On Mon, Jan 2, 2023, 10:54 Chri

Re: [PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2023-01-03 Thread youling 257
which patch? 2023-01-02 17:24 GMT+08:00, Dmitry Osipenko : > On 1/1/23 21:29, youling257 wrote: >> Linux 6.2-rc1 has memory leak on amdgpu, git bisect bad commit is >> "drm/scheduler: rework entity flush, kill and fini". >> git bisect start >> # status: waiting for both good and bad commits >> # g

Re: [PATCH 12/13] drm/scheduler: rework entity flush, kill and fini

2023-01-03 Thread Dmitry Osipenko
On 1/2/23 17:17, youling 257 wrote: > which patch? https://patchwork.freedesktop.org/patch/512652/ I applied it to next-fixes -- Best regards, Dmitry

Re: [PATCH 2/2] drm/amdgpu: add AMDGPU_INFO_VM_STAT to return GPU VM

2023-01-03 Thread Christian König
Take a look at /proc/self/fdinfo/$fd. The Intel guys made that vendor agnostic and are using it within their IGT gpu top tool. Christian. Am 02.01.23 um 18:57 schrieb Marek Olšák: What are you talking about? Is fdinfo in sysfs? Userspace drivers can't access sysfs. Marek On Mon, Jan 2, 20

Re: [PATCH] drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency

2023-01-03 Thread Christian König
I assume that this was already upstreamed while I was on sick leave? Thanks, Christian. Am 21.12.22 um 22:10 schrieb Alex Deucher: Applied. Thanks! Alex On Mon, Dec 19, 2022 at 3:01 PM Borislav Petkov wrote: On Mon, Dec 19, 2022 at 11:47:18AM +0100, Christian König wrote: That function co

Re: [PATCH] [RFC] drm/drm_buddy fails to initialize on 32-bit architectures

2023-01-03 Thread Christian König
Am 25.12.22 um 20:39 schrieb Luís Mendes: Re-sending with the correct linux-kernel mailing list email address. Sorry for the inconvenience. The proposed patch fixes the issue and allows amdgpu to work again on armhf with a AMD RX 550 card, however it may not be the best solution for the issue,

Re: [RFC 2/7] drm/amdgpu: Add usermode queue for gfx work

2023-01-03 Thread Shashank Sharma
On 02/01/2023 13:39, Christian König wrote: Hi Shashank, Am 26.12.22 um 11:41 schrieb Shashank Sharma: [SNIP]     /* df */   struct amdgpu_df    df; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h index 0fa0e56daf67..f74138

Re: [RFC 2/7] drm/amdgpu: Add usermode queue for gfx work

2023-01-03 Thread Christian König
Am 03.01.23 um 10:12 schrieb Shashank Sharma: On 02/01/2023 13:39, Christian König wrote: Hi Shashank, Am 26.12.22 um 11:41 schrieb Shashank Sharma: [SNIP]     /* df */   struct amdgpu_df    df; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h b/drivers/gpu/drm/amd/a

Re: [RFC 2/7] drm/amdgpu: Add usermode queue for gfx work

2023-01-03 Thread Shashank Sharma
On 29/12/2022 18:41, Alex Deucher wrote: On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma wrote: This patch adds skeleton code for usermode queue creation. It typically contains: - A new structure to keep all the user queue data in one place. - An IOCTL function to create/free a usermode queue

Re: [RFC 2/7] drm/amdgpu: Add usermode queue for gfx work

2023-01-03 Thread Shashank Sharma
On 03/01/2023 10:15, Christian König wrote: Am 03.01.23 um 10:12 schrieb Shashank Sharma: On 02/01/2023 13:39, Christian König wrote: Hi Shashank, Am 26.12.22 um 11:41 schrieb Shashank Sharma: [SNIP]     /* df */   struct amdgpu_df    df; diff --git a/drivers/gpu/drm/a

Re: [RFC 2/7] drm/amdgpu: Add usermode queue for gfx work

2023-01-03 Thread Shashank Sharma
On 02/01/2023 14:53, Christian König wrote: Am 29.12.22 um 18:41 schrieb Alex Deucher: On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma wrote: This patch adds skeleton code for usermode queue creation. It typically contains: - A new structure to keep all the user queue data in one place. - An

Re: [RFC 2/7] drm/amdgpu: Add usermode queue for gfx work

2023-01-03 Thread Christian König
Am 03.01.23 um 10:22 schrieb Shashank Sharma: On 03/01/2023 10:15, Christian König wrote: Am 03.01.23 um 10:12 schrieb Shashank Sharma: On 02/01/2023 13:39, Christian König wrote: Hi Shashank, Am 26.12.22 um 11:41 schrieb Shashank Sharma: [SNIP]     /* df */   struct amdgpu_df

Re: [RFC 3/7] drm/amdgpu: Create MQD for userspace queue

2023-01-03 Thread Shashank Sharma
On 29/12/2022 18:47, Alex Deucher wrote: On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma wrote: From: Arvind Yadav MQD describes the properies of a user queue to the HW, and allows it to accurately configure the queue while mapping it in GPU HW. This patch adds: - A new header file which co

Re: [RFC 4/7] drm/amdgpu: Allocate doorbell slot for user queue

2023-01-03 Thread Shashank Sharma
On 29/12/2022 18:50, Alex Deucher wrote: On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma wrote: This patch allocates a doorbell slot in the bar, for the usermode queue. We are using the unique queue-id to get this slot from MES. We should manage the doorbell BAR just like VRAM. I had a set

Re: [RFC 6/7] drm/amdgpu: Map userqueue into HW

2023-01-03 Thread Shashank Sharma
On 29/12/2022 18:51, Alex Deucher wrote: On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma wrote: This patch add the function to map/unmap the usermode queue into the HW, using the prepared MQD and other objects. After this mapping, the queue will be ready to accept the workload. This should a

Re: [RFC 5/7] drm/amdgpu: Create context for usermode queue

2023-01-03 Thread Shashank Sharma
On 29/12/2022 18:54, Alex Deucher wrote: On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma wrote: The FW expects us to allocate atleast one page as process context space, and one for gang context space. This patch adds some object for the same. This should be handled in the IP specific code fo

Re: [RFC 0/7] RFC: Usermode queue for AMDGPU driver

2023-01-03 Thread Shashank Sharma
On 29/12/2022 19:02, Alex Deucher wrote: On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma wrote: This is a RFC series to implement usermode graphics queues for AMDGPU driver (Navi 3X and above). The idea of usermode graphics queue is to allow direct workload submission from a userspace graphic

Re: [RFC 0/7] RFC: Usermode queue for AMDGPU driver

2023-01-03 Thread Christian König
Am 03.01.23 um 10:43 schrieb Shashank Sharma: On 29/12/2022 19:02, Alex Deucher wrote: On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma wrote: This is a RFC series to implement usermode graphics queues for AMDGPU driver (Navi 3X and above). The idea of usermode graphics queue is to allow direc

Re: [RFC 0/7] RFC: Usermode queue for AMDGPU driver

2023-01-03 Thread Shashank Sharma
On 03/01/2023 10:47, Christian König wrote: Am 03.01.23 um 10:43 schrieb Shashank Sharma: On 29/12/2022 19:02, Alex Deucher wrote: On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma wrote: This is a RFC series to implement usermode graphics queues for AMDGPU driver (Navi 3X and above). The id

Re: [RFC 0/7] RFC: Usermode queue for AMDGPU driver

2023-01-03 Thread Christian König
Am 03.01.23 um 11:00 schrieb Shashank Sharma: On 03/01/2023 10:47, Christian König wrote: Am 03.01.23 um 10:43 schrieb Shashank Sharma: On 29/12/2022 19:02, Alex Deucher wrote: On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma wrote: This is a RFC series to implement usermode graphics queues

Re: [PATCH v2 00/11] Recover from failure to probe GPU

2023-01-03 Thread Lazar, Lijo
On 12/28/2022 10:00 PM, Mario Limonciello wrote: One of the first thing that KMS drivers do during initialization is destroy the system firmware framebuffer by means of `drm_aperture_remove_conflicting_pci_framebuffers` This means that if for any reason the GPU failed to probe the user will b

Re: [PATCH AUTOSEL 5.15 24/27] Revert "drm/amdgpu: Revert "drm/amdgpu: getting fan speed pwm for vega10 properly""

2023-01-03 Thread Yury Zhuravlev
Hello! Why is this revert for revert coming for 6.1 but reverted again for 6.1.2? My GPU is not working correctly again! https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.2 It seems like somebody made a mistake and pick up the wrong patch for the stable channel. Regards! On Sat, Nov 19

Re: [PATCH 09/18] vfio-mdev/mdpy-fb: Do not set struct fb_info.apertures

2023-01-03 Thread Thomas Zimmermann
Am 20.12.22 um 10:32 schrieb Javier Martinez Canillas: [adding Kirti Wankhede and k...@vger.kernel.org to Cc list] On 12/19/22 17:05, Thomas Zimmermann wrote: Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do

Re: [PATCH v2 00/11] Recover from failure to probe GPU

2023-01-03 Thread Alex Deucher
On Tue, Jan 3, 2023 at 5:10 AM Lazar, Lijo wrote: > > > > On 12/28/2022 10:00 PM, Mario Limonciello wrote: > > One of the first thing that KMS drivers do during initialization is > > destroy the system firmware framebuffer by means of > > `drm_aperture_remove_conflicting_pci_framebuffers` > > > >

Re: [RFC 1/7] drm/amdgpu: UAPI for user queue management

2023-01-03 Thread Alex Deucher
On Mon, Jan 2, 2023 at 8:26 AM Christian König wrote: > > Am 23.12.22 um 20:36 schrieb Shashank Sharma: > > From: Alex Deucher > > > > This patch intorduces new UAPI/IOCTL for usermode graphics > > queue. The userspace app will fill this structure and request > > the graphics driver to add a grap

Re: [PATCH] drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency

2023-01-03 Thread Alex Deucher
On Tue, Jan 3, 2023 at 3:34 AM Christian König wrote: > > I assume that this was already upstreamed while I was on sick leave? Yes. Alex > > Thanks, > Christian. > > Am 21.12.22 um 22:10 schrieb Alex Deucher: > > Applied. Thanks! > > > > Alex > > > > On Mon, Dec 19, 2022 at 3:01 PM Borislav P

Re: [PATCH] drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency

2023-01-03 Thread Michel Dänzer
On 1/3/23 15:26, Alex Deucher wrote: > On Tue, Jan 3, 2023 at 3:34 AM Christian König > wrote: >> >> I assume that this was already upstreamed while I was on sick leave? > > Yes. Though there seem to be more issues still, see comments on https://gitlab.freedesktop.org/drm/amd/-/issues/2309 .

Re: [RFC 2/7] drm/amdgpu: Add usermode queue for gfx work

2023-01-03 Thread Alex Deucher
On Tue, Jan 3, 2023 at 4:35 AM Christian König wrote: > > Am 03.01.23 um 10:22 schrieb Shashank Sharma: > > > > On 03/01/2023 10:15, Christian König wrote: > >> Am 03.01.23 um 10:12 schrieb Shashank Sharma: > >>> > >>> On 02/01/2023 13:39, Christian König wrote: > Hi Shashank, > > A

Re: [RFC 5/7] drm/amdgpu: Create context for usermode queue

2023-01-03 Thread Alex Deucher
On Tue, Jan 3, 2023 at 4:40 AM Shashank Sharma wrote: > > > On 29/12/2022 18:54, Alex Deucher wrote: > > On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma > > wrote: > >> The FW expects us to allocate atleast one page as process > >> context space, and one for gang context space. This patch adds s

Re: [RFC 2/7] drm/amdgpu: Add usermode queue for gfx work

2023-01-03 Thread Christian König
Am 03.01.23 um 15:34 schrieb Alex Deucher: On Tue, Jan 3, 2023 at 4:35 AM Christian König wrote: Am 03.01.23 um 10:22 schrieb Shashank Sharma: On 03/01/2023 10:15, Christian König wrote: Am 03.01.23 um 10:12 schrieb Shashank Sharma: On 02/01/2023 13:39, Christian König wrote: Hi Shashank,

Re: [syzbot] WARNING: locking bug in inet_autobind

2023-01-03 Thread Felix Kuehling
The regression point doesn't make sense. The kernel config doesn't enable CONFIG_DRM_AMDGPU, so there is no way that a change in AMDGPU could have caused this regression. Regards,   Felix Am 2022-12-29 um 01:26 schrieb syzbot: syzbot has found a reproducer for the following issue on: HEAD c

Re: [syzbot] WARNING: locking bug in inet_autobind

2023-01-03 Thread Felix Kuehling
Am 2023-01-03 um 11:05 schrieb Waiman Long: On 1/3/23 10:39, Felix Kuehling wrote: The regression point doesn't make sense. The kernel config doesn't enable CONFIG_DRM_AMDGPU, so there is no way that a change in AMDGPU could have caused this regression. I agree. It is likely a pre-existing

[PATCH] drm/amdgpu: allow query error counters for specific IP block

2023-01-03 Thread Hawking Zhang
amdgpu_ras_block_late_init will be invoked in IP specific ras_late_init call as a common helper for all the IP blocks. However, when amdgpu_ras_block_late_init call amdgpu_ras_query_error_count to query ras error counters, amdgpu_ras_query_error_count queries all the IP blocks that support ras que

Re: [RFC 1/7] drm/amdgpu: UAPI for user queue management

2023-01-03 Thread Felix Kuehling
Am 2022-12-23 um 14:36 schrieb Shashank Sharma: From: Alex Deucher This patch intorduces new UAPI/IOCTL for usermode graphics queue. The userspace app will fill this structure and request the graphics driver to add a graphics work queue for it. The output of this UAPI is a queue id. This UAPI

Re: [RFC 3/7] drm/amdgpu: Create MQD for userspace queue

2023-01-03 Thread Felix Kuehling
Am 2023-01-03 um 04:36 schrieb Shashank Sharma: /*MQD struct for usermode Queue*/ +struct amdgpu_usermode_queue_mqd This is specific to GC 11.  Every IP and version will have its own MQD format.  That should live in the IP specific code, not the generic code.  We already have the generic MQD par

[PATCH AUTOSEL 6.1 04/10] drm/amd/display: Report to ACPI video if no panels were found

2023-01-03 Thread Sasha Levin
From: Mario Limonciello [ Upstream commit c573e240609ff781a0246c0c8c8351abd0475287 ] On desktop APUs amdgpu doesn't create a native backlight device as no eDP panels are found. However if the BIOS has reported backlight control methods in the ACPI tables then an acpi_video0 backlight device wil

RE: [RFC 1/7] drm/amdgpu: UAPI for user queue management

2023-01-03 Thread Liu, Shaoyun
[AMD Official Use Only - General] Hsakmt has the interfaces for compute user queue. Do we want a unify API for both graphic and compute ? Regards Shaoyun.liu -Original Message- From: amd-gfx On Behalf Of Felix Kuehling Sent: Tuesday, January 3, 2023 1:30 PM To: Sharma, Shashank ;

Re: [RFC 1/7] drm/amdgpu: UAPI for user queue management

2023-01-03 Thread Alex Deucher
On Tue, Jan 3, 2023 at 1:30 PM Felix Kuehling wrote: > > Am 2022-12-23 um 14:36 schrieb Shashank Sharma: > > From: Alex Deucher > > > > This patch intorduces new UAPI/IOCTL for usermode graphics > > queue. The userspace app will fill this structure and request > > the graphics driver to add a gra

Re: [RFC 1/7] drm/amdgpu: UAPI for user queue management

2023-01-03 Thread Alex Deucher
On Tue, Jan 3, 2023 at 2:17 PM Liu, Shaoyun wrote: > > [AMD Official Use Only - General] > > Hsakmt has the interfaces for compute user queue. Do we want a unify API > for both graphic and compute ? Yeah, that is the eventual goal, hence the flag for AQL vs PM4. Alex > > Regards > Shaoyun

RE: [RFC 1/7] drm/amdgpu: UAPI for user queue management

2023-01-03 Thread Liu, Shaoyun
[AMD Official Use Only - General] What about the existing rocm apps that already use the hsakmt APIs for user queue ? Shaoyun.liu -Original Message- From: Alex Deucher Sent: Tuesday, January 3, 2023 2:22 PM To: Liu, Shaoyun Cc: Kuehling, Felix ; Sharma, Shashank ; amd-gfx@lists.free

Re: [RFC 1/7] drm/amdgpu: UAPI for user queue management

2023-01-03 Thread Alex Deucher
On Mon, Jan 2, 2023 at 6:27 AM Christian König wrote: > > Am 27.12.22 um 17:58 schrieb Alex Deucher: > > On Sat, Dec 24, 2022 at 3:21 PM Bas Nieuwenhuizen > > wrote: > >> On Fri, Dec 23, 2022 at 8:37 PM Shashank Sharma > >> wrote: > >>> From: Alex Deucher > >>> > >>> This patch intorduces new

Re: [RFC 1/7] drm/amdgpu: UAPI for user queue management

2023-01-03 Thread Alex Deucher
On Tue, Jan 3, 2023 at 2:25 PM Liu, Shaoyun wrote: > > [AMD Official Use Only - General] > > What about the existing rocm apps that already use the hsakmt APIs for user > queue ? We'd have to keep both APIs around for existing chips for backwards compatibility. Alex > > Shaoyun.liu > > -O

Re: [RFC 1/7] drm/amdgpu: UAPI for user queue management

2023-01-03 Thread Felix Kuehling
I think at some point ROCr could start using libdrm APIs for memory management and user mode queues on kernels and GPUs that support this. I think more work is required on the memory management side, though. ROCr would fallback to libhsakmt on older kernels and older GPUs (pre-GFX11). Regards,

Re: [PATCH] drm/amdkfd: simplify cases

2023-01-03 Thread Felix Kuehling
Am 2022-12-27 um 12:12 schrieb Alex Deucher: On Tue, Dec 27, 2022 at 12:10 PM Alex Deucher wrote: A number of of the gfx8 cases where the same. Clean them up. typos here fixed up locally. Alex Signed-off-by: Alex Deucher Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/k

Re: [PATCH v3 2/3] drm/amd/display: Report to ACPI video if no panels were found

2023-01-03 Thread Harry Wentland
On 12/8/22 11:42, Mario Limonciello wrote: > On desktop APUs amdgpu doesn't create a native backlight device > as no eDP panels are found. However if the BIOS has reported > backlight control methods in the ACPI tables then an acpi_video0 > backlight device will be made 8 seconds after boot. > >

[PATCH 4.19 1/1] drm/amdkfd: Check for null pointer after calling kmemdup

2023-01-03 Thread Dragos-Marian Panait
From: Jiasheng Jiang [ Upstream commit abfaf0eee97925905e742aa3b0b72e04a918fa9e ] As the possible failure of the allocation, kmemdup() may return NULL pointer. Therefore, it should be better to check the 'props2' in order to prevent the dereference of NULL pointer. Fixes: 3a87177eb141 ("drm/amd

[PATCH 4.19 0/1] drm/amdkfd: Check for null pointer after calling kmemdup

2023-01-03 Thread Dragos-Marian Panait
The following commit is needed to fix CVE-2022-3108: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=abfaf0eee97925905e742aa3b0b72e04a918fa9e Jiasheng Jiang (1): drm/amdkfd: Check for null pointer after calling kmemdup drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 +++

Re: [syzbot] WARNING: locking bug in inet_autobind

2023-01-03 Thread Waiman Long
On 1/3/23 10:39, Felix Kuehling wrote: The regression point doesn't make sense. The kernel config doesn't enable CONFIG_DRM_AMDGPU, so there is no way that a change in AMDGPU could have caused this regression. I agree. It is likely a pre-existing problem or caused by another commit that got t

Re: [PATCH v2] drm/amdgpu: Retry DDC probing on DVI on failure if we got an HPD interrupt

2023-01-03 Thread Alex Deucher
On Fri, Dec 23, 2022 at 9:23 AM xurui wrote: > > HPD signals on DVI ports can be fired off before the pins required for > DDC probing actually make contact, due to the pins for HPD making > contact first. This results in a HPD signal being asserted but DDC > probing failing, resulting in hotpluggi

[PATCH v4 00/27] Recover from failure to probe GPU

2023-01-03 Thread Mario Limonciello
One of the first thing that KMS drivers do during initialization is destroy the system firmware framebuffer by means of `drm_aperture_remove_conflicting_pci_framebuffers` This means that if for any reason the GPU failed to probe the user will be stuck with at best a screen frozen at the last thing

[PATCH v4 01/27] drm/amd: Delay removal of the firmware framebuffer

2023-01-03 Thread Mario Limonciello
Removing the firmware framebuffer from the driver means that even if the driver doesn't support the IP blocks in a GPU it will no longer be functional after the driver fails to initialize. This change will ensure that unsupported IP blocks at least cause the driver to work with the EFI framebuffer

[PATCH v4 05/27] drm/amd: Add a new helper for loading/validating microcode

2023-01-03 Thread Mario Limonciello
All microcode runs a basic validation after it's been loaded. Each IP block as part of init will run both. Introduce a wrapper for request_firmware and amdgpu_ucode_validate. This wrapper will also remap any error codes from request_firmware to -ENODEV. This is so that early_init will fail if fir

[PATCH v4 04/27] drm/amd: Convert SMUv13 microcode to use `amdgpu_ucode_ip_version_decode`

2023-01-03 Thread Mario Limonciello
The special case for the one dGPU has been moved into `amdgpu_ucode_ip_version_decode`, so simplify this code. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Acked-by: Christian König --- v3->v4: * No changes --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 12 ++-- 1

[PATCH v4 02/27] drm/amd: Add a legacy mapping to "amdgpu_ucode_ip_version_decode"

2023-01-03 Thread Mario Limonciello
This will allow other parts of the driver that currently special case firmware file names to before IP version style naming to just have a single call to `amdgpu_ucode_ip_version_decode`. Signed-off-by: Mario Limonciello Acked-by: Christian König --- v3->v4: * No changes v2->v3: * Fixes for GF

[PATCH v4 03/27] drm/amd: Convert SMUv11 microcode to use `amdgpu_ucode_ip_version_decode`

2023-01-03 Thread Mario Limonciello
Remove the special casing from SMU v11 code. No intended functional changes. Signed-off-by: Mario Limonciello Acked-by: Christian König --- v3->v4: * No changes --- .../gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c| 35 ++- 1 file changed, 3 insertions(+), 32 deletions(-) diff --

[PATCH v4 06/27] drm/amd: Use `amdgpu_ucode_load` helper for SDMA

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --

[PATCH v4 08/27] drm/amd: Make SDMA firmware load failures less noisy.

2023-01-03 Thread Mario Limonciello
When firmware is missing we get failures at every step. ``` [3.855086] amdgpu :04:00.0: Direct firmware load for amdgpu/green_sardine_sdma.bin failed with error -2 [3.855087] [drm:amdgpu_sdma_init_microcode [amdgpu]] *ERROR* SDMA: Failed to init firmware "amdgpu/green_sardine_sdma.bin

[PATCH v4 10/27] drm/amd: Load VCN microcode during early_init

2023-01-03 Thread Mario Limonciello
Simplifies the code so that all VCN versions will get the firmware name from `amdgpu_ucode_ip_version_decode` and then use this filename to load microcode as part of the early_init process. Signed-off-by: Mario Limonciello --- v3->v4: * Move out of IP discovery and introduce early_init phase for

[PATCH v4 07/27] drm/amd: Convert SDMA to use `amdgpu_ucode_ip_version_decode`

2023-01-03 Thread Mario Limonciello
Simplifies the code so that all SDMA versions will get the firmware name from `amdgpu_ucode_ip_version_decode`. Signed-off-by: Mario Limonciello --- v3->v4: * Move out of IP discovery and instead simplify early_init v2->v3: * Fix dGPU naming scheme --- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c

[PATCH v4 09/27] drm/amd: Use `amdgpu_ucode_load` helper for VCN

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-

[PATCH v4 12/27] drm/amd: Use `amdgpu_ucode_load` helper for MES

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --g

[PATCH v4 14/27] drm/amd: Use `amdgpu_ucode_load` helper for GFX9

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * new patch --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 43 +-- 1 file changed, 8 insertions(+), 35 d

[PATCH v4 15/27] drm/amd: Load GFX9 microcode during early_init

2023-01-03 Thread Mario Limonciello
If GFX9 microcode is required but not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Signed-off-by: Mario Limonciello --- v3->v4: * Move microcode load phase to early init v2->v3: * Fix issues found on real hardware where num_gf

[PATCH v4 11/27] drm/amd: Load MES microcode during early_init

2023-01-03 Thread Mario Limonciello
Add an early_init phase to MES for fetching and validating microcode from the filesystem. If MES microcode is required but not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Move the request for MES microcode into the early_init p

[PATCH v4 13/27] drm/amd: Remove superfluous assignment for `adev->mes.adev`

2023-01-03 Thread Mario Limonciello
`amdgpu_mes_init` already sets `adev->mes.adev`, so there is no need to also set it in the IP specific versions. Signed-off-by: Mario Limonciello --- v4: * New patch --- drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 1 - drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 1 - 2 files changed, 2 deletions(-)

[PATCH v4 19/27] drm/amd: Load GFX11 microcode during early_init

2023-01-03 Thread Mario Limonciello
If GFX11 microcode is required but not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Move the request for GFX11 microcode into the early_init phase so that if it's not available, driver init will fail. Signed-off-by: Mario Limonc

[PATCH v4 17/27] drm/amd: Load GFX10 microcode during early_init

2023-01-03 Thread Mario Limonciello
Simplifies the code so that GFX10 will get the firmware name from `amdgpu_ucode_ip_version_decode` and then use this filename to load microcode as part of the early_init process. Any failures will cause the driver to fail to probe before the firmware framebuffer has been removed. Signed-off-by: M

[PATCH v4 18/27] drm/amd: Use `amdgpu_ucode_load` helper for GFX11

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 23 --- 1 file changed, 4 insertions(+), 19 dele

[PATCH v4 16/27] drm/amd: Use `amdgpu_ucode_load` helper for GFX10

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 35 ++ 1 file changed, 8 insertions(+), 27 d

[PATCH v4 21/27] drm/amd: Avoid BUG() for case of SRIOV missing IP version

2023-01-03 Thread Mario Limonciello
No need to crash the kernel. AMDGPU will now fail to probe. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index a

[PATCH v4 22/27] drm/amd: Load PSP microcode during early_init

2023-01-03 Thread Mario Limonciello
Simplifies the code so that all PSP versions will get the firmware name from `amdgpu_ucode_ip_version_decode` and then use this filename to load microcode as part of the early_init process. Any failures will cause the driver to fail to probe before the firmware framebuffer has been removed. Signe

[PATCH v4 24/27] drm/amd/display: Load DMUB microcode during early_init

2023-01-03 Thread Mario Limonciello
If DMUB is required for an ASIC, ensure that the microcode is available and validates during early_init. Any failures will cause the driver to fail to probe before the firmware framebuffer has been removed. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- .../gpu/drm/amd/display/am

[PATCH v4 20/27] drm/amd: Parse both v1 and v2 TA microcode headers using same function

2023-01-03 Thread Mario Limonciello
Several IP versions duplicate code and can't use the common helpers. Move this code into a single function so that the helpers can be used. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 120 ++-- drivers/gpu/drm/amd/am

[PATCH v4 23/27] drm/amd: Use `amdgpu_ucode_load` helper for PSP

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 42 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp

[PATCH v4 27/27] drm/amd: Optimize SRIOV switch/case for PSP microcode load

2023-01-03 Thread Mario Limonciello
Now that IP version decoding is used, a number of case statements can be combined. Signed-off-by: Mario Limonciello --- v3->v4: * New patch drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

[PATCH v4 26/27] drm/amd: Load SMU microcode during early_init

2023-01-03 Thread Mario Limonciello
This will ensure that the microcode is available before the firmware framebuffer has been destroyed. Signed-off-by: Mario Limonciello --- v3->v4: * new patch --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gp

[PATCH v4 25/27] drm/amd: Use `amdgpu_ucode_load` helper for SMU

2023-01-03 Thread Mario Limonciello
The `amdgpu_ucode_load` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Signed-off-by: Mario Limonciello --- v3->v4: * New patch --- drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 5 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 5

Re: [PATCH 1/2] drm/amdgpu: return the PCIe gen and lanes from the INFO

2023-01-03 Thread Marek Olšák
I see. Well, those sysfs files are not usable, and I don't think it would be important even if they were usable, but for completeness: The ioctl returns: pcie_gen = 1 pcie_num_lanes = 16 Theoretical bandwidth from those values: 4.0 GB/s My DMA test shows this write bandwidth: 3.5 GB/s It

Re: [PATCH 2/2] drm/amdgpu: add AMDGPU_INFO_VM_STAT to return GPU VM

2023-01-03 Thread Marek Olšák
I see about the access now, but did you even look at the patch? Because what the patch does isn't even exposed to common drm code, such as the preferred domain and visible VRAM placement, so it can't be in fdinfo right now. Or do you even know what fdinfo contains? Because it contains nothing usef

RE: [PATCH] drm/amdgpu: allow query error counters for specific IP block

2023-01-03 Thread Zhou1, Tao
[AMD Official Use Only - General] Reviewed-by: Tao Zhou > -Original Message- > From: Zhang, Hawking > Sent: Wednesday, January 4, 2023 12:25 AM > To: amd-gfx@lists.freedesktop.org; Zhou1, Tao ; Yang, > Stanley ; Li, Candice ; Chai, > Thomas > Cc: Zhang, Hawking > Subject: [PATCH] drm/

Re: [PATCH v4 05/27] drm/amd: Add a new helper for loading/validating microcode

2023-01-03 Thread Lazar, Lijo
On 1/4/2023 3:48 AM, Mario Limonciello wrote: All microcode runs a basic validation after it's been loaded. Each IP block as part of init will run both. Introduce a wrapper for request_firmware and amdgpu_ucode_validate. This wrapper will also remap any error codes from request_firmware to -E

Re: [PATCH v4 07/27] drm/amd: Convert SDMA to use `amdgpu_ucode_ip_version_decode`

2023-01-03 Thread Lazar, Lijo
On 1/4/2023 3:48 AM, Mario Limonciello wrote: Simplifies the code so that all SDMA versions will get the firmware name from `amdgpu_ucode_ip_version_decode`. Signed-off-by: Mario Limonciello --- v3->v4: * Move out of IP discovery and instead simplify early_init v2->v3: * Fix dGPU naming

Re: [RFC 3/7] drm/amdgpu: Create MQD for userspace queue

2023-01-03 Thread Yadav, Arvind
On 1/4/2023 12:07 AM, Felix Kuehling wrote: Am 2023-01-03 um 04:36 schrieb Shashank Sharma: /*MQD struct for usermode Queue*/ +struct amdgpu_usermode_queue_mqd This is specific to GC 11.  Every IP and version will have its own MQD format.  That should live in the IP specific code, not the gen

[PATCH 1/2] drm/amd/pm: correct the reference clock for fan speed(rpm) calculation

2023-01-03 Thread Evan Quan
Correct the reference clock as 25Mhz for SMU13 fan speed calculation. Signed-off-by: Evan Quan Change-Id: I9596635b14dd4f9a55ba11324e2e0a3c4d6d3108 -- v1->v2: - correct the way for reference clock updating(Lijo) --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 ++-- 1 file changed, 2 ins

[PATCH 2/2] drm/amd/pm: add the missing mapping for PPT feature on SMU13.0.0 and 13.0.7

2023-01-03 Thread Evan Quan
Then we are able to set a new ppt limit via the hwmon interface(power1_cap). Signed-off-by: Evan Quan Change-Id: Ife80277f89065aa8405715e7ae21fb20be7eb706 --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 1 + 2 files changed,