* [PATCH 1/2] drm/ttm: remove priority hard code when initializing ttm bo @ 2018-05-11 4:57 Junwei Zhang 2018-05-11 4:58 ` [PATCH 2/2] drm/amdgpu: set ttm bo priority before initialization Junwei Zhang 0 siblings, 1 reply; 4+ messages in thread From: Junwei Zhang @ 2018-05-11 4:57 UTC (permalink / raw) To: amd-gfx, dri-devel; +Cc: Junwei Zhang, christian.koenig Then priority could be set before initialization. By default, it requires to kzalloc ttm bo. In fact, we always do so. Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> --- drivers/gpu/drm/ttm/ttm_bo.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 98e06f8..cba5015 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1175,7 +1175,6 @@ int ttm_bo_init_reserved(struct ttm_bo_device *bdev, reservation_object_init(&bo->ttm_resv); atomic_inc(&bo->bdev->glob->bo_count); drm_vma_node_reset(&bo->vma_node); - bo->priority = 0; /* * For ttm_bo_type_device buffers, allocate -- 1.9.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] drm/amdgpu: set ttm bo priority before initialization 2018-05-11 4:57 [PATCH 1/2] drm/ttm: remove priority hard code when initializing ttm bo Junwei Zhang @ 2018-05-11 4:58 ` Junwei Zhang [not found] ` <1526014680-4644-2-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Junwei Zhang @ 2018-05-11 4:58 UTC (permalink / raw) To: amd-gfx, dri-devel; +Cc: Junwei Zhang, christian.koenig Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index e62153a..6a9e46a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -419,6 +419,8 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, bo->tbo.bdev = &adev->mman.bdev; amdgpu_ttm_placement_from_domain(bo, bp->domain); + if (bp->type == ttm_bo_type_kernel) + bo->tbo.priority = 1; r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, bp->type, &bo->placement, page_align, &ctx, acc_size, @@ -434,9 +436,6 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, else amdgpu_cs_report_moved_bytes(adev, ctx.bytes_moved, 0); - if (bp->type == ttm_bo_type_kernel) - bo->tbo.priority = 1; - if (bp->flags & AMDGPU_GEM_CREATE_VRAM_CLEARED && bo->tbo.mem.placement & TTM_PL_FLAG_VRAM) { struct dma_fence *fence; -- 1.9.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <1526014680-4644-2-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>]
* RE: [PATCH 2/2] drm/amdgpu: set ttm bo priority before initialization [not found] ` <1526014680-4644-2-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org> @ 2018-05-11 5:27 ` Zhou, David(ChunMing) 2018-05-11 6:42 ` Christian König 0 siblings, 1 reply; 4+ messages in thread From: Zhou, David(ChunMing) @ 2018-05-11 5:27 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW Cc: Zhang, Jerry, Koenig, Christian The series is OK to me, Reviewed-by: Chunming Zhou <david1.zhou@amd.com> It is better to wait Christian to have a look before pushing patch. Regards, David Zhou -----Original Message----- From: Junwei Zhang [mailto:Jerry.Zhang@amd.com] Sent: Friday, May 11, 2018 12:58 PM To: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org Cc: Koenig, Christian <Christian.Koenig@amd.com>; Zhou, David(ChunMing) <David1.Zhou@amd.com>; Zhang, Jerry <Jerry.Zhang@amd.com> Subject: [PATCH 2/2] drm/amdgpu: set ttm bo priority before initialization Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index e62153a..6a9e46a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -419,6 +419,8 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, bo->tbo.bdev = &adev->mman.bdev; amdgpu_ttm_placement_from_domain(bo, bp->domain); + if (bp->type == ttm_bo_type_kernel) + bo->tbo.priority = 1; r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, bp->type, &bo->placement, page_align, &ctx, acc_size, @@ -434,9 +436,6 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, else amdgpu_cs_report_moved_bytes(adev, ctx.bytes_moved, 0); - if (bp->type == ttm_bo_type_kernel) - bo->tbo.priority = 1; - if (bp->flags & AMDGPU_GEM_CREATE_VRAM_CLEARED && bo->tbo.mem.placement & TTM_PL_FLAG_VRAM) { struct dma_fence *fence; -- 1.9.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu: set ttm bo priority before initialization 2018-05-11 5:27 ` Zhou, David(ChunMing) @ 2018-05-11 6:42 ` Christian König 0 siblings, 0 replies; 4+ messages in thread From: Christian König @ 2018-05-11 6:42 UTC (permalink / raw) To: Zhou, David(ChunMing), Zhang, Jerry, amd-gfx, dri-devel Looks like a good idea to me as well. Reviewed-by: Christian König <christian.koenig@amd.com> for the series. Regards, Christian. Am 11.05.2018 um 07:27 schrieb Zhou, David(ChunMing): > The series is OK to me, Reviewed-by: Chunming Zhou <david1.zhou@amd.com> > It is better to wait Christian to have a look before pushing patch. > > Regards, > David Zhou > -----Original Message----- > From: Junwei Zhang [mailto:Jerry.Zhang@amd.com] > Sent: Friday, May 11, 2018 12:58 PM > To: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org > Cc: Koenig, Christian <Christian.Koenig@amd.com>; Zhou, David(ChunMing) <David1.Zhou@amd.com>; Zhang, Jerry <Jerry.Zhang@amd.com> > Subject: [PATCH 2/2] drm/amdgpu: set ttm bo priority before initialization > > Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c > index e62153a..6a9e46a 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c > @@ -419,6 +419,8 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, > > bo->tbo.bdev = &adev->mman.bdev; > amdgpu_ttm_placement_from_domain(bo, bp->domain); > + if (bp->type == ttm_bo_type_kernel) > + bo->tbo.priority = 1; > > r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, bp->type, > &bo->placement, page_align, &ctx, acc_size, @@ -434,9 +436,6 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, > else > amdgpu_cs_report_moved_bytes(adev, ctx.bytes_moved, 0); > > - if (bp->type == ttm_bo_type_kernel) > - bo->tbo.priority = 1; > - > if (bp->flags & AMDGPU_GEM_CREATE_VRAM_CLEARED && > bo->tbo.mem.placement & TTM_PL_FLAG_VRAM) { > struct dma_fence *fence; > -- > 1.9.1 > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-11 6:42 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-05-11 4:57 [PATCH 1/2] drm/ttm: remove priority hard code when initializing ttm bo Junwei Zhang 2018-05-11 4:58 ` [PATCH 2/2] drm/amdgpu: set ttm bo priority before initialization Junwei Zhang [not found] ` <1526014680-4644-2-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org> 2018-05-11 5:27 ` Zhou, David(ChunMing) 2018-05-11 6:42 ` Christian König
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.