[PATCH v4 1/1] drm/amdkfd: get doorbell's absolute offset based on the db_size

2023-10-05 Thread Arvind Yadav
: Squash the two patches into one. Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h| 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c| 13 + .../gpu/drm/amd/amdkfd

[PATCH v4 0/1] drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8

2023-10-05 Thread Arvind Yadav
. So that doorbell offset will be aligned based on the doorbell size. v2: - Addressed the review comment from Felix. v3: - Adding doorbell_size as parameter to get db absolute offset. v4: Squash the two patches into one. Arvind Yadav (1): drm/amdkfd: get doorbell's absolute offset based

[PATCH v3 2/2] drm/amdkfd: get doorbell's absolute offset based on the db size

2023-10-04 Thread Arvind Yadav
Deucher Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 +- drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 13 +++-- .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 4 +++- 3 files changed, 19

[PATCH v3 1/2] drm/amdgpu: Adding db_size to get doorbell absolute offset

2023-10-04 Thread Arvind Yadav
-by: Shashank Sharma Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell_mgr.c | 13 + 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h b/drivers

[PATCH v3 0/2] drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8

2023-10-04 Thread Arvind Yadav
. So that doorbell offset will be aligned based on the doorbell size. v2: - Addressed the review comment from Felix. v3: - Adding doorbell_size as parameter to get db absolute offset. Arvind Yadav (2): drm/amdgpu: Adding db_size to get doorbell absolute offset drm/amdkfd: get doorbell's

[PATCH v2 1/1] drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8

2023-09-28 Thread Arvind Yadav
This patch is to adjust the absolute doorbell offset against the doorbell id considering the doorbell size of 32/64 bit. v2: - Addressed the review comment from Felix. Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd

[PATCH v2 0/1] drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8

2023-09-28 Thread Arvind Yadav
/64 bit. v2: - Addressed the review comment from Felix. Arvind Yadav (1): drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.34.1

[PATCH 1/1] drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8

2023-09-27 Thread Arvind Yadav
This patch is to adjust the absolute doorbell offset against the doorbell id considering the doorbell size of 32/64 bit. Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 11

[PATCH 0/1] drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8

2023-09-27 Thread Arvind Yadav
of 32/64 bit. Arvind Yadav (1): drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) -- 2.34.1

[PATCH v3 7/7] Revert "drm/amd/amdgpu: switch on/off vcn power profile mode"

2023-08-28 Thread Arvind Yadav
Sharma Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c index 2d94f1b63bd6..70777fcfa626 100644

[PATCH v3 6/7] drm/amdgpu: switch workload context to/from compute

2023-08-28 Thread Arvind Yadav
This patch switches the GPU workload mode to/from compute mode, while submitting compute workload. v3: - Addressed the review comment about changing the function name from *_set() to *_get(). Cc: Christian Koenig Signed-off-by: Alex Deucher Reviewed-by: Shashank Sharma Signed-off-by: Arvind

[PATCH v3 5/7] drm/amdgpu: Set/Reset GPU workload profile

2023-08-28 Thread Arvind Yadav
Sharma Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c index c3d9d75143f4..c5032762d497 100644 --- a/drivers/gpu/drm/amd/amdgpu

[PATCH v3 4/7] drm/amdgpu: Add suspend function to clear the GPU power profile.

2023-08-28 Thread Arvind Yadav
: Alex Deucher Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_workload.c | 7 +++ drivers/gpu/drm/amd/include/amdgpu_workload.h | 2 ++ 3 files changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v3 3/7] drm/amdgpu: Add new function to put GPU power profile

2023-08-28 Thread Arvind Yadav
. - Added *_clear_all function to clear all the power profile. - scheduling delay work to clear the power profile when refcount becomes zero. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_workload.c | 118

[PATCH v3 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-28 Thread Arvind Yadav
the review comment. - Changing the function name from *_set() to *_get(). - Now setting a power profile when refcount is zero. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_workload.c | 59

[PATCH v3 1/7] drm/amdgpu: Added init/fini functions for workload

2023-08-28 Thread Arvind Yadav
Deucher Reviewed-by: Shashank Sharma Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 4 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_workload.c | 44

[PATCH v3 0/7] GPU workload hints for better performance

2023-08-28 Thread Arvind Yadav
. v3: - Addressed all review comment. - Changed the function name from *_set() to *_get(). - Now clearing all the profile in work handler. - Added *_clear_all function to clear all the power profile. Arvind Yadav (7): drm/amdgpu: Added init/fini functions for workload drm/amdgpu: Add new function

[PATCH v2 7/7] Revert "drm/amd/amdgpu: switch on/off vcn power profile mode"

2023-08-21 Thread Arvind Yadav
Deucher Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c index 2d94f1b63bd6..70777fcfa626 100644 --- a/drivers

[PATCH v2 6/7] drm/amdgpu: switch workload context to/from compute

2023-08-21 Thread Arvind Yadav
This patch switches the GPU workload mode to/from compute mode, while submitting compute workload. Cc: Christian Koenig Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 +--- 1 file changed, 5

[PATCH v2 5/7] drm/amdgpu: Switch on/off GPU workload profile

2023-08-21 Thread Arvind Yadav
This patch is to switch the GPU workload profile based on the submitted job. The workload profile is reset to default when the job is done. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 + 1 file

[PATCH v2 4/7] drm/amdgpu: Add suspend function to clear the GPU power profile.

2023-08-21 Thread Arvind Yadav
This patch adds a suspend function that will clear the GPU power profile before going into suspend state. v2: - Add the new suspend function based on review comment. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu

[PATCH v2 3/7] drm/amdgpu: Add new function to put GPU power profile

2023-08-21 Thread Arvind Yadav
function will cancel this work and set the GPU power profile based on preferences. v2: - Splitting workload_profile_set and workload_profile_put into two separate patches. - Addressed review comment. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav

[PATCH v2 2/7] drm/amdgpu: Add new function to set GPU power profile

2023-08-21 Thread Arvind Yadav
Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_workload.c | 56 +++ drivers/gpu/drm/amd/include/amdgpu_workload.h | 3 + 2 files changed, 59 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_workload.c b

[PATCH v2 1/7] drm/amdgpu: Added init/fini functions for workload

2023-08-21 Thread Arvind Yadav
The'struct amdgpu_smu_workload' initialization/cleanup functions is added by this patch. v2: - Splitting big patch into separate patches. - Added new fini function. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/Makefile

[PATCH v2 0/7] GPU workload hints for better performance

2023-08-21 Thread Arvind Yadav
. Arvind Yadav (7): drm/amdgpu: Added init/fini functions for workload drm/amdgpu: Add new function to set GPU power profile drm/amdgpu: Add new function to put GPU power profile drm/amdgpu: Add suspend function to clear the GPU power profile. drm/amdgpu: Switch on/off GPU workload profile

[PATCH 3/3] Revert "drm/amd/amdgpu: switch on/off vcn power profile mode"

2023-08-14 Thread Arvind Yadav
-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c index 2d94f1b63bd6..70777fcfa626 100644 --- a/drivers/gpu/drm/amd

[PATCH 2/3] drm/amdgpu: Switch on/off GPU workload profile

2023-08-14 Thread Arvind Yadav
This patch is to switch the GPU workload profile based on the submitted job. The workload profile is reset to default when the job is done. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 + 1 file

[PATCH 0/3] GPU workload hints for better performance

2023-08-14 Thread Arvind Yadav
on submitted job. This can optimize the power performance when the particular workload is on. Arvind Yadav (3): drm/amdgpu: Add new api to switch on/off power profile mode drm/amdgpu: Switch on/off GPU workload profile Revert "drm/amd/amdgpu: switch on/off vcn power profile mode" drive

[PATCH 1/3] drm/amdgpu: Add new api to switch on/off power profile mode

2023-08-14 Thread Arvind Yadav
This patch adds a function which will allow to change the GPU power profile based on a submitted job. This can optimize the power performance when the workload is on. Cc: Shashank Sharma Cc: Christian Koenig Cc: Alex Deucher Signed-off-by: Arvind Yadav --- drivers/gpu/drm/amd/amdgpu/Makefile

[PATCH RFC] dma-buf: To check DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT status on debug

2022-08-04 Thread Arvind Yadav
If core DMA-buf framework forgets to call dma_fence_enable_signaling() before calling the dma_fence_is_signaled(). To handle this scenario on debug kernel the DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT needs to be checked before checking the actual signaling status. Signed-off-by: Arvind Yadav

[PATCH] dma-buf: use struct_size helper instead of kzalloc

2022-07-27 Thread Arvind Yadav
-by: Arvind Yadav --- drivers/dma-buf/dma-fence-array.c | 6 ++ include/linux/dma-fence-array.h | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-buf/dma-fence-array.c index 5c8a7084577b..3ebb6c5fa287 100644 --- a/drivers

[PATCH] dma-buf: use struct_size helper instead of kzalloc

2022-07-25 Thread Arvind Yadav
-by: Arvind Yadav --- drivers/dma-buf/dma-fence-array.c | 6 ++ include/linux/dma-fence-array.h | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-buf/dma-fence-array.c index 5c8a7084577b..3ebb6c5fa287 100644 --- a/drivers

[PATCH 0/5] constify drm pci_device_id

2017-07-16 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Arvind Yadav (5): [PATCH 1/5] drm: radeon: constify pci_device_id. [PATCH 2/5] drm: vmwgfx: constify pci_device_id

[PATCH 1/5] drm: radeon: constify pci_device_id.

2017-07-16 Thread Arvind Yadav
/radeon/radeon_drv.o File size After adding 'const': textdata bss dec hex filename 28960 812 72 298447494 gpu/drm/radeon/radeon_drv.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/gpu/drm/radeon/radeon_drv.c | 2 +- 1 file changed, 1 ins

[PATCH] drm: amd: amdgpu: constify ttm_place structures.

2017-07-02 Thread Arvind Yadav
ttm_place are not supposed to change at runtime. All functions working with ttm_place provided by work with const ttm_place. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file chan

[PATCH] drm: radeon: radeon_ttm: constify ttm_place structures.

2017-07-02 Thread Arvind Yadav
/radeon_ttm.o File size After adding 'const': textdata bss dec hex filename 9267 312 136971525f3 drivers/gpu/drm/radeon/radeon_ttm.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- 1 file chan

[PATCH] drm: radeon: constify drm_prop_enum_list structures.

2017-07-01 Thread Arvind Yadav
48e4 drivers/gpu/drm/radeon/radeon_display.o File size After adding 'const': textdata bss dec hex filename 18660 0 0 1866048e4 drivers/gpu/drm/radeon/radeon_display.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/gpu/drm/