[PATCH] drm/amd: Update strapping for NBIO 2.5.0

2024-12-10 Thread Mario Limonciello
This helps to avoid a spurious PME event on hotplug to Azalia. Cc: Vijendar Mukunda Reported-by: ionut_n2...@yahoo.com Closes: https://bugzilla.kernel.org/show_bug.cgi?id=215884 Tested-by: Gabriel Marcano Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 12

Re: [PATCH 2/2] drm/amdgpu: add sysfs reset mask for vcn 5.0.1

2024-12-10 Thread David Wu
Series is: Reviewed-by: David (Ming Qiang) Wu one thing I would like to do: return amdgpu_vcn_sysfs_reset_mask_init(adev); On 2024-12-10 15:03, Alex Deucher wrote: Add the calls to the vcn 5.0.1 code. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 10 ++

[PATCH 29/48] drm/amdgpu/vcn4.0.5: add set_pg_state callback

2024-12-10 Thread Alex Deucher
Rework the code as a vcn instance callback. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c i

[PATCH 23/48] drm/amdgpu/vcn1.0: add set_pg_state callback

2024-12-10 Thread Alex Deucher
Rework the code as a vcn instance callback. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 29 ++- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c index

[PATCH 34/48] drm/amdgpu/vcn1.0: use generic set_power_gating_state helper

2024-12-10 Thread Alex Deucher
No need for an IP specific version. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c index 670851166a805..f4f794f7

[PATCH 24/48] drm/amdgpu/vcn2.0: add set_pg_state callback

2024-12-10 Thread Alex Deucher
Rework the code as a vcn instance callback. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 35 ++- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c index

[PATCH 33/48] drm/amdgpu/vcn: add a generic helper for set_power_gating_state

2024-12-10 Thread Alex Deucher
It's common for all VCN variants. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 23 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 3 +++ 2 files changed, 26 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd

[PATCH 37/48] drm/amdgpu/vcn3.0: use generic set_power_gating_state helper

2024-12-10 Thread Alex Deucher
No need for an IP specific version. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c index 353aab5565702..2f

[PATCH 40/48] drm/amdgpu/vcn4.0.5: use generic set_power_gating_state helper

2024-12-10 Thread Alex Deucher
No need for an IP specific version. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 27 + 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c index 0ac41

[PATCH 30/48] drm/amdgpu/vcn5.0.0: add set_pg_state callback

2024-12-10 Thread Alex Deucher
Rework the code as a vcn instance callback. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c i

[PATCH 46/48] drm/amdgpu: use new helper to get num instances for UVD

2024-12-10 Thread Alex Deucher
Use the helper for all non-UVD code which queries the number of UVD instances. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 02/48] drm/amdgpu/vcn3.0: split code along instances

2024-12-10 Thread Alex Deucher
Split the code on a per instance basis. This will allow us to use the per instance functions in the future to handle more things per instance. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 436 +- 1 file changed, 213 insertions(+), 223 deletions

[PATCH 10/48] drm/amdgpu/vcn: move more instanced data to vcn_instance

2024-12-10 Thread Alex Deucher
Move more per instance data into the per instance structure. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 196 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 17 +- drivers/gpu/drm/amd/amdgpu/jpeg

[PATCH 05/48] drm/amdgpu/vcn4.0.5: split code along instances

2024-12-10 Thread Alex Deucher
Split the code on a per instance basis. This will allow us to use the per instance functions in the future to handle more things per instance. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 438 1 file changed, 216 insertions(+), 222 deletions

[PATCH 35/48] drm/amdgpu/vcn2.0: use generic set_power_gating_state helper

2024-12-10 Thread Alex Deucher
No need for an IP specific version. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c index 93e2cc41e19c3..47759ef0

[PATCH 38/48] drm/amdgpu/vcn4.0: use generic set_power_gating_state helper

2024-12-10 Thread Alex Deucher
No need for an IP specific version. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 27 +-- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c index 790b53360

[PATCH 31/48] drm/amdgpu/vcn5.0.1: add set_pg_state callback

2024-12-10 Thread Alex Deucher
Rework the code as a vcn instance callback. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c i

[PATCH 42/48] drm/amdgpu/vcn5.0.1: use generic set_power_gating_state helper

2024-12-10 Thread Alex Deucher
No need for an IP specific version. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 27 + 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c index 586cd

[PATCH 43/48] drm/amdgpu: add a helper to get the number of instances

2024-12-10 Thread Alex Deucher
Add a helper to get the number of instances of an IP type. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 37 ++ 2 files changed, 40 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH 11/48] drm/amdgpu/vcn: switch vcn helpers to be instance based

2024-12-10 Thread Alex Deucher
Pass the instance to the helpers. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 437 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 12 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 16 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 16 +- drivers/

[PATCH 14/48] drm/amdgpu/vcn2.0: convert internal functions to use vcn_inst

2024-12-10 Thread Alex Deucher
Pass the vcn instance structure to these functions rather than adev and the instance number. TODO: clean up the function internals to use the vinst state directly rather than accessing it indirectly via adev->vcn.inst[]. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 66

[PATCH 41/48] drm/amdgpu/vcn5.0.0: use generic set_power_gating_state helper

2024-12-10 Thread Alex Deucher
No need for an IP specific version. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 27 + 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c index 95881

[PATCH 17/48] drm/amdgpu/vcn4.0.3: convert internal functions to use vcn_inst

2024-12-10 Thread Alex Deucher
Pass the vcn instance structure to these functions rather than adev and the instance number. TODO: clean up the function internals to use the vinst state directly rather than accessing it indirectly via adev->vcn.inst[]. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c |

[PATCH 09/48] drm/amdgpu/vcn: make powergating status per instance

2024-12-10 Thread Alex Deucher
Store it per instance so we can track it per instance. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 6 +-- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 11 ++-- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 43 ++

[PATCH 45/48] drm/amdgpu/ras: use the number of JPEG instances

2024-12-10 Thread Alex Deucher
Rather than the number of VCN instances. This should be the same, but call it out explicitly. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/dr

[PATCH 22/48] drm/amdgpu/vcn: add new per instance callback for powergating

2024-12-10 Thread Alex Deucher
This is per instance so add a new function pointer for it. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h index fc35895be5c4a..d7467ab

[PATCH 47/48] drm/amdgpu: use new helper to get num instances for JPEG

2024-12-10 Thread Alex Deucher
Use the helper for all non-JPEG code which queries the number of SDMA instances. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 6 -- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 4 +++- 3 files chan

[PATCH 21/48] drm/amdgpu/vcn: adjust pause_dpg_mode function signature

2024-12-10 Thread Alex Deucher
Change it to take a vcn instance rather than adev to align with the vcn instance changes. TODO: clean up the function internals to use the vinst state directly rather than accessing it indirectly via adev->vcn.inst[]. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4

[PATCH 28/48] drm/amdgpu/vcn4.0.3: add set_pg_state callback

2024-12-10 Thread Alex Deucher
Rework the code as a vcn instance callback. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 36 ++--- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c i

[PATCH 48/48] drm/amdgpu: use new helper to get num instances for SDMA

2024-12-10 Thread Alex Deucher
Use the helper for all non-SDMA code which queries the number of SDMA instances. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 12 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 3 +

[PATCH 44/48] drm/amdgpu: use new helper to get num instances for VCN

2024-12-10 Thread Alex Deucher
Use the helper for all non-VCN code which queries the number of VCN instances. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 9 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 +++-- drivers/gp

[PATCH 39/48] drm/amdgpu/vcn4.0.3: use generic set_power_gating_state helper

2024-12-10 Thread Alex Deucher
No need for an IP specific version. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 27 + 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c index b6e14

[PATCH 32/48] drm/amdgpu/vcn: use per instance callbacks for idle work handler

2024-12-10 Thread Alex Deucher
Use the vcn instance power gating callbacks rather than the IP powergating callback. This limits power gating to only the instance in use rather than all of the instances. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 27 - 1 file changed, 13

[PATCH 16/48] drm/amdgpu/vcn4.0: convert internal functions to use vcn_inst

2024-12-10 Thread Alex Deucher
Pass the vcn instance structure to these functions rather than adev and the instance number. TODO: clean up the function internals to use the vinst state directly rather than accessing it indirectly via adev->vcn.inst[]. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 11

[PATCH 08/48] drm/amdgpu/vcn: switch work handler to be per instance

2024-12-10 Thread Alex Deucher
Have a separate work handler for each VCN instance. This paves the way for per instance VCN power gating at runtime. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 84 + drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 8 ++- drivers/gpu/drm/amd/amdgp

[PATCH 06/48] drm/amdgpu/vcn5.0.0: split code along instances

2024-12-10 Thread Alex Deucher
Split the code on a per instance basis. This will allow us to use the per instance functions in the future to handle more things per instance. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 386 1 file changed, 190 insertions(+), 196 deletions

[PATCH 07/48] drm/amdgpu/vcn5.0.1: split code along instances

2024-12-10 Thread Alex Deucher
Split the code on a per instance basis. This will allow us to use the per instance functions in the future to handle more things per instance. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 352 1 file changed, 174 insertions(+), 178 deletions

[PATCH 13/48] drm/amdgpu/vcn1.0: convert internal functions to use vcn_inst

2024-12-10 Thread Alex Deucher
Pass the vcn instance structure to these functions rather than adev and the instance number. TODO: clean up the function internals to use the vinst state directly rather than accessing it indirectly via adev->vcn.inst[]. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 85

[PATCH 20/48] drm/amdgpu/vcn5.0.1: convert internal functions to use vcn_inst

2024-12-10 Thread Alex Deucher
Pass the vcn instance structure to these functions rather than adev and the instance number. TODO: clean up the function internals to use the vinst state directly rather than accessing it indirectly via adev->vcn.inst[]. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c |

[PATCH 18/48] drm/amdgpu/vcn4.0.5: convert internal functions to use vcn_inst

2024-12-10 Thread Alex Deucher
Pass the vcn instance structure to these functions rather than adev and the instance number. TODO: clean up the function internals to use the vinst state directly rather than accessing it indirectly via adev->vcn.inst[]. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c |

[PATCH 26/48] drm/amdgpu/vcn3.0: add set_pg_state callback

2024-12-10 Thread Alex Deucher
Rework the code as a vcn instance callback. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 39 ++- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c index

[PATCH V2 00/48] VCN instance rework

2024-12-10 Thread Alex Deucher
These series reworks our instances are handled for VCN to better split the state between instances. This allows for per instance powergating and opens the path to further splitting VCN IP blocks per instance in the future if that is desirable. It also starts to abstract the IP level instance hand

[PATCH 04/48] drm/amdgpu/vcn4.0.3: split code along instances

2024-12-10 Thread Alex Deucher
Split the code on a per instance basis. This will allow us to use the per instance functions in the future to handle more things per instance. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 417 1 file changed, 206 insertions(+), 211 deletions

[PATCH 27/48] drm/amdgpu/vcn4.0: add set_pg_state callback

2024-12-10 Thread Alex Deucher
Rework the code as a vcn instance callback. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 38 +++ 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c index

[PATCH 15/48] drm/amdgpu/vcn2.5: convert internal functions to use vcn_inst

2024-12-10 Thread Alex Deucher
Pass the vcn instance structure to these functions rather than adev and the instance number. TODO: clean up the function internals to use the vinst state directly rather than accessing it indirectly via adev->vcn.inst[]. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 79

[PATCH 25/48] drm/amdgpu/vcn2.5: add set_pg_state callback

2024-12-10 Thread Alex Deucher
Rework the code as a vcn instance callback. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 37 +++ 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c index

[PATCH 36/48] drm/amdgpu/vcn2.5: use generic set_power_gating_state helper

2024-12-10 Thread Alex Deucher
No need for an IP specific version. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c index f5889d1bd0d4c.

[PATCH 19/48] drm/amdgpu/vcn5.0.0: convert internal functions to use vcn_inst

2024-12-10 Thread Alex Deucher
Pass the vcn instance structure to these functions rather than adev and the instance number. TODO: clean up the function internals to use the vinst state directly rather than accessing it indirectly via adev->vcn.inst[]. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c |

Re: [PATCH 43/48] drm/amdgpu: add a helper to get the number of instances

2024-12-10 Thread Lazar, Lijo
On 12/11/2024 4:23 AM, Alex Deucher wrote: > Add a helper to get the number of instances of an IP type. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 ++ > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 37 ++ > 2 files changed, 40 i

[PATCH 1/2] drm/amdgpu: Failed to check various return code

2024-12-10 Thread Andrew Martin
Clean up code to quiet the compiler on us failing to check the return code. Signed-off-by: Andrew Martin --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --gi

[PATCH 2/2] drm/amdkfd: Failed to check various return code

2024-12-10 Thread Andrew Martin
Clean up code to quiet the compiler on us failing to check the return code. Signed-off-by: Andrew Martin --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/a

Re: [PATCH 7/7 v2] drm/amdgpu/gfx11: clean up kcq reset code

2024-12-10 Thread Deucher, Alexander
[Public] Series is: Reviewed-by: Alex Deucher From: jesse.zh...@amd.com Sent: Tuesday, December 10, 2024 2:54 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian ; Zhu, Jiadong ; Liang, Prike ; Huang, Tim ; Zhang, Jesse(Jie) Subje

Re: [PATCH 5/5] drm/amdgpu/sdma7: Add queue reset sysfs for sdmav7

2024-12-10 Thread David Wu
On 2024-12-09 22:53, jesse.zh...@amd.com wrote: sdmv7 queue reset already supports by mmio, add its sys file. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.

Re: [PATCH 5/5] drm/amdgpu/sdma7: Add queue reset sysfs for sdmav7

2024-12-10 Thread Deucher, Alexander
[Public] Series is: Reviewed-by: Alex Deucher From: amd-gfx on behalf of jesse.zh...@amd.com Sent: Monday, December 9, 2024 10:53 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian ; Zhu, Jiadong ; Liang, Prike ; Huang, Tim ; Zha

[PATCH v10 4/6] drm: consider GEM object shared when it is exported

2024-12-10 Thread Yunxiang Li
Tracking the state of a GEM object for shared stats is quite difficult since the handle_count is managed behind driver's back. So instead considers GEM object shared the moment it is exported with flink ioctl. This makes it work the same to the dma_buf case. Add a callback for drivers to get notifi

[PATCH v10 5/6] drm/amdgpu: remove unused function parameter

2024-12-10 Thread Yunxiang Li
amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all callers have a reference to adev handy, so remove it for cleanliness. Signed-off-by: Yunxiang Li Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c

[PATCH v10 2/6] drm: make drm-active- stats optional

2024-12-10 Thread Yunxiang Li
When memory stats is generated fresh everytime by going though all the BOs, their active information is quite easy to get. But if the stats are tracked with BO's state this becomes harder since the job scheduling part doesn't really deal with individual buffers. Make drm-active- optional to enable

[PATCH v10 0/6] rework bo mem stats tracking

2024-12-10 Thread Yunxiang Li
Right now every time the fdinfo is read, we go through the vm lists and lock all the BOs to calcuate the statistics. This causes a lot of lock contention when the VM is actively used. It gets worse if there is a lot of shared BOs or if there's a lot of submissions. We have seen submissions lock-up

[PATCH v10 6/6] drm/amdgpu: track bo memory stats at runtime

2024-12-10 Thread Yunxiang Li
Before, every time fdinfo is queried we try to lock all the BOs in the VM and calculate memory usage from scratch. This works okay if the fdinfo is rarely read and the VMs don't have a ton of BOs. If either of these conditions is not true, we get a massive performance hit. In this new revision, we

[PATCH v10 3/6] Documentation/gpu: Clarify drm memory stats definition

2024-12-10 Thread Yunxiang Li
Define how to handle buffers with multiple possible placement so we don't get incompatible implementations. Callout the resident requirement for drm-purgeable- explicitly. Remove the requirement for there to be only drm-memory- or only drm-resident-, it's not what's implemented and having both is b

[PATCH v10 1/6] drm: add drm_memory_stats_is_zero

2024-12-10 Thread Yunxiang Li
Add a helper to check if the memory stats is zero, this will be used to check for memory accounting errors. Signed-off-by: Yunxiang Li Reviewed-by: Christian König CC: dri-de...@lists.freedesktop.org --- drivers/gpu/drm/drm_file.c | 10 ++ include/drm/drm_file.h | 1 + 2 files cha

[PATCH 1/2] drm/amdgpu: add ip_dump support for vcn 5.0.1

2024-12-10 Thread Alex Deucher
Shared with vcn 5.0.0. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 35 +++-- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.h | 5 drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 7 + drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.h | 8 -- 4 files chang

[PATCH 2/2] drm/amdgpu: add sysfs reset mask for vcn 5.0.1

2024-12-10 Thread Alex Deucher
Add the calls to the vcn 5.0.1 code. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c index a076ffb3867ac..8a50dcd64e6eb 10064

Re: [PATCH] drm/amdgpu: Update VM flush condition for 'enforce_isolation'

2024-12-10 Thread Christian König
Am 10.12.24 um 09:50 schrieb Srinivasan Shanmugam: This patch updates the `amdgpu_vm_flush` function to ensure the cleaner shader is emitted when `enforce_isolation` is true and `vmid` is not set (ie., when job does not have a specific, unique memory space assigned to it. Instead, it uses a share

[PATCH 6/7 v2] drm/amdgpu/gfx12: clean up kcq reset code

2024-12-10 Thread jesse.zh...@amd.com
Replace kcq queue reset with existing function amdgpu_mes_reset_legacy_queue. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/am

[PATCH] drm/amdgpu: Update VM flush condition for 'enforce_isolation'

2024-12-10 Thread Srinivasan Shanmugam
This patch updates the `amdgpu_vm_flush` function to ensure the cleaner shader is emitted when `enforce_isolation` is true and `vmid` is not set (ie., when job does not have a specific, unique memory space assigned to it. Instead, it uses a shared or common memory space that is accessible to multip

Re: [PATCH] drm/amdgpu: Avoid VF for RAS recovery source check

2024-12-10 Thread Yao, Yiqing(James)
[Public] Reviewed-by: Yiqing Yao Tested-by: Yiqing Yao Thanks, Yiqing(James). From: amd-gfx on behalf of Lijo Lazar Sent: Monday, December 9, 2024 11:52 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Deucher, Alexander ; Zhou1, Tao ; Skvortsov,

Re: [PATCH v2 04/10] drm/amd/display: use eld_mutex to protect access to connector->eld

2024-12-10 Thread Dmitry Baryshkov
On Fri, Dec 06, 2024 at 11:43:07AM +0200, Dmitry Baryshkov wrote: > Reading access to connector->eld can happen at the same time the > drm_edid_to_eld() updates the data. Take the newly added eld_mutex in > order to protect connector->eld from concurrent access. > > Reviewed-by: Maxime Ripard > S

[PATCH 2/2] drm/amdgpu/jpeg5.0.1: use num_jpeg_inst for SR-IOV

2024-12-10 Thread Alex Deucher
They should be the same, but use the proper variable. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c index 8bfa400e7a

[PATCH 1/2] drm/amdgpu/jpeg4.0.3: use num_jpeg_inst for SR-IOV

2024-12-10 Thread Alex Deucher
They should be the same, but use the proper variable. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c index fd0490934f

[PATCH 01/48] drm/amdgpu/vcn2.5: split code along instances

2024-12-10 Thread Alex Deucher
Split the code on a per instance basis. This will allow us to use the per instance functions in the future to handle more things per instance. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 841 +- 1 file changed, 411 insertions(+), 430 deletions

[PATCH 12/48] drm/amdgpu/vcn3.0: convert internal functions to use vcn_inst

2024-12-10 Thread Alex Deucher
Pass the vcn instance structure to these functions rather than adev and the instance number. TODO: clean up the function internals to use the vinst state directly rather than accessing it indirectly via adev->vcn.inst[]. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 79

[PATCH 03/48] drm/amdgpu/vcn4.0: split code along instances

2024-12-10 Thread Alex Deucher
Split the code on a per instance basis. This will allow us to use the per instance functions in the future to handle more things per instance. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 436 +- 1 file changed, 215 insertions(+), 221 deletions