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

[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

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

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

[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 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 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 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 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 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 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] drm/amdgpu: error out on entity with no run queue

2020-01-09 Thread Nirmoy Das
Disabled HW IP's entity initialized with NULL rq. We should not process any submit request from userspace for a disabled HW IP. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b

[RFC PATCH] drm/scheduler: use idle time to do better loadbalance

2020-01-11 Thread Nirmoy Das
= == sdma0 113 sdma1 383 comp_1.0.0 9 comp_1.0.1 9 comp_1.1.0 8 comp_1.1.1 8 comp_1.2.012 comp_1.2.113 comp_1.3.016 comp_1.3.19 Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 9

[PATCH] drm/scheduler: improve job distribution with multiple queues

2020-01-15 Thread Nirmoy Das
= == sdma0 216 sdma1 185 comp_1.0.0 39 comp_1.0.1 9 comp_1.1.0 12 comp_1.1.1 0 comp_1.2.0 12 comp_1.2.1 0 comp_1.3.0 12 comp_1.3.1 0 Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 10 +- drivers/gpu/drm/scheduler

[PATCH] drm/scheduler: improve job distribution with multiple queues

2020-01-15 Thread Nirmoy Das
= == sdma0 218 sdma1 211 comp_1.0.0 39 comp_1.0.1 9 comp_1.1.0 12 comp_1.1.1 0 comp_1.2.0 12 comp_1.2.1 0 comp_1.3.0 12 comp_1.3.1 0 Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 9 - drivers/gpu/drm/scheduler

[PATCH] drm/scheduler: fix documentation by replacing rq_list with sched_list

2020-01-16 Thread Nirmoy Das
This also replaces old artifacts with a correct one in drm_sched_entity_init() declaration Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- include/drm/gpu_scheduler.h | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH] drm/scheduler: fix race condition in load balancer

2020-01-14 Thread Nirmoy Das
n earlier) Signed-off-by: Nirmoy Das Reported-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/scheduler/sched_entity.c | 9 +++-- drivers/gpu/drm/scheduler/sched_main.c | 1 + include/drm/gpu_scheduler.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dr

[RFC PATCH] drm/scheduler: use idle time to do better loadbalance

2020-01-14 Thread Nirmoy Das
= == sdma0 210 sdma1 211 comp_1.0.0 10 comp_1.0.1 10 comp_1.1.0 14 comp_1.1.1 6 comp_1.2.0 12 comp_1.2.1 14 comp_1.3.0 8 comp_1.3.1 10 Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c

[PATCH] drm/amdgpu: remove unnecessary conversion to bool

2020-01-20 Thread Nirmoy Das
Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/athub_v1_0.c| 4 ++-- drivers/gpu/drm/amd/amdgpu/athub_v2_0.c| 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4

[PATCH] drm/amdgpu: fix doc by clarifying sched_list definition

2020-01-22 Thread Nirmoy Das
expand sched_list definition for better understanding. Also fix a typo atleast -> at least Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- include/drm/gpu_scheduler.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/driv

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

2020-01-22 Thread Nirmoy Das
at amdgpu_ctx_priority_permit() Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 160 +--- 1 file changed, 87 insertions(+), 73 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index eecbd68db986..d704e1bebb1b 100644

[PATCH] drm/amdgpu: remove unused label

2020-01-22 Thread Nirmoy Das
Fixes: 445a7d54 (drm/amdgpu/vcn2.5: fix a bug for the 2nd vcn instance) Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c index de32e96a8409

[PATCH 1/2] drm/amdgpu: individualize amdgpu entity allocation per HW IP

2020-01-22 Thread Nirmoy Das
Do not allocate all the entity at once. This is required for dynamic amdgpu_ctx_entity creation. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 143 +--- 1 file changed, 76 insertions(+), 67 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu: fix a typo atleast -> at least

2020-01-20 Thread Nirmoy Das
Fixes: b8c8b23f58c71 (drm/scheduler: fix documentation by replacing rq_list with sched_list) Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm

[PATCH] drm/amdgpu: fix doc by clarifying sched_list definition

2020-01-20 Thread Nirmoy Das
expand sched_list definition for better understanding. Also fix a typo atleast -> at least Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- include/drm/gpu_scheduler.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/driv

[PATCH] drm/amdgpu: remove unnecessary conversion to bool

2020-01-20 Thread Nirmoy Das
Better clean that up before some automation starts to complain about it Signed-off-by: Nirmoy Das Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/athub_v1_0.c| 4 ++-- drivers

[PATCH] drm/amdgpu: individualize fence allocation per entity

2020-01-21 Thread Nirmoy Das
Allocate fences for each entity and remove ctx->fences reference as fences should be bound to amdgpu_ctx_entity instead amdgpu_ctx. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 43 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 1 - 2 fi

[PATCH] drm/amdgpu: individualize fence allocation per entity

2020-01-21 Thread Nirmoy Das
Allocate fences for each entity and remove ctx->fences reference as fences should be bound to amdgpu_ctx_entity instead amdgpu_ctx. Signed-off-by: Nirmoy Das Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 44 +++-- drivers/gpu/drm/amd/amd

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

2020-01-21 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 entities for a HW IP only when it is required. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu

[PATCH 1/2] drm/amdgpu: individualize amdgpu entity allocation per HW IP

2020-01-21 Thread Nirmoy Das
Do not allocate all the entity at once. This is required for dynamic amdgpu_ctx_entity creation. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 130 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/scheduler: fix documentation by replacing rq_list with sched_list

2020-01-14 Thread Nirmoy Das
Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index 2e3a058fc239..62bcca855c69 100644 --- a/drivers/gpu/drm/scheduler

[PATCH RESEND] drm/amdgpu: error out on entity with no run queue

2020-01-14 Thread Nirmoy Das
Disabled HW IP's entity initialized with NULL rq. We should not process any submit request from userspace for a disabled HW IP. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b

[PATCH] drm/amdgpu: catch amdgpu_irq_add_id failure

2020-01-08 Thread Nirmoy Das
Do not ignore amdgpu_irq_add_id return value while registering VMC page fault interrupt. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c

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

[RFC PATCH 1/2] drm/sched: implement drm_sched_entity_num_jobs

2020-03-11 Thread Nirmoy Das
Implement drm_sched_entity_num_jobs() so that drm drivers can query number of jobs in an entity. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/scheduler/sched_entity.c | 15 +++ include/drm/gpu_scheduler.h | 1 + 2 files changed, 16 insertions(+) diff --git a/drivers

[RFC PATCH 2/2] drm/amdgpu: disable gpu load balancer for vcn jobs

2020-03-11 Thread Nirmoy Das
VCN HW doesn't support dynamic load balance on multiple instances for a context. This modifies the entity's sched_list to a sched_list consist of only one drm scheduler. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 25

[PATCH 1/1] drm/amdgpu: disable gpu_sched load balancer for vcn jobs

2020-03-11 Thread Nirmoy Das
VCN HW doesn't support dynamic load balance on multiple instances for a context. This patch modifies entity's sched_list to a sched_list consist of only one drm scheduler. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c

[PATCH 1/1] drm/amdgpu: disable gpu_sched load balancer for vcn jobs

2020-03-11 Thread Nirmoy Das
VCN HW doesn't support dynamic load balance on multiple instances for a context. This patch modifies entity's sched_list to a sched_list consist of only one drm scheduler. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c

[PATCH 2/2] drm/amdgpu: disable gpu_sched load balancer for vcn jobs

2020-03-13 Thread Nirmoy Das
but not among multiple jobs in a context. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index fa575bdc03c8..8f1e3c05812e

[PATCH 1/2] drm/sched: implement and export drm_sched_pick_best

2020-03-13 Thread Nirmoy Das
Refactor drm_sched_entity_get_free_sched() to move the logic of picking the least loaded drm scheduler from a drm scheduler list to implement drm_sched_pick_best(). This patch also exports drm_sched_pick_best() so that it can be utilized by other drm drivers. Signed-off-by: Nirmoy Das

[PATCH v3 2/3] drm/sched: implement and export drm_sched_pick_best

2020-03-13 Thread Nirmoy Das
Remove drm_sched_entity_get_free_sched() and use the logic of picking the least loaded drm scheduler from a drm scheduler list to implement drm_sched_pick_best(). This patch also exports drm_sched_pick_best() so that it can be utilized by other drm drivers. Signed-off-by: Nirmoy Das --- drivers

[PATCH v2 3/3] drm/amdgpu: disable gpu_sched load balancer for vcn jobs

2020-03-13 Thread Nirmoy Das
but not among multiple jobs in a context. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 74c795a5e187

[PATCH 1/3] drm/amdgpu: fix switch-case indentation

2020-03-13 Thread Nirmoy Das
Fix switch-case indentation in amdgpu_ctx_init_entity() Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 82 - 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 2/2] drm/amdgpu: disable gpu_sched load balancer for vcn jobs

2020-03-13 Thread Nirmoy Das
but not among multiple jobs in a context. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index fa575bdc03c8..8f1e3c05812e

[PATCH v2 1/2] drm/sched: implement and export drm_sched_pick_best

2020-03-13 Thread Nirmoy Das
Remove drm_sched_entity_get_free_sched() and use the logic of picking the least loaded drm scheduler from a drm scheduler list to implement drm_sched_pick_best(). This patch also exports drm_sched_pick_best() so that it can be utilized by other drm drivers. Signed-off-by: Nirmoy Das --- drivers

[PATCH 1/2] drm/sched: implement and export drm_sched_pick_best

2020-03-13 Thread Nirmoy Das
Remove drm_sched_entity_get_free_sched() and use the logic of picking the least loaded drm scheduler from a drm scheduler list to implement drm_sched_pick_best(). This patch also exports drm_sched_pick_best() so that it can be utilized by other drm drivers. Signed-off-by: Nirmoy Das --- drivers

[PATCH 1/1] drm/amd/powerplay: fix a typo

2020-04-06 Thread Nirmoy Das
Util -> Until Fixes: 720de5122254e86 (drm/amd/powerplay: implement the is_dpm_running()) Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/powerplay/renoir_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c b/drivers/gpu/drm/

[PATCH 1/1] drm/amdgpu: add missing if clause guard

2020-03-25 Thread Nirmoy Das
| if (!amdgpu_sriov_vf(adev)) Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 54cfa3a12135..e192557db421 100644

[PATCH v5 2/2] drm/amdgpu: rework sched_list generation

2020-03-31 Thread Nirmoy Das
variables fix possible checkpatch.pl warnings Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 160 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h| 3 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH v2 1/2] drm/amdgpu: sync ring type and drm hw_ip type

2020-03-31 Thread Nirmoy Das
Use AMDGPU_HW_IP_* to set amdgpu_ring_type enum values Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu

[PATCH v4 2/2] drm/amdgpu: rework sched_list generation

2020-03-31 Thread Nirmoy Das
controlled variables. fix possible checkpatch.pl warnings. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 160 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h| 3 - drivers/gpu/drm/amd/amdgpu

[PATCH 1/2] drm/amdgpu: sync ring type with drm hw_ip type

2020-03-31 Thread Nirmoy Das
Move AMDGPU_RING_TYPE_KIQ at the end of amdgpu_ring_type enum to sync amdgpu_ring_type values with AMDGPU_HW_IP_* Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v2 1/1] drm/amdgpu: rework sched_list generation

2020-03-30 Thread Nirmoy Das
amdgpu_ctx_init_entity() much more leaner. v2: fix a coding style issue do not use drm hw_ip const to populate amdgpu_ring_type enum Signed-off-by: Nirmoy Das Acked-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 156

[PATCH v3 1/1] drm/amdgpu: rework sched_list generation

2020-03-30 Thread Nirmoy Das
amdgpu_ctx_init_entity() much more leaner. v2: fix a coding style issue do not use drm hw_ip const to populate amdgpu_ring_type enum v3: remove ctx reference and move sched array and num_sched to a struct use num_scheds to detect uninitialized scheduler list Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd

[RFC PATCH 1/1] drm/amdgpu: rework sched_list generation

2020-03-24 Thread Nirmoy Das
amdgpu_ctx_init_entity() much more leaner. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c| 148 - drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h| 3 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 - drivers/gpu

[PATCH 1/1] drm/amdgpu: cleanup sysfs file handling

2020-05-07 Thread Nirmoy Das
Create sysfs file using attributes when possible. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 36 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 114 +++-- 2 files changed, 48 insertions(+), 102 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 1/1] drm/amdgpu: cleanup sysfs file handling

2020-05-08 Thread Nirmoy Das
Create sysfs file using attributes. Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 36 -- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd

[PATCH 1/1] drm/amdgpu: disable gpu-sched load balance for uvd_enc

2020-09-02 Thread Nirmoy Das
the same context to a uvd instance. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 7cd398d25498..c80d8339f58c 100644 --- a/drivers/gpu

[PATCH 1/1] drm/amdgpu: disable gpu-sched load balance for uvd_enc

2020-09-02 Thread Nirmoy Das
the context to a uvd instance. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 7cd398d25498..c80d8339f58c 100644 --- a/drivers/gpu

[PATCH 1/1] drm/amdgpu: disable gpu-sched load balance for uvd

2020-08-31 Thread Nirmoy Das
UVD dependent jobs should run on the same udv instance. This patch disables gpu scheduler's load balancer for a context which binds jobs from same the context to a udv instance. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 1/1] drm/amdgpu: fix a typo

2020-09-08 Thread Nirmoy Das
Fixes: 9a0154630e958a2f (drm/amdgpu: Bring back support for non-upstream FreeSync) Signed-off-by: Nirmoy Das --- include/uapi/drm/amdgpu_drm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h index b826f2d6efe1

[PATCH 1/2] Revert "drm/amdgpu: disable gpu-sched load balance for uvd"

2020-09-01 Thread Nirmoy Das
This reverts commit e0300ed8820d19fe108006cf1b69fa26f0b4e3fc. We should also disable load balance for AMDGPU_HW_IP_UVD_ENC jobs. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 2/2] drm/amdgpu: disable gpu-sched load balance for uvd

2020-09-01 Thread Nirmoy Das
the context to a uvd instance. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 59032c26fc82..fc392dfd1789 100644

[PATCH 1/1] drm/amdgpu: fix compute queue priority if num_kcq is less than 4

2020-10-16 Thread Nirmoy Das
et compute queue priority at mqd_init) Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/

[PATCH 1/2] drm:amdgpu: check before setting hw priority

2020-10-14 Thread Nirmoy Das
Check validity of drm_gpu_scheduler before setting hw priority. Also fix a minor indentation issue. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b

[PATCH 2/2] drm/amdgpu: enable only one compute queue for raven

2020-10-14 Thread Nirmoy Das
Because of firmware bug, Raven asics can't handle jobs scheduled to multiple compute queues. So enable only one compute queue till we have a firmware fix. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 4 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 11 ++- 2

[PATCH 1/1] drm/amdgpu: fix compiler warnings

2020-08-27 Thread Nirmoy Das
:3381:6: warning: variable ‘r’ set but not used [-Wunused-but-set-variable] 3381 | int r; | ^ Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 1/1] drm/amdgpu: rework ip block reinit for sriov

2020-08-27 Thread Nirmoy Das
This patch removes some unwanted code duplication and simplifies sriov's ip block reinit logic. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 117 +++-- 1 file changed, 60 insertions(+), 57 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 1/1] drm/amdgpu: remove unused variable

2020-05-26 Thread Nirmoy Das
Fixes: 1291bd70a2ee4 ("drm/amdgpu/sriov skip the update of SMU_TABLE_ACTIVITY_MONITOR_COEFF") Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c b/drivers/g

<    1   2   3   4   5   >