drm/amd/amdgpu: set allow_reserved_eviction and resv when bo allocation and cs
Subsystems (2)
PATCH 1/2 drm/amd/amdgpu: set allow_reserved_eviction and resv when bo allocation and cs
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +5 -1
@@ -343,7 +343,11 @@ static int amdgpu_cs_bo_validate(struct amdgpu_cs_parser *p, struct amdgpu_bo *bo) {struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev); -struct ttm_operation_ctx ctx = { true, false }; +struct ttm_operation_ctx ctx = { + .interruptible = true, + .no_wait_gpu = false, + .resv = bo->tbo.resv + };uint32_t domain;int r;
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +6 -1
@@ -327,7 +327,12 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,uint64_t init_value, struct amdgpu_bo **bo_ptr) { - struct ttm_operation_ctx ctx = { !kernel, false }; + struct ttm_operation_ctx ctx = { + .interruptible = !kernel, + .no_wait_gpu = false, + .allow_reserved_eviction = true, + .resv = resv + };struct amdgpu_bo *bo;enum ttm_bo_type type;unsigned long page_align;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Here again a better commit message is needed. Just something like the following:
This enables eviction of other per VM BOs during allocation and allows reaping of deleted per VM BOs during CS again.
With that fixed the patch is Reviewed-by: Christian König <[email protected]>.
Regards,
Christian.
Am 14.12.2017 um 09:12 schrieb Roger He:
Quoted 32 lines
Change-Id I0c6571c2a64e6c5bdad80ccbcccb40eba1c20b4eSigned-off-by Roger He <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +5
-1@@ -343,7 +343,11 @@ static int amdgpu_cs_bo_validate(struct amdgpu_cs_parser *p, struct amdgpu_bo *bo) {struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev); -struct ttm_operation_ctx ctx = { true, false }; +struct ttm_operation_ctx ctx = { + .interruptible = true, + .no_wait_gpu = false, + .resv = bo->tbo.resv + };uint32_t domain;int r;drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +0
-0@@ -327,7 +327,12 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,uint64_t init_value, struct amdgpu_bo **bo_ptr) {
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c static int amdgpu_bo_do_create(struct amdgpu_device *adev, · line 338
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +6
-1-struct ttm_operation_ctx ctx = { !kernel, false }; +struct ttm_operation_ctx ctx = { + .interruptible = !kernel, + .no_wait_gpu = false, + .allow_reserved_eviction = true, + .resv = resv + };struct amdgpu_bo *bo;enum ttm_bo_type type;unsigned long page_align;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Chunming Zhou
Reviewed-byQuoted 50 lines · Christian König
Here again a better commit message is needed. Just something like the following:
This enables eviction of other per VM BOs during allocation and allows reaping of deleted per VM BOs during CS again.
With that fixed the patch is Reviewed-by: Christian König <[email protected]>.
Regards,
Christian.Am 14.12.2017 um 09:12 schrieb Roger He:
Quoted 40 lines
Change-Id I0c6571c2a64e6c5bdad80ccbcccb40eba1c20b4eSigned-off-by Roger He <[email protected]>---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++++-drivers/gpu/drm/amd/amdgpu/amdgpu_object.c| 7 ++++++-2 files changed, 11 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +5
-1@@ -343,7 +343,11 @@ static int amdgpu_cs_bo_validate(struct amdgpu_cs_parser *p, struct amdgpu_bo *bo) { struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev); - struct ttm_operation_ctx ctx = { true, false }; + struct ttm_operation_ctx ctx = { + .interruptible = true, + .no_wait_gpu = false, + .resv = bo->tbo.resv + }; uint32_t domain; int r;diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.cb/drivers/gpu/drm/amd/amdgpu/amdgpu_object.cindex dc0a8be..86340cf 100644drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +6
-1@@ -327,7 +327,12 @@ static int amdgpu_bo_do_create(structamdgpu_device *adev, uint64_t init_value, struct amdgpu_bo **bo_ptr) { - struct ttm_operation_ctx ctx = { !kernel, false }; + struct ttm_operation_ctx ctx = { + .interruptible = !kernel, + .no_wait_gpu = false, + .allow_reserved_eviction = true, + .resv = resv + };
Quoted 8 lines
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +0
-0struct amdgpu_bo *bo; enum ttm_bo_type type;unsigned long
page_align;_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 12 lines · Roger He
Change-Id I0c6571c2a64e6c5bdad80ccbcccb40eba1c20b4eSigned-off-by Roger He <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_bo_validate(struct amdgpu_cs_parser *p, · line 350
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +5
-1@@ -343,7 +343,11 @@ static int amdgpu_cs_bo_validate(struct amdgpu_cs_parser *p, struct amdgpu_bo *bo) {struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev); -struct ttm_operation_ctx ctx = { true, false }; +struct ttm_operation_ctx ctx = { + .interruptible = true, + .no_wait_gpu = false, + .resv = bo->tbo.resv + };
Might be better to explicitly initialize
.allow_reserved_eviction = false,
here as well.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx