[PATCH] drm/amdgpu: Fix incorrect mask used in gfx12

2025-07-25 Thread Harish Kasiviswanathan
NV10 mask used for gfx12. Fix it. Fixes: b8c76c59987a ("drm/amdgpu: rework how PTE flags are generated v3") Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v3 1/3] drm/amdkfd: Set per-process flags only once cik/vi

2025-03-15 Thread Harish Kasiviswanathan
for cik and vi family. So this commit only focuses on these two. A separate commit will address other asics. Signed-off-by: Harish Kasiviswanathan --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 39 +- .../amd/amdkfd/kfd_device_queue_manager_cik.c | 69 -- .../amd

[PATCH v4 1/3] drm/amdkfd: Set per-process flags only once cik/vi

2025-03-15 Thread Harish Kasiviswanathan
for cik and vi family. So this commit only focuses on these two. A separate commit will address other asics. Signed-off-by: Harish Kasiviswanathan --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 39 +- .../amd/amdkfd/kfd_device_queue_manager_cik.c | 69 -- .../amd

[PATCH v3] drm/amdkfd: Fix bug in config_dequeue_wait_counts

2025-03-14 Thread Harish Kasiviswanathan
gt; ("drm/amdkfd: Add pm_config_dequeue_wait_counts API") Signed-off-by: Harish Kasiviswanathan --- .../gpu/drm/amd/amdkfd/kfd_packet_manager.c | 16 ++ .../drm/amd/amdkfd/kfd_packet_manager_v9.c| 30 +++ 2 files changed, 27 insertions(+), 19 deletions(-) diff --g

[PATCH v2] drm/amdkfd: Update return value of config_dequeue_wait_counts

2025-03-14 Thread Harish Kasiviswanathan
I") Signed-off-by: Harish Kasiviswanathan --- .../gpu/drm/amd/amdkfd/kfd_packet_manager.c | 14 .../drm/amd/amdkfd/kfd_packet_manager_v9.c| 36 +++ 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c b

[PATCH] drm/amdkfd: Update return value of config_dequeue_wait_counts

2025-03-14 Thread Harish Kasiviswanathan
.config_dequeue_wait_counts returns a nop case. Modify return parameter to reflect that since the caller also needs to ignore this condition. Fixes: <98a5af8103f> ("drm/amdkfd: Add pm_config_dequeue_wait_counts API") Signed-off-by: Harish Kasiviswanathan --- drivers/gp

[PATCH] drm/amd/pm: add unique_id for gfx12

2025-03-11 Thread Harish Kasiviswanathan
Expose unique_id for gfx12 Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index 1d04f1b79ded..2179344e78d9 100644 --- a/drivers/gpu/drm

[PATCH v3 3/3] drm/amdkfd: Add support for more per-process flag

2025-03-06 Thread Harish Kasiviswanathan
Add support for more per-process flags starting with option to configure MFMA precision for gfx 9.5 v2: Change flag name to KFD_PROC_FLAG_MFMA_HIGH_PRECISION Remove unused else condition v3: Bump the KFD API version Signed-off-by: Harish Kasiviswanathan Reviewed-by: Felix Kuehling

[PATCH v4 2/3] drm/amdkfd: Set per-process flags only once for gfx9/10/11/12

2025-03-06 Thread Harish Kasiviswanathan
Define set_cache_memory_policy() for these asics and move all static changes from update_qpd() which is called each time a queue is created to set_cache_memory_policy() which is called once during process initialization Signed-off-by: Harish Kasiviswanathan --- .../amd/amdkfd

[PATCH v4 3/3] drm/amdkfd: Add support for more per-process flag

2025-03-06 Thread Harish Kasiviswanathan
-by: Harish Kasiviswanathan Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 ++- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 -- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 6 -- .../gpu/drm/amd/amdkfd

[PATCH v3 2/3] drm/amdkfd: Set per-process flags only once for gfx9/10/11/12

2025-03-06 Thread Harish Kasiviswanathan
Define set_cache_memory_policy() for these asics and move all static changes from update_qpd() which is called each time a queue is created to set_cache_memory_policy() which is called once during process initialization Signed-off-by: Harish Kasiviswanathan --- .../amd/amdkfd

[PATCH v2 2/2] drm/amdgpu: Reduce dequeue retry timeout for gfx9 family

2025-03-03 Thread Harish Kasiviswanathan
Dequeue retry timeout controls the interval between checks for unmet conditions. On MI series, reduce this from 0x40 to 0x1 (~ 1 uS). The cost of additional bandwidth consumed by CP when polling memory shouldn't be substantial. Signed-off-by: Harish Kasiviswanathan Reviewed-by: : Jonatha

[PATCH v2 1/2] drm/amdkfd: Add pm_config_dequeue_wait_counts API

2025-03-03 Thread Harish Kasiviswanathan
flexibility to update different dequeue wait times. Signed-off-by: Harish Kasiviswanathan --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 45 ++ .../drm/amd/amdkfd/kfd_device_queue_manager.h | 11 +++- .../gpu/drm/amd/amdkfd/kfd_packet_manager.c | 26 +++- .../drm/amd/amdkfd

[PATCH 1/2] drm/amdkfd: Add pm_config_dequeue_wait_counts API

2025-02-26 Thread Harish Kasiviswanathan
flexibility to update different dequeue wait times. Signed-off-by: Harish Kasiviswanathan --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 45 +++ .../drm/amd/amdkfd/kfd_device_queue_manager.h | 11 +++- .../gpu/drm/amd/amdkfd/kfd_packet_manager.c | 26 - .../drm/amd

[PATCH 2/2] drm/amdgpu: Reduce dequeue retry timeout for gfx9 family

2025-02-26 Thread Harish Kasiviswanathan
Dequeue retry timeout controls the interval between checks for unmet conditions. On MI series, reduce this from 0x40 to 0x1 (~ 1 uS). The cost of additional bandwidth consumed by CP when polling memory shouldn't be substantial. Signed-off-by: Harish Kasiviswanathan --- .../drm/amd/a

Re: [PATCH 2/4] drm/amdkfd: Use asic specifc function to set CP wait time

2025-02-19 Thread Harish Kasiviswanathan
On 2025-02-18 15:27, Kim, Jonathan wrote: > [Public] > >> -Original Message- >> From: amd-gfx On Behalf Of Harish >> Kasiviswanathan >> Sent: Wednesday, February 12, 2025 5:04 PM >> To: amd-gfx@lists.freedesktop.org >> Cc: Kasiviswanathan,

[PATCH 2/4] drm/amdkfd: Use asic specifc function to set CP wait time

2025-02-12 Thread Harish Kasiviswanathan
Currently, grace period (SCH_WAVE) is set only for gfx943 APU. This could change as other wait times also needs to be set. Move ASIC specific settings to ASIC specific function. Signed-off-by: Harish Kasiviswanathan --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 28

[PATCH 1/4] drm/amdkfd: Rename grace_period to wait_times

2025-02-12 Thread Harish Kasiviswanathan
change intended. Signed-off-by: Harish Kasiviswanathan --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 46 +-- .../drm/amd/amdkfd/kfd_device_queue_manager.h | 2 +- .../gpu/drm/amd/amdkfd/kfd_packet_manager.c | 18 ++-- .../drm/amd/amdkfd/kfd_packet_manager_v9.c

[PATCH 4/4] drm/amdgpu: Set lower queue retry timeout for gfx9 family

2025-02-12 Thread Harish Kasiviswanathan
Set more optimized queue retry timeout for gfx9 family starting with arcturus. Signed-off-by: Harish Kasiviswanathan --- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c| 7 ++ .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.h| 1 + .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 8

[PATCH 3/4] drm/amdgpu: Don't modify grace_period in helper function

2025-02-12 Thread Harish Kasiviswanathan
build_grace_period_packet_info is asic helper function that fetches the correct format. It is the responsibility of the caller to validate the value. Signed-off-by: Harish Kasiviswanathan --- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c| 18 +-- .../gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu: Set snoop bit for SDMA for MI series

2025-02-06 Thread Harish Kasiviswanathan
SDMA writes has to probe invalidate RW lines. Set snoop bit in mmhub for this to happen. v2: Missed a few mmhub_v9_4. Added now. v3: Calculate hub offset once since it doesn't change inside the loop Modified function names based on review comments. Signed-off-by: Harish Kasiviswan

[PATCH] drm/amdgpu: Set snoop bit for SDMA for MI series

2025-02-05 Thread Harish Kasiviswanathan
SDMA writes has to probe invalidate RW lines. Set snoop bit in mmhub for this to happen. v2: Missed a few mmhub_v9_4. Added now. Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c | 25 ++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 27

[PATCH] drm/amdgpu: Set snoop bit for SDMA for MI series

2025-02-04 Thread Harish Kasiviswanathan
SDMA writes has to probe invalidate RW lines. Set snoop bit in mmhub for this to happen. Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c | 25 ++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 27 +++ drivers/gpu/drm/amd/amdgpu/mmhub_v9_4

[PATCH 2/2] drm/amdkfd: hard-code MALL Cacheline size for gfx11, gfx12

2024-11-28 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c index 3ca95f54601e..e0faec4682f3 100644 --- a/drivers/gpu/drm/amd

[PATCH 1/2] drm/amdkfd: hard-code cahceline for gc11

2024-11-28 Thread Harish Kasiviswanathan
This information is not available in ip discovery table. Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd

Re: [PATCH] drm/amdkfd: flag per-queue reset support for gfx9

2024-10-28 Thread Harish Kasiviswanathan
Reviewed-by: Harish Kasiviswanathan On 2024-10-22 13:36, Jonathan Kim wrote: > Flag KFD support for per-queue reset on GFX9 devices. > > Signed-off-by: Jonathan Kim > --- > drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 ++ > include/uapi/linux/kfd_sysfs.h

Re: [PATCH] drm/amdkfd: sever xgmi io link if host driver has disable sharing

2024-10-21 Thread Harish Kasiviswanathan
Reviewed-by: Harish Kasiviswanathan On 2024-10-16 15:08, Kim, Jonathan wrote: > [Public] > > Messed up James' email in Tested-by tag. CC'ing James. > >> -Original Message- >> From: Kim, Jonathan >> Sent: Wednesday, October 16, 2024 11:59 AM &g

[PATCH v2] drm/amdgpu: Indicate CU havest info to CP

2024-06-06 Thread Harish Kasiviswanathan
To achieve full occupancy CP hardware needs to know if CUs in SE are symmetrically or asymmetrically harvested v2: Reset is_symmetric_cus for each loop Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 15 +-- 1 file changed, 13 insertions(+), 2

[PATCH] drm/amdgpu: Indicate CU havest info to CP

2024-06-05 Thread Harish Kasiviswanathan
To achieve full occupancy CP hardware needs to know if CUs in SE are symmetrically or asymmetrically harvested Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm

[PATCH] drm/amdkfd: Ensure gpu_id is unique

2024-05-09 Thread Harish Kasiviswanathan
crc16 as suggested-by: Lijo Lazar Ensure that gpu_id != 0 Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 40 +++ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu

Re: [PATCH] drm/amdkfd: Ensure gpu_id is unique

2024-05-06 Thread Harish Kasiviswanathan
On 2024-05-06 16:30, Felix Kuehling wrote: > > On 2024-05-03 18:06, Harish Kasiviswanathan wrote: >> gpu_id needs to be unique for user space to identify GPUs via KFD >> interface. In the current implementation there is a very small >> probability of having non uniqu

[PATCH] drm/amdkfd: Ensure gpu_id is unique

2024-05-03 Thread Harish Kasiviswanathan
-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 26 ++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c index b93913934b03..01d4c2e10c6d 100644

[PATCH 2/2] drm/amdkfd: Improve chances of unique gpu_id

2024-05-01 Thread Harish Kasiviswanathan
gpu_id needs to be unique for user space to identify GPUs via KFD interface. Do a single pass search to detect collision. If detected, increment gpu_id by one. Probability of collisons are very rare. Hence, no more complexity is added to ensure uniqueness. Signed-off-by: Harish Kasiviswanathan

[PATCH 1/2] drm/amdkfd: Use dev_error intead of pr_error

2024-05-01 Thread Harish Kasiviswanathan
No functional change. This will help in moving gpu_id creation to next step while still being able to identify the correct GPU Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff

[PATCH] drm/amdkfd: Enforce queue BO's adev

2024-04-24 Thread Harish Kasiviswanathan
Queue buffer, though it is in system memory, has to be created using the correct amdgpu device. Enforce this as the BO needs to mapped to the GART for MES Hardware scheduler to access it. Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 + 1 file

[PATCH] drm/amdkfd: Reset GPU on queue preemption failure

2024-03-26 Thread Harish Kasiviswanathan
ff-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c index 151fabf84040..c08b6ee25289 100644 --- a/dr

[PATCH] drm/amdgpu: Removed used parameter

2024-02-27 Thread Harish Kasiviswanathan
Also passing adev is misleading if BO is associated with different adev. In this case BO is mapped to a different device Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++-- drivers/gpu/drm

[PATCH] drm/amdkfd: Insert missing TLB flush on GFX10 and later

2023-09-11 Thread Harish Kasiviswanathan
Heavy-weight TLB flush is required after unmap on all GPUs for correctness and security. Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm

[PATCH] drm/amdkfd: Add missing gfx11 MQD manager callbacks

2023-08-25 Thread Harish Kasiviswanathan
From: Jay Cornwall mqd_stride function was introduced in commit 129c7b6a0217 ("drm/amdkfd: Update MQD management on multi XCC setup") but not assigned for gfx11. Fixes a NULL dereference in debugfs. Signed-off-by: Jay Cornwall Signed-off-by: Harish Kasiviswanathan --- drivers/g

[PATCH] drm/amdkfd: ratelimited SQ interrupt messages

2023-08-10 Thread Harish Kasiviswanathan
No functional change. Use ratelimited version of pr_ to avoid overflowing of dmesg buffer Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c | 6 +++--- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c | 6 +++--- drivers/gpu/drm/amd/amdkfd

[PATCH] drm/amdgpu: Add decode_iv_ts helper for ih_v6 block

2022-08-15 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c index 92dc60a9d209..085e613f3646 100644 --- a/drivers/gpu

[PATCH] drm/amdgpu: Set correct DMA mask for aldebaran

2022-02-28 Thread Harish Kasiviswanathan
Aldebaran has 48-bit physical address support Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index

[PATCH v2] drm/amdkfd: Print bdf in peer map failure message

2022-02-22 Thread Harish Kasiviswanathan
Print alloc node, peer node and memory domain when peer map fails. This is more useful v2: use dev_err instead of pr_err use bdf for identify peer gpu Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 11 +-- 1 file changed, 9 insertions(+), 2

[PATCH] drm/amdgpu: Print node id in peer map failure message

2022-02-15 Thread Harish Kasiviswanathan
Print alloc node, peer node and memory domain when peer map fails. This is more useful Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers

[PATCH] drm/amdkfd: Add Aldebaran gws support

2021-04-27 Thread Harish Kasiviswanathan
v2: updated MEC FW version after validating gws with debugger Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd

[PATCH] drm/amd/pm: Use correct typecast

2021-04-26 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c index 1f02e4ee2909

[PATCH] drm/amd/pm: Update energy_accumulator in gpu metrics

2021-04-23 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c index dcbe3a72da09

[PATCH] drm/amdkfd: Add Aldebaran gws support

2021-04-21 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index b31bae91fbd0..bc57b07523e0 100644 --- a/drivers/gpu

[PATCH 4/4] Revert "drm/amdgpu: workaround the TMR MC address issue (v2)"

2021-04-09 Thread Harish Kasiviswanathan
From: Oak Zeng This reverts commit 34a33d4683cba7ba63c894132efb1998c0217631. Signed-off-by: Oak Zeng --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 9 - drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 10 -- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 21 ++--- drive

[PATCH 3/4] drm/amdgpu: Introduce new SETUP_TMR interface

2021-04-09 Thread Harish Kasiviswanathan
From: Oak Zeng This new interface passes both virtual and physical address to PSP. It is backward compatible with old interface. v2: use a function to simplify tmr physical address calc (Lijo) Signed-off-by: Oak Zeng Reviewed-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu

[PATCH 2/4] drm/amdgpu: Calling address translation functions to simplify codes

2021-04-09 Thread Harish Kasiviswanathan
From: Oak Zeng Use amdgpu_gmc_vram_pa and amdgpu_gmc_vram_cpu_pa to simplify codes. No logic change. Signed-off-by: Oak Zeng Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 3 +-- drivers/gpu/drm/amd

[PATCH 1/4] drm/amdgpu: Introduce functions for vram physical addr calculation

2021-04-09 Thread Harish Kasiviswanathan
From: Oak Zeng Add one function to calculate BO's GPU physical address. And another function to calculate BO's CPU physical address. v2: Use functions vs macros (Christian) Use more proper function names (Christian) Signed-off-by: Oak Zeng Suggested-by: Lijo Lazar Reviewed-by: Christian K

[PATCH] Revert "drm/amdgpu: During compute disable GFXOFF for Sienna_Cichlid"

2021-03-09 Thread Harish Kasiviswanathan
This reverts commit 73bf5cad2696fe3a21f70101821405db839ea18e. Fixed in newer firmware Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd

[PATCH] drm/amdkfd: PCIe atomics required for gfx10

2020-12-16 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan Change-Id: Ic139a8b9c8bef1df183804e543103be206405dca --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd

[PATCH] drm/amdgpu: During compute disable GFXOFF for Sienna_Cichlid

2020-10-22 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan Change-Id: Ia9f8872b7654b99864bbef1afb9998d0cf39b7e5 --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index

[PATCH v3] drm/amdgpu: Sync KFD fence only for move/evict

2017-10-20 Thread Harish Kasiviswanathan
jobs are identified by the fence owner AMDGPU_FENCE_OWNER_UNDEFINED v2: Always sync to exclusive fence v3: avoid unncessary diverge from amd-staging-drm-next Change-Id: I8752d1cf6b2a1c4f2a57292b7c2cd308d5b6f9b7 Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.

[PATCH v2] drm/amdgpu: Sync KFD fence only for move/evict

2017-10-20 Thread Harish Kasiviswanathan
jobs are identified by the fence owner AMDGPU_FENCE_OWNER_UNDEFINED v2: Always sync to exclusive fence Change-Id: I8752d1cf6b2a1c4f2a57292b7c2cd308d5b6f9b7 Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 8 1 file changed, 4 insertions(+), 4 dele

[PATCH] drm/amdgpu: Sync KFD fence only for move/evict

2017-10-19 Thread Harish Kasiviswanathan
jobs are identified by the fence owner AMDGPU_FENCE_OWNER_UNDEFINED Change-Id: I8752d1cf6b2a1c4f2a57292b7c2cd308d5b6f9b7 Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/dr

[PATCH] Sync KFD Eviction fence only for move / evict

2017-10-19 Thread Harish Kasiviswanathan
timeout the reverse is done to make the process queues active again. What is the current issue? Interop BOs. KFD fence is attached to shared BO. So when graphics tries do a CS using this BO, KFD driver mistakes this to be an eviction. This patch is to solve this issue. Harish

[PATCH v2 2/2] drm/amdgpu: Add amdgpu_find_mm_node()

2017-10-11 Thread Harish Kasiviswanathan
v2: Use amdgpu_find_mm_node() in amdgpu_ttm_io_mem_pfn() Change-Id: I12231e18bb60152843cd0e0213ddd0d0e04e7497 Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 49 ++--- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a

[PATCH v2 1/2] drm/amdgpu: Refactor amdgpu_move_blit

2017-10-11 Thread Harish Kasiviswanathan
nged amdgpu_copy_ttm_mem_to_mem() function parameters to use the struct v3: Minor function name change Change-Id: I848d541a84a1c2d12827d9dcf6d9054d854b4159 Signed-off-by: Harish Kasiviswanathan Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |

[PATCH v2 2/2] drm/amdgpu: Add amdgpu_find_mm_node()

2017-10-06 Thread Harish Kasiviswanathan
Change-Id: I12231e18bb60152843cd0e0213ddd0d0e04e7497 Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 36 +++-- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu

[PATCH v2 1/2] drm/amdgpu: Refactor amdgpu_move_blit

2017-10-06 Thread Harish Kasiviswanathan
nged amdgpu_copy_ttm_mem_to_mem() function parameters to use the struct Change-Id: I848d541a84a1c2d12827d9dcf6d9054d854b4159 Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 169 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 12 +++ 2 f

[PATCH] drm/amdgpu: Refactor amdgpu_move_blit

2017-10-05 Thread Harish Kasiviswanathan
4159 Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 159 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 7 ++ 2 files changed, 107 insertions(+), 59 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu

[PATCH 1/2] drm/amdgpu: vm_update_ptes remove code duplication

2017-06-09 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 73 -- 1 file changed, 16 insertions(+), 57 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index c4f1a30..c308047 100644

[PATCH 2/2] drm/amdgpu: Fix compiler warnings

2017-06-09 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index c308047..9743db5 100644 --- a/drivers/gpu/drm/amd

[PATCH 3/5] drm/amdgpu: Add amdgpu_sync_wait

2017-05-15 Thread Harish Kasiviswanathan
Helper function useful for CPU update of VM page tables. Also useful if kernel have to synchronously wait till VM page tables are updated. Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 19 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h | 1

[PATCH 4/5] drm/amdgpu: Support page directory update via CPU

2017-05-15 Thread Harish Kasiviswanathan
If amdgpu.vm_update_context param is set to use CPU, then Page Directories will be updated by CPU instead of SDMA Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 151 - 1 file changed, 109 insertions(+), 42 deletions(-) diff

[PATCH 1/5] drm/amdgpu: Return EINVAL if no PT BO

2017-05-15 Thread Harish Kasiviswanathan
This change is also useful for the upcoming changes where page tables can be updated by CPU. Change-Id: I07510ed60c94cf1944ee96bb4b16c40ec88ea17c Signed-off-by: Harish Kasiviswanathan Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 48

[PATCH 2/5] drm/amdgpu: Add vm context module param

2017-05-15 Thread Harish Kasiviswanathan
large BAR system vm_update_mode = 2, indicating that Graphics VMs will be updated via SDMA and Compute VMs will be updated via CPU. And for all all other systems (by default) vm_update_mode = 0 Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu

[PATCH 5/5] drm/amdgpu: Support page table update via CPU

2017-05-15 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 86 +- 1 file changed, 85 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index d72a624..e98d558 100644

[PATCH 4/4] drm/amdgpu: Support page table update via CPU

2017-05-11 Thread Harish Kasiviswanathan
Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 82 +- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 63f0572..63b4696 100644

[PATCH 1/4] drm/amdgpu: Return EINVAL if no PT BO

2017-05-11 Thread Harish Kasiviswanathan
This change is also useful for the upcoming changes where page tables can be updated by CPU. Change-Id: I07510ed60c94cf1944ee96bb4b16c40ec88ea17c Signed-off-by: Harish Kasiviswanathan Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 48

[PATCH 3/4] drm/amdgpu: Support page directory update via CPU

2017-05-11 Thread Harish Kasiviswanathan
If amdgpu.vm_update_context param is set to use CPU, then Page Directories will be updated by CPU instead of SDMA Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 141 +++-- 1 file changed, 99 insertions(+), 42 deletions(-) diff

[PATCH 2/4] drm/amdgpu: Add vm context module param

2017-05-11 Thread Harish Kasiviswanathan
for large BAR system vm_update_context = 2, indicating that Graphics VMs will be updated via SDMA and Compute VMs will be updated via CPU. And for all all other systems (by default) vm_update_context = 0 Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1