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

2023-10-05 Thread Arvind Yadav
t. v4: 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/a

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

2023-10-05 Thread Arvind Yadav
sizes. 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 offse

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

2023-10-04 Thread Arvind Yadav
Alex 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 change

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

2023-10-04 Thread Arvind Yadav
ff-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/dr

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

2023-10-04 Thread Arvind Yadav
sizes. 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 doorb

[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
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 --- a

[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
Cc: Christian Koenig Cc: Alex 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/

[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-20 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-20 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-20 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-20 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-20 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-20 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-20 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/amdgp

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

2023-08-20 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 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 0/3] GPU workload hints for better performance

2023-08-14 Thread Arvind Yadav
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] Revert "drm/sched: Use parent fence instead of finished"

2022-12-02 Thread Arvind Yadav
ater. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/scheduler/sched_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 820c0c5544e1..ea7bfa99d6c9 100644 --- a/drivers/gpu/drm/sched

[PATCH] drm/syncobj : Enable signaling on fence for syncobj

2022-10-20 Thread Arvind Yadav
Here's enabling software signaling on fence for syncobj. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/drm_syncobj.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index 0c2be8360525..2ab7a1a9eeb4 100644 --- a/driver

[PATCH v4] drm/sched: Fix kernel NULL pointer dereference error

2022-10-18 Thread Arvind Yadav
b7/0x210 [amdgpu] amdgpu_ih_process+0x86/0x100 [amdgpu] amdgpu_irq_handler+0x24/0x60 [amdgpu] __handle_irq_event_percpu+0x4b/0x190 handle_irq_event_percpu+0x15/0x50 handle_irq_event+0x39/0x60 handle_edge_irq+0xaf/0x210 __common_interrupt+0x6e/0x110 common_interrupt+0xc1/0xe0 Signe

[PATCH v3] drm/sched: Fix kernel NULL pointer dereference error

2022-10-17 Thread Arvind Yadav
e_irq+0xaf/0x210 __common_interrupt+0x6e/0x110 common_interrupt+0xc1/0xe0 Signed-off-by: Arvind Yadav --- Changes in v2: Moving 'dma_fence_cb' callback from job(struct drm_sched_job) to scheduler fence(struct drm_sched_fence) instead of adding NULL check for s_fe

[PATCH v2] drm/sched: Fix kernel NULL pointer dereference error

2022-10-12 Thread Arvind Yadav
x24/0x60 [amdgpu] __handle_irq_event_percpu+0x4b/0x190 handle_irq_event_percpu+0x15/0x50 handle_irq_event+0x39/0x60 handle_edge_irq+0xaf/0x210 __common_interrupt+0x6e/0x110 common_interrupt+0xc1/0xe0 Signed-off-by: Arvind Yadav --- Changes in v2: Moving 'dma_fence_cb' callback from jo

[PATCH] drm/sched: Fix kernel NULL pointer dereference error

2022-09-30 Thread Arvind Yadav
amdgpu] amdgpu_ih_process+0x86/0x100 [amdgpu] amdgpu_irq_handler+0x24/0x60 [amdgpu] __handle_irq_event_percpu+0x4b/0x190 handle_irq_event_percpu+0x15/0x50 handle_irq_event+0x39/0x60 handle_edge_irq+0xaf/0x210 __common_interrupt+0x6e/0x110 common_interrupt+0xc1/0xe0 Signed-off-by: Arvind

[PATCH v2] drm/sched: Add NULL check for s_fence->parent

2022-09-30 Thread Arvind Yadav
NULL check is added for s_fence->parent. Signed-off-by: Arvind Yadav --- changes in v1 : subject 'drm/sched:' was missing. drivers/gpu/drm/scheduler/sched_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/dr

[PATCH] Add NULL check for s_fence->parent

2022-09-30 Thread Arvind Yadav
NULL check is added for s_fence->parent. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/scheduler/sched_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 4f2395d1a791..6684d8846

[PATCH 1/3] dma-buf: Remove the signaled bit status check

2022-09-27 Thread Arvind Yadav
Remove the extra signaled bit status check because it is returning early when the fence is already signaled and __dma_fence_enable_signaling is checking the status of signaled bit again. Signed-off-by: Arvind Yadav --- drivers/dma-buf/dma-fence.c | 5 - 1 file changed, 5 deletions(-) diff

[PATCH 2/3] dma-buf: Enable signaling on fence for sw_sync

2022-09-27 Thread Arvind Yadav
Here's enabling software signaling on fence for sw_sync. Signed-off-by: Arvind Yadav --- drivers/dma-buf/sw_sync.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dma-buf/sw_sync.c b/drivers/dma-buf/sw_sync.c index 348b3a9170fa..d2a52ceac14e 100644 --- a/drivers/dma-buf/sw_s

[PATCH 3/3] dma-buf: Check status of enable-signaling bit on debug

2022-09-27 Thread Arvind Yadav
bugs resulting in not signaled fences much more obvious. Signed-off-by: Arvind Yadav --- include/linux/dma-fence.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h index 775cdc0b4f24..5156dc6be0a6 100644 --- a/include/linux/dma

[PATCH 0/3] dma-buf: Check status of enable-signaling bit on debug

2022-09-27 Thread Arvind Yadav
make any implementation bugs resulting in not signaled fences much more obvious. Arvind Yadav (3): [PATCH 1/3] dma-buf: Remove the signaled bit status check [PATCH 2/3] dma-buf: Enable signaling on fence for sw_sync [PATCH 3/3] dma-buf: Check status of enable-signaling bit on debug drivers

[PATCH v4 5/6] drm/sched: Use parent fence instead of finished

2022-09-14 Thread Arvind Yadav
Using the parent fence instead of the finished fence to get the job status. This change is to avoid GPU scheduler timeout error which can cause GPU reset. Signed-off-by: Arvind Yadav Reviewed-by: Andrey Grodzovsky --- changes in v1,v2 - Enable signaling for finished fence in sche_main() is

[PATCH v4 6/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-14 Thread Arvind Yadav
resulting in not signaled fences much more obvious. Signed-off-by: Arvind Yadav --- Changes in v1,v2 : 1- Addressing Christian's comment to replace CONFIG_DEBUG_WW_MUTEX_SLOWPATH instead of CONFIG_DEBUG_FS. 2- As per Christian's comment moving this patch at last so The version of thi

[PATCH v4 3/6] dma-buf: Enable signaling on fence for selftests

2022-09-14 Thread Arvind Yadav
Here's enabling software signaling on fence for selftest. Signed-off-by: Arvind Yadav Reviewed-by: Christian König --- Changes in v1 : 1- Addressing Christian's comment to remove unnecessary callback. 2- Replacing CONFIG_DEBUG_WW_MUTEX_SLOWPATH instead of CONFIG_DEBUG_FS. 3- The

[PATCH v4 4/6] dma-buf: dma_fence_wait must enable signaling

2022-09-14 Thread Arvind Yadav
dma_fence_wait() should always enable signaling even when the fence is already signaled. Signed-off-by: Arvind Yadav --- Changes in v1..v3: This new patch was not part of previous series. --- drivers/dma-buf/dma-fence.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a

[PATCH v4 2/6] dma-buf: set signaling bit for the stub fence

2022-09-14 Thread Arvind Yadav
Here's setting software signaling bit for the stub fence which is always signaled. If this fence signaling bit is not set then the AMD GPU scheduler will cause a GPU reset due to a GPU scheduler cleanup activity timeout. Signed-off-by: Arvind Yadav Reviewed-by: Christian König --- Chang

[PATCH v4 1/6] dma-buf: Remove the signaled bit status check

2022-09-14 Thread Arvind Yadav
Remove the signaled bit status check because it is returning early when the fence is already signaled and __dma_fence_enable_signaling is checking the status of signaled bit again. Signed-off-by: Arvind Yadav Reviewed-by: Christian König --- Changes in v1, v2: This new patch was not part of

[PATCH v4 0/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-14 Thread Arvind Yadav
resulting in not signaled fences much more obvious. Arvind Yadav (6): [PATCH v4 1/6] dma-buf: Remove the signaled bit status check [PATCH v4 2/6] dma-buf: set signaling bit for the stub fence [PATCH v4 3/6] dma-buf: Enable signaling on fence for selftests [PATCH v4 4/6] dma-buf: dma_fence_wait

[PATCH v3 6/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-09 Thread Arvind Yadav
resulting in not signaled fences much more obvious. Signed-off-by: Arvind Yadav --- Changes in v1,v2 : 1- Addressing Christian's comment to replace CONFIG_DEBUG_WW_MUTEX_SLOWPATH instead of CONFIG_DEBUG_FS. 2- As per Christian's comment moving this patch at last so The version of this pat

[PATCH v3 5/6] drm/sched: Use parent fence instead of finished

2022-09-09 Thread Arvind Yadav
Using the parent fence instead of the finished fence to get the job status. This change is to avoid GPU scheduler timeout error which can cause GPU reset. Signed-off-by: Arvind Yadav --- changes in v1,v2 - Enable signaling for finished fence in sche_main() is removed --- drivers/gpu/drm

[PATCH v3 4/6] drm/amdgpu: Enable signaling on fence.

2022-09-09 Thread Arvind Yadav
Here's enabling software signaling on fence because amdgpu_ctx_add_fence() is checking the status of fence and emits warning. Signed-off-by: Arvind Yadav --- Changes in v1, v2: This new patch was not part of previous series. --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 ++ 1 file ch

[PATCH v3 3/6] dma-buf: Enable signaling on fence for selftests

2022-09-09 Thread Arvind Yadav
Here's enabling software signaling on fence for selftest. Signed-off-by: Arvind Yadav --- Changes in v1 : 1- Addressing Christian's comment to remove unnecessary callback. 2- Replacing CONFIG_DEBUG_WW_MUTEX_SLOWPATH instead of CONFIG_DEBUG_FS. 3- The version of this patch is also c

[PATCH v3 2/6] dma-buf: set signaling bit for the stub fence

2022-09-09 Thread Arvind Yadav
Here's setting software signaling bit for the stub fence which is always signaled. If this fence signaling bit is not set then the AMD GPU scheduler will cause a GPU reset due to a GPU scheduler cleanup activity timeout. Signed-off-by: Arvind Yadav --- Changes in v1 : 1- Addressing Christ

[PATCH v3 1/6] dma-buf: Remove the signaled bit status check

2022-09-09 Thread Arvind Yadav
Remove the signaled bit status check because it is returning early when the fence is already signaled and __dma_fence_enable_signaling is checking the status of signaled bit again. Signed-off-by: Arvind Yadav --- Changes in v1, v2: This new patch was not part of previous series. --- drivers

[PATCH v3 0/6] dma-buf: Check status of enable-signaling bit on debug

2022-09-09 Thread Arvind Yadav
resulting in not signaled fences much more obvious. Arvind Yadav (6): [PATCH v3 1/6] dma-buf: Remove the signaled bit status check [PATCH v3 2/6] dma-buf: set signaling bit for the stub fence [PATCH v3 3/6] dma-buf: Enable signaling on fence for selftests [PATCH v3 4/6] drm/amdgpu: Enable

[PATCH v2 4/4] dma-buf: Check status of enable-signaling bit on debug

2022-09-05 Thread Arvind Yadav
bit status to confirm that enable_signaling is enabled. Signed-off-by: Arvind Yadav --- Changes in v1 : 1- Addressing Christian's comment to replace CONFIG_DEBUG_WW_MUTEX_SLOWPATH instead of CONFIG_DEBUG_FS. 2- As per Christian's comment moving this patch at last so The version of thi

[PATCH v2 3/4] dma-buf: enable signaling for selftest fence on debug

2022-09-05 Thread Arvind Yadav
Here's on debug enabling software signaling for selftest. Signed-off-by: Arvind Yadav --- Changes in v1 : 1- Addressing Christian's comment to remove unnecessary callback. 2- Replacing CONFIG_DEBUG_WW_MUTEX_SLOWPATH instead of CONFIG_DEBUG_FS. 3- The version of this patch is also c

[PATCH v2 2/4] dma-buf: enable signaling for the stub fence on debug

2022-09-05 Thread Arvind Yadav
Here's on debug enabling software signaling for the stub fence which is always signaled. This fence should enable software signaling otherwise the AMD GPU scheduler will cause a GPU reset due to a GPU scheduler cleanup activity timeout. Signed-off-by: Arvind Yadav --- Changes in v

[PATCH v2 1/4] drm/sched: Enable signaling for finished fence

2022-09-05 Thread Arvind Yadav
Here's enabling software signaling for finished fence. Signed-off-by: Arvind Yadav --- Changes in v1 : 1- Addressing Christian's comment to remove CONFIG_DEBUG_FS check from this patch. 2- The version of this patch is also changed and previously it was [PATCH 2/4] --- drive

[PATCH v2 0/4] dma-buf: To check enable signaling before signaled

2022-09-05 Thread Arvind Yadav
calling dma_fence_is_signaled(). To avoid this scenario on debug kernel, check the DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT bit status before checking the MA_FENCE_FLAG_SIGNALED_BIT bit status to confirm that software signaling is enabled. Arvind Yadav (4): [PATCH v2 1/4] drm/sched: Enable signaling for

[PATCH 4/4] dma-buf: Add callback and enable signaling on debug

2022-09-05 Thread Arvind Yadav
Here's on debug adding an enable_signaling callback for fences and enabling software signaling for selftest. Signed-off-by: Arvind Yadav --- drivers/dma-buf/st-dma-fence-chain.c | 17 + drivers/dma-buf/st-dma-fence-unwrap.c | 54 +++ drivers/dma-buf/s

[PATCH 3/4] dma-buf: Add callback and enable signaling on debug

2022-09-05 Thread Arvind Yadav
meout. Signed-off-by: Arvind Yadav --- drivers/dma-buf/dma-fence.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 066400ed8841..0a67af945ef8 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fe

[PATCH 2/4] drm/sched: Add callback and enable signaling on debug

2022-09-05 Thread Arvind Yadav
Here's on debug adding an enable_signaling callback for finished fences and enabling software signaling for finished fence. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/scheduler/sched_fence.c | 12 drivers/gpu/drm/scheduler/sched_main.c | 4 +++- 2 files change

[PATCH 1/4] dma-buf: Check status of enable-signaling bit on debug

2022-09-05 Thread Arvind Yadav
bit status to confirm that enable_signaling is enabled. Signed-off-by: Arvind Yadav --- include/linux/dma-fence.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h index 775cdc0b4f24..60c0e935c0b5 100644 --- a/include/linux/dma-fence.h

[PATCH 0/4] dma-buf: To check enable signaling before signaled

2022-09-05 Thread Arvind Yadav
calling dma_fence_is_signaled(). To avoid this scenario on debug kernel, check the DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT bit status before checking the MA_FENCE_FLAG_SIGNALED_BIT bit status to confirm that software signaling is enabled. Arvind Yadav (4): dma-buf: Check status of enable-signaling bit

[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] drm/sti: Handle return value of platform_get_irq_byname

2017-11-20 Thread Arvind Yadav
platform_get_irq_byname() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/sti/sti_hdmi.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c index 30f02d2..adabd41 100644 --- a

[PATCH 0/2] Handle / Release memory obtained by kasprintf

2017-09-20 Thread Arvind Yadav
Arvind Yadav (2): [PATCH 1/2] drm: tegra: dc: Handle return value of kasprintf [PATCH 2/2] drm: Release memory obtained by kasprintf drivers/gpu/drm/drm_crtc.c | 1 + drivers/gpu/drm/tegra/dc.c | 2 ++ 2 files changed, 3 insertions(+) -- 1.9.1

[PATCH 2/2] drm: Release memory obtained by kasprintf

2017-09-20 Thread Arvind Yadav
Free memory region, if drm_crtc_init_with_planes is not successful. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/drm_crtc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 5af25ce..cd4e628 100644 --- a/drivers/gpu/drm

[PATCH 1/2] drm: tegra: dc: Handle return value of kasprintf

2017-09-20 Thread Arvind Yadav
kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/tegra/dc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 4df3911..f3214a1 100644 --- a/drivers/gpu/drm/tegra/dc.c

[PATCH] drm: vmwgfx: constify vmw_fence_ops

2017-08-30 Thread Arvind Yadav
vmw_fence_ops are not supposed to change at runtime. Functions "dma_fence_init" working with const vmw_fence_ops provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] drm: pl111: constify amba_id

2017-08-23 Thread Arvind Yadav
amba_id are not supposed to change at runtime. All functions working with const amba_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/pl111/pl111_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/pl111

Re: [PATCH 0/3] constify drm i2c_device_id

2017-08-22 Thread Arvind Yadav
Hi Daniel, On Tuesday 22 August 2017 12:01 PM, Daniel Vetter wrote: On Sat, Aug 19, 2017 at 11:58:17PM +0530, Arvind Yadav wrote: i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const

[PATCH] drm: virtio: constify drm_fb_helper_funcs

2017-08-21 Thread Arvind Yadav
drm_fb_helper_funcs are not supposed to change at runtime. All functions working with drm_fb_helper_funcs provided by work with const drm_fb_helper_funcs. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/virtio/virtgpu_fb.c | 2 +- 1 file changed, 1

[PATCH 1/3] drm: i2c: ch7006: constify i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i2c/ch7006_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] drm: mxsfb: constify drm_simple_display_pipe_funcs

2017-08-21 Thread Arvind Yadav
drm_simple_display_pipe_funcs are not supposed to change at runtime. All functions working with drm_simple_display_pipe_funcs provided by work with const drm_simple_display_pipe_funcs. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 2

[PATCH 3/3] drm: i2c: tda998x: constify i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i2c/tda998x_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 2/3] drm: i2c: sil164: constify i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i2c/sil164_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 0/3] constify drm i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Arvind Yadav (3): [PATCH 1/3] drm: i2c: ch7006: constify i2c_device_id [PATCH 2/3] drm: i2c: sil164: constify

[PATCH] drm: bridge: dw-hdmi: constify snd_pcm_ops structures

2017-08-09 Thread Arvind Yadav
snd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by work with const snd_pcm_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 2 +- 1 file changed, 1 insertion

[PATCH 06/11] drm: i915: i915_oa_hsw: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_oa_hsw.c | 12 ++-- 1 file changed, 6

[PATCH 09/11] drm: i915: i915_oa_sklgt3: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_oa_sklgt3.c | 36

Re: [Intel-gfx] [PATCH 00/11] constify i915 attribute_group structures.

2017-08-04 Thread Arvind Yadav
ike a good change. Thanks, - Lionel On 04/08/17 06:03, Arvind Yadav wrote: attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Arvind Yadav (11): [PATCH 01/11

[PATCH 03/11] drm: i915: i915_oa_bxt: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_oa_bxt.c | 30 +++--- 1 file

Re: [Intel-gfx] [PATCH 00/11] constify i915 attribute_group structures.

2017-08-04 Thread Arvind Yadav
On Friday 04 August 2017 04:04 PM, Lionel Landwerlin wrote: On 04/08/17 11:22, Arvind Yadav wrote: Hi Lionel, On Friday 04 August 2017 02:33 PM, Lionel Landwerlin wrote: Hi Arwind, These files were generated by a script maintained in this repository : https://github.com/rib/gputop/blob

[PATCH 11/11] drm: i915: i915_sysfs: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_sysfs.c | 6 +++--- 1 file changed, 3 insertions

[PATCH 05/11] drm: i915: i915_oa_glk: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_oa_glk.c | 30 +++--- 1 file

[PATCH 02/11] drm: i915: i915_oa_bdw: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_oa_bdw.c | 44

[PATCH 00/11] constify i915 attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Arvind Yadav (11): [PATCH 01/11] drm: i915: i915_oa_kblgt2: constify attribute_group structures. [PATCH 02/11

[PATCH 08/11] drm: i915: i915_oa_sklgt2: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_oa_sklgt2.c | 36

[PATCH 07/11] drm: i915: i915_oa_kblgt3: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_oa_kblgt3.c | 36

[PATCH 04/11] drm: i915: i915_oa_chv: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_oa_chv.c | 28 ++-- 1 file

[PATCH 01/11] drm: i915: i915_oa_kblgt2: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_oa_kblgt2.c | 36

[PATCH 10/11] drm: i915: i915_oa_sklgt4: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_oa_sklgt4.c | 36

[PATCH 4/5] drm: via: constify pci_device_id.

2017-07-15 Thread Arvind Yadav
/drm/via/via_drv.o File size After adding 'const': textdata bss dec hex filename 821 744 01565 61d drivers/gpu/drm/via/via_drv.o Signed-off-by: Arvind Yadav --- drivers/gpu/drm/via/via_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 3/5] drm: nouveau: constify pci_device_id.

2017-07-15 Thread Arvind Yadav
/nouveau/nouveau_drm.o File size After adding 'const': textdata bss dec hex filename 12360 256 976 135923518 gpu/drm/nouveau/nouveau_drm.o Signed-off-by: Arvind Yadav --- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 2/5] drm: vmwgfx: constify pci_device_id.

2017-07-15 Thread Arvind Yadav
/vmwgfx/vmwgfx_drv.o File size After adding 'const': textdata bss dec hex filename 13829 736 20 1458538f9 gpu/drm/vmwgfx/vmwgfx_drv.o Signed-off-by: Arvind Yadav --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 0/5] constify drm pci_device_id

2017-07-15 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-15 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 --- drivers/gpu/drm/radeon/radeon_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

  1   2   >