[PATCH 2/2] drm/amdgpu: cleanup drm_gpu_scheduler array creation

2020-03-10 Thread Nirmoy Das
Move initialization of struct drm_gpu_scheduler array, amdgpu_ctx_init_sched() to amdgpu_ring.c. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 75 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h| 3 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2

[PATCH 1/2] drm/amdgpu: do not set nil entry in compute_prio_sched

2020-03-10 Thread Nirmoy Das
If there are no high priority compute queues available then set normal priority sched array to compute_prio_sched[AMDGPU_GFX_PIPE_PRIO_HIGH] Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git

[PATCH 2/2] drm/amdgpu: fix assigning nil entry in compute_prio_sched

2020-03-10 Thread Nirmoy Das
If there is no high priority compute queue then set normal priority sched array to compute_prio_sched[AMDGPU_GFX_PIPE_PRIO_HIGH] Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH 2/2] drm/amdgpu: do not set nil entry in compute_prio_sched

2020-03-10 Thread Nirmoy Das
If there are no high priority compute queues available then set normal priority sched array to compute_prio_sched[AMDGPU_GFX_PIPE_PRIO_HIGH] Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git

[PATCH 1/2] drm/amdgpu: cleanup drm_gpu_scheduler array creation

2020-03-10 Thread Nirmoy Das
Move initialization of struct drm_gpu_scheduler array, amdgpu_ctx_init_sched() to amdgpu_ring.c. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 68 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h| 3 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2

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

2020-03-09 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 | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm

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

2020-03-09 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 Acked-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_c

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

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

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

2020-03-09 Thread Nirmoy Das
AMDGPU statically sets priority for compute queues at initialization so remove all the functions responsible for 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

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

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

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

2020-03-09 Thread Nirmoy Das
AMDGPU statically sets priority for compute queues at initialization so remove all the functions responsible for 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

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

2020-03-09 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 Acked-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_c

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

2020-03-09 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 | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm

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

[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 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 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 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 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] 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(+),

[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

[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 4/8] drm/nouveau: don't use ttm bo->offset v3

2020-02-19 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 5/8] drm/qxl: don't use ttm bo->offset

2020-02-19 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 8/8] drm/ttm: do not keep GPU dependent addresses

2020-02-19 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 v3 0/8] do not store GPU address in TTM

2020-02-19 Thread Nirmoy Das
bo->offset = 0 for drm/nouveau if bo->mem.mm_node == NULL v3: * catch return value of drm_gem_vram_offset() in drm/bochs * introduce drm_gem_vram_pg_offset() in vram helper * improve nbo->offset calculation for nouveau Nirmoy Das (8): drm/amdgpu: move ttm bo->offset to amdgpu_bo

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

2020-02-19 Thread Nirmoy Das
Calculate GEM VRAM bo's offset within vram-helper without depending on bo->offset Signed-off-by: Nirmoy Das --- drivers/gpu/drm/drm_gem_vram_helper.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/

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

2020-02-19 Thread Nirmoy Das
Switch over to GEM VRAM's implementation to retrieve bo->offset Signed-off-by: Nirmoy Das --- 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/bochs/bochs_kms.c index 8066d7d37

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

2020-02-19 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 2/8] drm/radeon: don't use ttm bo->offset

2020-02-19 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-02-19 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 v2 6/8] drm/vram-helper: don't use ttm bo->offset

2020-02-18 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 v2 5/8] drm/qxl: don't use ttm bo->offset

2020-02-18 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 v2 7/8] drm/bochs: use drm_gem_vram_offset to get bo offset

2020-02-18 Thread Nirmoy Das
Switch over to GEM VRAM's implementation to retrieve bo->offset Signed-off-by: Nirmoy Das Acked-by: Christian König --- drivers/gpu/drm/bochs/bochs_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_km

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

2020-02-18 Thread Nirmoy Das
Store ttm bo->offset in struct nouveau_bo instead. Signed-off-by: Nirmoy Das Acked-by: Christian König --- 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/

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

2020-02-18 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 v2 2/8] drm/radeon: don't use ttm bo->offset

2020-02-18 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 v2 1/8] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-18 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 4/8] drm/nouveau: don't use ttm bo->offset

2020-02-17 Thread Nirmoy Das
Store ttm bo->offset in struct nouveau_bo instead. Signed-off-by: Nirmoy Das Christian König --- 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/nouv

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

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

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

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

2020-02-17 Thread Nirmoy Das
Switch over to GEM VRAM's implementation to retrieve bo->offset Signed-off-by: Nirmoy Das --- drivers/gpu/drm/bochs/bochs_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 8066d7d37

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

2020-02-17 Thread Nirmoy Das
This patch also removes slot->gpu_offset which is not required as VRAM and PRIV slot are in separate PCI bar Signed-off-by: Nirmoy Das --- drivers/gpu/drm/qxl/qxl_drv.h| 5 ++--- drivers/gpu/drm/qxl/qxl_kms.c| 5 ++--- drivers/gpu/drm/qxl/qxl_object.h | 5 - drivers/gpu/drm/

[PATCH 6/7] drm/bochs: don't use ttm bo->offset

2020-02-17 Thread Nirmoy Das
Calculate GPU offset within bochs driver itself without depending on bo->offset Signed-off-by: Nirmoy Das --- drivers/gpu/drm/bochs/bochs_kms.c | 3 ++- drivers/gpu/drm/drm_gem_vram_helper.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bo

[RFC PATCH 0/6] 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

[PATCH 3/7] 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 --- 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/vmw

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

2020-02-17 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 2/7] 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 7/7] 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

[PATCH 1/7] 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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 22 ++-- drivers/gpu/drm/amd/amdgpu

[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 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 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 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 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 v3] drm/amdgpu: move ttm bo->offset to amdgpu_bo

2020-02-11 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 | 28 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1

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

2020-02-11 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

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

2020-02-11 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_amdkfd.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 4 +- drivers/gpu/drm

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

<    1   2   3   4   5   >