[PATCH 4/4] drm/scheduler: do not keep a copy of sched list

2019-12-09 Thread Nirmoy Das
entity should not keep copy and maintain sched list for itself. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler

[PATCH 1/4] drm/scheduler: rework entity creation

2019-12-09 Thread Nirmoy Das
for a drm scheduler. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++- drivers/gpu/drm

[PATCH 3/4] amd/amdgpu: add sched list to IPs with multiple run-queues

2019-12-09 Thread Nirmoy Das
This sched list can be passed on to entity creation routine instead of manually creating such sched list on every context creation. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 69 -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 44

[PATCH 2/4] drm/amdgpu: replace vm_pte's run-queue list with drm gpu scheds list

2019-12-09 Thread Nirmoy Das
drm_sched_entity_init() takes drm gpu scheduler list instead of drm_sched_rq list. This makes conversion of drm_sched_rq list to drm gpu scheduler list unnecessary Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd

[PATCH 1/4] drm/scheduler: rework entity creation

2019-12-11 Thread Nirmoy Das
for a drm scheduler. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++- drivers/gpu/drm

[PATCH 1/4 v2] drm/scheduler: rework entity creation

2019-12-11 Thread Nirmoy Das
for a drm scheduler. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++- drivers/gpu/drm

[PATCH 4/4] drm/scheduler: do not keep a copy of sched list

2019-12-11 Thread Nirmoy Das
entity should not keep copy and maintain sched list for itself. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/scheduler/sched_entity.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c

[PATCH 3/4 v2] amd/amdgpu: add sched array to IPs with multiple run-queues

2019-12-11 Thread Nirmoy Das
This sched array can be passed on to entity creation routine instead of manually creating such sched array on every context creation. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 113 + drivers/gpu/drm/amd/amdgpu

[PATCH 2/4] drm/amdgpu: replace vm_pte's run-queue list with drm gpu scheds list

2019-12-11 Thread Nirmoy Das
drm_sched_entity_init() takes drm gpu scheduler list instead of drm_sched_rq list. This makes conversion of drm_sched_rq list to drm gpu scheduler list unnecessary Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd

[PATCH 3/4] amd/amdgpu: add sched array to IPs with multiple run-queues

2019-12-11 Thread Nirmoy Das
This sched array can be passed on to entity creation routine instead of manually creating such sched array on every context creation. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 113 + drivers/gpu/drm/amd/amdgpu

[PATCH 4/4] drm/scheduler: do not keep a copy of sched list

2019-12-11 Thread Nirmoy Das
entity should not keep copy and maintain sched list for itself. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/scheduler/sched_entity.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c

[PATCH 2/4] drm/amdgpu: replace vm_pte's run-queue list with drm gpu scheds list

2019-12-11 Thread Nirmoy Das
drm_sched_entity_init() takes drm gpu scheduler list instead of drm_sched_rq list. This makes conversion of drm_sched_rq list to drm gpu scheduler list unnecessary Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd

[RFC PATCH] drm/scheduler: rework entity creation

2019-12-05 Thread Nirmoy Das
for a drm scheduler. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14

[PATCH v3] drm/scheduler: rework entity creation

2019-12-05 Thread Nirmoy Das
for a drm scheduler. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14

[PATCH] drm/scheduler: rework entity creation

2019-12-05 Thread Nirmoy Das
for a drm scheduler. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14

[PATCH v2] drm/scheduler: rework entity creation

2019-12-05 Thread Nirmoy Das
for a drm scheduler. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14

[PATCH v3] drm/scheduler: rework entity creation

2019-12-05 Thread Nirmoy Das
for a drm scheduler. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++- drivers/gpu/drm

[PATCH 1/4] drm/scheduler: rework entity creation

2019-12-06 Thread Nirmoy Das
for a drm scheduler. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++- drivers/gpu/drm

[PATCH 2/4] drm/amdgpu: replace vm_pte's run-queue list with drm gpu scheds list

2019-12-06 Thread Nirmoy Das
drm_sched_entity_init() takes drm gpu scheduler list instead of drm_sched_rq list. This makes conversion of drm_sched_rq list to drm gpu scheduler list unnecessary Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 11

[PATCH 3/4] drm/amdgpu: allocate entities on demand

2019-12-06 Thread Nirmoy Das
Currently we pre-allocate entities for all the HW IPs on context creation and some of which are might never be used. This patch tries to resolve entity wastage by creating entities for a HW IP only when it is required. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 176

[PATCH 4/4] drm/scheduler: do not keep a copy of sched list

2019-12-06 Thread Nirmoy Das
entity should not keep copy and maintain sched list for itself. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 11 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 1 + drivers/gpu/drm/scheduler/sched_entity.c | 12 +--- 3 files changed, 10 insertions

[PATCH v2 0/4] drm/amdgpu: cleanup entity creation

2019-12-16 Thread Nirmoy Das
v2 Changes: rebased 0003-amd-amdgpu-add-sched-array-to-IPs-with-multiple-run-.patch because of a5c191e9cd09a8fa697865882619692b4dba8417(drm/amdgpu: fix JPEG instance checking when ctx init) Nirmoy Das (4): drm/scheduler: rework entity creation drm/amdgpu: replace vm_pte's run-queue list

[PATCH v2 4/4] drm/scheduler: do not keep a copy of sched list

2019-12-16 Thread Nirmoy Das
entity should not keep copy and maintain sched list for itself. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/scheduler/sched_entity.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c

[PATCH v2 2/4] drm/amdgpu: replace vm_pte's run-queue list with drm gpu scheds list

2019-12-16 Thread Nirmoy Das
drm_sched_entity_init() takes drm gpu scheduler list instead of drm_sched_rq list. This makes conversion of drm_sched_rq list to drm gpu scheduler list unnecessary Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd

[PATCH v2 3/4] amd/amdgpu: add sched array to IPs with multiple run-queues

2019-12-16 Thread Nirmoy Das
This sched array can be passed on to entity creation routine instead of manually creating such sched array on every context creation. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 114 + drivers/gpu/drm/amd/amdgpu

[PATCH v2 1/4] drm/scheduler: rework entity creation

2019-12-16 Thread Nirmoy Das
for a drm scheduler. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++- drivers/gpu/drm

[PATCH] amd/amdgpu: add missing break statement

2019-12-16 Thread Nirmoy Das
Fixes: 8c066a8c7a9ac9a66 (amd/amdgpu: add sched array to IPs with multiple run-queues) Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c

[PATCH 2/4] drm/amdgpu: replace vm_pte's run-queue list with drm gpu scheds list

2019-12-10 Thread Nirmoy Das
drm_sched_entity_init() takes drm gpu scheduler list instead of drm_sched_rq list. This makes conversion of drm_sched_rq list to drm gpu scheduler list unnecessary Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd

[PATCH 3/4 v2] amd/amdgpu: add sched array to IPs with multiple run-queues

2019-12-10 Thread Nirmoy Das
This sched array can be passed on to entity creation routine instead of manually creating such sched array on every context creation. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 113 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h| 3 + drivers

[PATCH 1/4] drm/scheduler: rework entity creation

2019-12-10 Thread Nirmoy Das
for a drm scheduler. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++- drivers/gpu/drm

[PATCH 4/4] drm/scheduler: do not keep a copy of sched list

2019-12-10 Thread Nirmoy Das
entity should not keep copy and maintain sched list for itself. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler

[PATCH 4/4] drm/scheduler: do not keep a copy of sched list

2019-12-10 Thread Nirmoy Das
entity should not keep copy and maintain sched list for itself. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler

[PATCH 1/4] drm/scheduler: rework entity creation

2019-12-10 Thread Nirmoy Das
for a drm scheduler. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 ++- drivers/gpu/drm

[PATCH 2/4] drm/amdgpu: replace vm_pte's run-queue list with drm gpu scheds list

2019-12-10 Thread Nirmoy Das
drm_sched_entity_init() takes drm gpu scheduler list instead of drm_sched_rq list. This makes conversion of drm_sched_rq list to drm gpu scheduler list unnecessary Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd

[PATCH 3/4 v2] amd/amdgpu: add sched array to IPs with multiple run-queues

2019-12-10 Thread Nirmoy Das
This sched array can be passed on to entity creation routine instead of manually creating such sched array on every context creation. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 113 + drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu: remove unused variable in amdgpu_gfx_kiq_free_ring

2019-10-24 Thread Nirmoy Das
Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 3 +-- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 5 files changed, 5

[RFC PATCH] drm/amdgpu: allocate entities on demand

2019-11-26 Thread Nirmoy Das
Currently we pre-allocate entities for all the HW IPs on context creation and some of which are might never be used. This patch tries to resolve entity wastage by creating entities for a HW IP only when it is required. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 142

[RFC PATCH] drm/amdgpu: fix amdgpu_vm_handle_fault return value

2019-10-10 Thread Nirmoy Das
amdgpu_vm_handle_fault should return true on success Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index d9bece987e60

[PATCH] drm/amdgpu: fix memory leak

2019-10-04 Thread Nirmoy Das
cleanup error handling code and make sure temporary info array with the handles are freed by amdgpu_bo_list_put() on idr_replace()'s failure. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[RFC PATCH 4/6] drm/nouveau: don't use ttm bo->offset

2020-02-13 Thread Nirmoy Das
Signed-off-by: Nirmoy Das --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 6 +++--- drivers/gpu/drm/nouveau/dispnv04/disp.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/overlay.c | 6 +++--- drivers/gpu/drm/nouveau/dispnv50/base507c.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/core507d.c

[RFC PATCH 1/6] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-13 Thread Nirmoy Das
GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 22 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 + drivers

[RFC PATCH 5/6] drm/qxl: don't use ttm bo->offset

2020-02-13 Thread Nirmoy Das
Signed-off-by: Nirmoy Das --- drivers/gpu/drm/qxl/qxl_drv.h| 6 ++ drivers/gpu/drm/qxl/qxl_kms.c| 3 +++ drivers/gpu/drm/qxl/qxl_object.h | 5 - drivers/gpu/drm/qxl/qxl_ttm.c| 9 - 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/qxl

[RFC PATCH 3/6] drm/vmwgfx: don't use ttm bo->offset

2020-02-13 Thread Nirmoy Das
Signed-off-by: Nirmoy Das --- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c| 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 2 -- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git

[RFC PATCH 2/6] drm/radeon: don't use ttm bo->offset

2020-02-13 Thread Nirmoy Das
Signed-off-by: Nirmoy Das --- drivers/gpu/drm/radeon/radeon.h| 1 + drivers/gpu/drm/radeon/radeon_object.h | 16 +++- drivers/gpu/drm/radeon/radeon_ttm.c| 4 +--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers

[RFC PATCH 0/6] do not store GPU address in TTM

2020-02-13 Thread Nirmoy Das
/msg272238.html Nirmoy Das (6): drm/amdgpu: move ttm bo->offset to amdgpu_bo drm/radeon: don't use ttm bo->offset drm/vmwgfx: don't use ttm bo->offset drm/nouveau: don't use ttm bo->offset drm/qxl: don't use ttm bo->offset drm/ttm: do not keep GPU dependent addresses

[RFC PATCH 6/6] drm/ttm: do not keep GPU dependent addresses

2020-02-13 Thread Nirmoy Das
GPU address handling is device specific and should be handle by its device driver. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/ttm/ttm_bo.c| 7 --- include/drm/ttm/ttm_bo_api.h| 2 -- include/drm/ttm/ttm_bo_driver.h | 1 - 3 files changed, 10 deletions(-) diff --git a/drivers/gpu

[RFC PATCH 1/3] drm/amdgpu: implement ring init_priority for compute ring

2020-02-26 Thread Nirmoy Das
init_priority will set second compute queue(gfx8 and gfx9) of a pipe to high priority and 1st queue to normal priority. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 14 ++ drivers/gpu/drm/amd/amdgpu

[RFC PATCH 0/3] cleanup compute queue priority setting

2020-02-26 Thread Nirmoy Das
This is my initial idea which sets half compute queues to normal priority and other half to high priority. I am reusing existing set_priority codes here. My understanding of gfx_v*_0_pipe_reserve_resources is very low so I am probably doing some mistake at init_priority() Nirmoy Das (3): drm

[RFC PATCH 3/3] drm/amdgpu: remove unused functions

2020-02-26 Thread Nirmoy Das
Remove unused amdgpu_ring_priority_put() and amdgpu_ring_priority_get() Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 70 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 4 -- 2 files changed, 74 deletions(-) diff --git a/drivers/gpu/drm/amd

[RFC PATCH 2/3] drm/amdgpu: change hw sched list on ctx priority override

2020-02-26 Thread Nirmoy Das
priority compute queues. When there are no high priority hw queues then it fall backs to software priority. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 -- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 58 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h

[PATCH 6/8] drm/vram-helper: don't use ttm bo->offset v3

2020-03-05 Thread Nirmoy Das
Calculate GEM VRAM bo's offset within vram-helper without depending on bo->offset. Signed-off-by: Nirmoy Das Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_gem_vram_helper.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c

[PATCH 5/8] drm/qxl: don't use ttm bo->offset

2020-03-05 Thread Nirmoy Das
This patch removes slot->gpu_offset which is not required as VRAM and PRIV slot are in separate PCI bar. This patch also removes unused qxl_bo_gpu_offset() Signed-off-by: Nirmoy Das Acked-by: Christian König Acked-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h| 6 ++ drivers/

[PATCH 7/8] drm/bochs: use drm_gem_vram_offset to get bo offset v2

2020-03-05 Thread Nirmoy Das
Switch over to GEM VRAM's implementation to retrieve bo->offset. Signed-off-by: Nirmoy Das Reviewed-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bo

[PATCH 4/8] drm/nouveau: don't use ttm bo->offset v3

2020-03-05 Thread Nirmoy Das
Store ttm bo->offset in struct nouveau_bo instead. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 6 +++--- drivers/gpu/drm/nouveau/dispnv04/disp.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/overlay.c | 6 +++--- drivers/gpu/drm/nouveau/dispnv50/base507

[PATCH 1/8] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-03-05 Thread Nirmoy Das
GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Signed-off-by: Nirmoy Das Acked-by: Huang Rui Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 22 ++-- drivers

[PATCH v4 0/8] do not store GPU address in TTM

2020-03-05 Thread Nirmoy Das
yle fixes in amdgpu and radeon * remove unnecessary kerneldoc for internal function Nirmoy Das (8): drm/amdgpu: move ttm bo->offset to amdgpu_bo drm/radeon: don't use ttm bo->offset drm/vmwgfx: don't use ttm bo->offset drm/nouveau: don't use ttm bo->offset v3 drm/qxl: don't use ttm

[PATCH 2/8] drm/radeon: don't use ttm bo->offset

2020-03-05 Thread Nirmoy Das
Calculate GPU offset in radeon_bo_gpu_offset without depending on bo->offset. Signed-off-by: Nirmoy Das Reviewed-and-tested-by: Christian König --- drivers/gpu/drm/radeon/radeon.h| 1 + drivers/gpu/drm/radeon/radeon_object.h | 16 +++- drivers/gpu/drm/radeon/radeon_tt

[PATCH 3/8] drm/vmwgfx: don't use ttm bo->offset

2020-03-05 Thread Nirmoy Das
Calculate GPU offset within vmwgfx driver itself without depending on bo->offset. Signed-off-by: Nirmoy Das Acked-by: Christian König Acked-by: Thomas Hellstrom Tested-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c

[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses

2020-03-05 Thread Nirmoy Das
GPU address handling is device specific and should be handle by its device driver. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/ttm/ttm_bo.c| 7 --- include/drm/ttm/ttm_bo_api.h| 2 -- include/drm/ttm/ttm_bo_driver.h | 1 - 3 files changed, 10 deletions(-) diff --git a/drivers/gpu

[PATCH v5 1/4] drm/amdgpu: set compute queue priority at mqd_init

2020-03-02 Thread Nirmoy Das
compute sched lists are generated from set of high/normal priority compute queues. At context creation, entity of compute queue get a sched list from high or normal priority depending on ctx->priority Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 -- drivers/gpu/

[PATCH v4 3/4] drm/amdgpu: change hw sched list on ctx priority override

2020-03-02 Thread Nirmoy Das
Switch to appropriate sched list for an entity on priority override. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 32 + 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm

[PATCH 4/4] drm/amdgpu: remove unused functions

2020-03-02 Thread Nirmoy Das
amdgpu statically set priority for compute queues at initialization so remove all the functions responsible changing compute queue priority dynamically Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 70 drivers/gpu/drm

[PATCH v2 2/4] drm/scheduler: implement a function to modify sched list

2020-03-02 Thread Nirmoy Das
implement drm_sched_entity_modify_sched() which can modify existing sched_list with a different one. This is going to be helpful when userspace changes priority of a ctx/entity then driver can switch to corresponding hw shced list for that priority Signed-off-by: Nirmoy Das Reviewed

[PATCH v1 4/4] drm/amdgpu: remove unused functions

2020-03-02 Thread Nirmoy Das
amdgpu statically set priority for compute queues at initialization so remove all the functions responsible changing compute queue priority dynamically Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 70 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 7

[PATCH v3 3/4] drm/amdgpu: change hw sched list on ctx priority override

2020-03-02 Thread Nirmoy Das
Switch to appropriate sched list for an entity on priority override. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 30 + 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm

[PATCH v4 1/4] drm/amdgpu: set compute queue priority at mqd_init

2020-03-02 Thread Nirmoy Das
compute sched lists are generated from set of high/normal priority compute queues. At context creation, entity of compute queue get a sched list from high or normal priority depending on ctx->priority Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 -- drivers/gpu/

[PATCH v2 2/4] drm/scheduler: implement a function to modify sched list

2020-03-02 Thread Nirmoy Das
implement drm_sched_entity_modify_sched() which can modify existing sched_list with a different one. This is going to be helpful when userspace changes priority of a ctx/entity then driver can switch to corresponding hw shced list for that priority Signed-off-by: Nirmoy Das --- drivers/gpu/drm

[PATCH 4/4] drm/amdgpu: remove unused functions

2020-03-03 Thread Nirmoy Das
amdgpu statically set priority for compute queues at initialization so remove all the functions responsible changing compute queue priority dynamically Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 70 drivers/gpu/drm

[PATCH v2 2/4] drm/scheduler: implement a function to modify sched list

2020-03-03 Thread Nirmoy Das
implement drm_sched_entity_modify_sched() which can modify existing sched_list with a different one. This is going to be helpful when userspace changes priority of a ctx/entity then driver can switch to corresponding hw shced list for that priority Signed-off-by: Nirmoy Das Reviewed

[PATCH v6 1/1] drm/amdgpu: set compute queue priority at mqd_init

2020-03-03 Thread Nirmoy Das
compute sched lists are generated from set of high/normal priority compute queues. At context creation, entity of compute queue get a sched list from high or normal priority depending on ctx->priority Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 -- drivers/gpu/

[PATCH v4 3/4] drm/amdgpu: change hw sched list on ctx priority override

2020-03-03 Thread Nirmoy Das
Switch to appropriate sched list for an entity on priority override. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 32 + 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm

[PATCH v2 2/4] drm/scheduler: implement a function to modify sched list

2020-02-28 Thread Nirmoy Das
implement drm_sched_entity_modify_sched() which can modify existing sched_list with a different one. This is going to be helpful when userspace changes priority of a ctx/entity then driver can switch to corresponding hw shced list for that priority Signed-off-by: Nirmoy Das --- drivers/gpu/drm

[PATCH 4/4] drm/amdgpu: remove unused functions

2020-02-28 Thread Nirmoy Das
amdgpu statically set priority for compute queues at initialization so remove all the functions responsible changing compute queue priority dynamically Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 70 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 7

[PATCH v2 1/4] drm/amdgpu: set compute queue priority at mqd_init

2020-02-28 Thread Nirmoy Das
compute sched lists are generated from set of high/normal priority compute queues. At context creation, entity of compute queue get a sched list from high or normal priority depending on ctx->priority Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 --- drivers/gpu/

[PATCH v2 3/4] drm/amdgpu: change hw sched list on ctx priority override

2020-02-28 Thread Nirmoy Das
Switch to appropriate sched list for an entity on priority override. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 27 + 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm

[PATCH v3 3/4] drm/amdgpu: change hw sched list on ctx priority override

2020-02-28 Thread Nirmoy Das
Switch to appropriate sched list for an entity on priority override. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 30 + 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm

[PATCH v3 1/4] drm/amdgpu: set compute queue priority at mqd_init

2020-02-28 Thread Nirmoy Das
compute sched lists are generated from set of high/normal priority compute queues. At context creation, entity of compute queue get a sched list from high or normal priority depending on ctx->priority Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 -- drivers/gpu/

[PATCH v2 2/4] drm/scheduler: implement a function to modify sched list

2020-02-28 Thread Nirmoy Das
implement drm_sched_entity_modify_sched() which can modify existing sched_list with a different one. This is going to be helpful when userspace changes priority of a ctx/entity then driver can switch to corresponding hw shced list for that priority Signed-off-by: Nirmoy Das --- drivers/gpu/drm

[PATCH 4/4] drm/amdgpu: remove unused functions

2020-02-28 Thread Nirmoy Das
amdgpu statically set priority for compute queues at initialization so remove all the functions responsible changing compute queue priority dynamically Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 70 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 7

[PATCH] drm/amdgpu: cleanup amdgpu_ring_fini

2020-02-25 Thread Nirmoy Das
cleanup amdgpu_ring_fini to check the prerequisites before changing ring->sched.ready Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/

[PATCH] drm/amdgpu: do not modify ring before doing ring validation

2020-02-25 Thread Nirmoy Das
changing ring->sched.ready should be done only if the ring is initialized Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amd

[PATCH] drm/amdgpu: use amdgpu_ring_test_helper when possible

2020-02-25 Thread Nirmoy Das
amdgpu_ring_test_helper already handles ring->sched.ready correctly Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 9 ++--- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 6 ++ 3 files changed, 5 insertions(+),

[RFC PATCH 3/4] drm/amdgpu: change hw sched list on ctx priority override

2020-02-27 Thread Nirmoy Das
Switch to appropriate sched list for an entity on priority override. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 54 - 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd

[RFC PATCH 1/4] drm/amdgpu: set compute queue priority at mqd_init

2020-02-27 Thread Nirmoy Das
PE1 will be in high priority. high/normal priority compute sched list are generated from set of high/normal priority compute queues. At context creation, entity of compute queue get a sched list from high or normal priority depending on ctx->priority Signed-off-by: Nirmoy Das --- drivers/gpu/d

[RFC PATCH 4/4] drm/amdgpu: remove unused functions

2020-02-27 Thread Nirmoy Das
amdgpu statically set priority for compute queues at initialization so remove all the functions responsible changing compute queue priority dynamically Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 70 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 7

[RFC PATCH 2/4] drm/scheduler: implement a function to modify sched list

2020-02-27 Thread Nirmoy Das
implement drm_sched_entity_modify_sched() which can modify existing sched_list with a different one. This is going to be helpful when userspace changes priority of a ctx/entity then driver can switch to corresponding hw shced list for that priority Signed-off-by: Nirmoy Das --- drivers/gpu/drm

[RFC PATCH 1/1] drm/amdgpu: wait for sched to become ready on job submit

2020-02-24 Thread Nirmoy Das
On reset, amdgpu can set a drm sched's ready status to false temporarily. drm job init will fail if all of the drm scheds are not ready for a HW IP. This patch tries to make kernel's internal drm job submit handle, amdgpu_job_submit() a bit more fault tolerant. Signed-off-by: Nirmoy Das

[RFC PATCH 1/1] drm/amdgpu: wait for sched to become ready on job submit

2020-02-24 Thread Nirmoy Das
On reset, amdgpu can set a drm sched's ready status to false temporarily. drm job init will fail if all of the drm scheds are not ready for a HW IP. This patch tries to make kernel's internal drm job submit handle, amdgpu_job_submit() a bit more fault tolerant. Signed-off-by: Nirmoy Das

[PATCH] drm/amdgpu: allocate entities on demand

2020-01-24 Thread Nirmoy Das
Currently we pre-allocate entities and fences for all the HW IPs on context creation and some of which are might never be used. This patch tries to resolve entity/fences wastage by creating entity only when needed. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 232

[PATCH] drm/amdgpu: allocate entities on demand

2020-01-24 Thread Nirmoy Das
Currently we pre-allocate entities and fences for all the HW IPs on context creation and some of which are might never be used. This patch tries to resolve entity/fences wastage by creating entity only when needed. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 244

[PATCH] drm/amdgpu: allocate entities on demand

2020-01-23 Thread Nirmoy Das
Currently we pre-allocate entities and fences for all the HW IPs on context creation and some of which are might never be used. This patch tries to resolve entity/fences wastage by creating entity only when needed. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 244

[PATCH] drm/amdgpu: allocate entities on demand

2020-01-24 Thread Nirmoy Das
Currently we pre-allocate entities and fences for all the HW IPs on context creation and some of which are might never be used. This patch tries to resolve entity/fences wastage by creating entity only when needed. v2: allocate memory for entity and fences together Signed-off-by: Nirmoy Das

[PATCH V2] drm/amdgpu: allocate entities on demand

2020-01-24 Thread Nirmoy Das
Currently we pre-allocate entities and fences for all the HW IPs on context creation and some of which are might never be used. This patch tries to resolve entity/fences wastage by creating entity only when needed. v2: allocate memory for entity and fences together Signed-off-by: Nirmoy Das

[PATCH] drm/amdgpu: fix empty return on non-void function

2020-02-04 Thread Nirmoy Das
This fixes empty return on non-void function, amdgpu_xgmi_remove_device Fixes: b80574252499e (drm/amdgpu: move xgmi init/fini to xgmi_add/remove_device call) Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 2/8] drm/radeon: don't use ttm bo->offset

2020-02-17 Thread Nirmoy Das
Calculate GPU offset in radeon_bo_gpu_offset without depending on bo->offset Signed-off-by: Nirmoy Das Reviewed-and-tested-by: Christian König --- drivers/gpu/drm/radeon/radeon.h| 1 + drivers/gpu/drm/radeon/radeon_object.h | 16 +++- drivers/gpu/drm/radeon/radeon_tt

[PATCH 0/8] do not store GPU address in TTM

2020-02-17 Thread Nirmoy Das
With this patch series I am trying to remove GPU address dependency in TTM and moving GPU address calculation to individual drm drivers. I tested this patch series on qxl, bochs and amdgpu. Christian tested it on radeon HW. It would be nice if someone test this for nouveau and vmgfx. Nirmoy Das

[PATCH 3/8] drm/vmwgfx: don't use ttm bo->offset

2020-02-17 Thread Nirmoy Das
Calculate GPU offset within vmwgfx driver itself without depending on bo->offset Signed-off-by: Nirmoy Das Acked-by: Christian König --- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c| 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c

[PATCH 6/8] drm/vram-helper: don't use ttm bo->offset

2020-02-17 Thread Nirmoy Das
Calculate GPU offset within vram-helper without depending on bo->offset Signed-off-by: Nirmoy Das --- drivers/gpu/drm/drm_gem_vram_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c in

[PATCH 1/8] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-17 Thread Nirmoy Das
GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Signed-off-by: Nirmoy Das Acked-by: Huang Rui Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 22 ++-- drivers

[PATCH 8/8] drm/ttm: do not keep GPU dependent addresses

2020-02-17 Thread Nirmoy Das
GPU address handling is device specific and should be handle by its device driver. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/ttm/ttm_bo.c| 7 --- include/drm/ttm/ttm_bo_api.h| 2 -- include/drm/ttm/ttm_bo_driver.h | 1 - 3 files changed, 10 deletions(-) diff --git a/drivers/gpu

  1   2   3   4   5   >