AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Roger He <Hongbo.He-5C7GfCeVMHo@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 1/6] drm/ttm: add on_alloc_stage and reservation into ttm_operation_ctx
Date: Tue, 12 Dec 2017 11:29:36 +0100	[thread overview]
Message-ID: <88f70ef5-da72-95ff-07e4-d3ece034ec14@gmail.com> (raw)
In-Reply-To: <1513071228-29551-1-git-send-email-Hongbo.He-5C7GfCeVMHo@public.gmane.org>

Am 12.12.2017 um 10:33 schrieb Roger He:
> on_alloc_stage: is this operation on allocation stage
> resv: reservation bo used of this operation
>
> Change-Id: I01ea482e8c7470014196eb218e2ff8913306eef0
> Signed-off-by: Roger He <Hongbo.He@amd.com>
> ---
>   include/drm/ttm/ttm_bo_api.h | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
> index 368eb02..25de597 100644
> --- a/include/drm/ttm/ttm_bo_api.h
> +++ b/include/drm/ttm/ttm_bo_api.h
> @@ -263,6 +263,8 @@ struct ttm_bo_kmap_obj {
>    *
>    * @interruptible: Sleep interruptible if sleeping.
>    * @no_wait_gpu: Return immediately if the GPU is busy.
> + * @on_alloc_stage: is this operation on allocation stage
> + * @resv: resvation bo used
>    *
>    * Context for TTM operations like changing buffer placement or general memory
>    * allocation.
> @@ -270,6 +272,8 @@ struct ttm_bo_kmap_obj {
>   struct ttm_operation_ctx {
>   	bool interruptible;
>   	bool no_wait_gpu;
> +	bool on_alloc_stage;

The name describes how amdgpu want to use the flag and not what effect 
it has.

How about "allow_reserved_eviction"?

And also please update the documentation with something like:
* @allow_reserved_eviction: Allow eviction of reserved BOs.
* @resv: Reservation object to allow reserved evictions with.

Alternative we could put the ww_mutex context in here as Daniel 
suggested, but I think we should stick with what we have for now and 
make that change when we find another use case for this.

Christian.

> +	struct reservation_object *resv;
>   	uint64_t bytes_moved;
>   };
>   

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-12-12 10:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12  9:33 [PATCH 1/6] drm/ttm: add on_alloc_stage and reservation into ttm_operation_ctx Roger He
2017-12-12  9:33 ` [PATCH 2/6] drm/ttm: when create a new ttm bo init on_alloc_stage and resv for ttm_operation_ctx Roger He
     [not found]   ` <1513071228-29551-2-git-send-email-Hongbo.He-5C7GfCeVMHo@public.gmane.org>
2017-12-12 10:30     ` Christian König
2017-12-12  9:33 ` [PATCH 3/6] drm/ttm: use an ttm operation ctx for ttm_bo_move_xxx Roger He
2017-12-12 10:34   ` Christian König
     [not found]     ` <3e419e6d-4194-6c54-6b8a-d6f7a57ebc67-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-13  2:02       ` He, Roger
2017-12-12  9:33 ` [PATCH 5/6] drm/ttm: enable eviction for Per-VM-BO Roger He
     [not found]   ` <1513071228-29551-5-git-send-email-Hongbo.He-5C7GfCeVMHo@public.gmane.org>
2017-12-12 10:40     ` Christian König
     [not found]       ` <8269398e-06bd-7ca7-277c-63d39ab61003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-13  4:51         ` He, Roger
2017-12-12  9:33 ` [PATCH 6/6] drm/ttm: remove parameter reservation since it is moved into ttm context Roger He
2017-12-13 19:21 ` [PATCH 1/6] drm/ttm: add on_alloc_stage and reservation into ttm_operation_ctx Thomas Hellstrom
2017-12-14  8:40   ` Christian König
     [not found]     ` <393e18d9-cca1-3ca5-c0d0-0ce794246252-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-14  8:55       ` Thomas Hellstrom
     [not found]         ` <834f3be6-ba20-06aa-24e4-d0a8d4777545-4+hqylr40dJg9hUCZPvPmw@public.gmane.org>
2017-12-14  9:04           ` Christian König
2017-12-14  9:26   ` He, Roger
     [not found] ` <1513071228-29551-1-git-send-email-Hongbo.He-5C7GfCeVMHo@public.gmane.org>
2017-12-12  9:33   ` [PATCH 4/6] drm/ttm: init locked again to prevent incorrect unlock Roger He
2017-12-12 10:37     ` Christian König
     [not found]       ` <34aed9d4-dff3-7398-05bb-bc20f58a0f36-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-13  2:06         ` He, Roger
     [not found]           ` <MWHPR1201MB012728EACBFA433525FC1F40FD350-3iK1xFAIwjq9imrIu4W8xGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-12-13  9:48             ` Christian König
2017-12-12 10:29   ` Christian König [this message]
2019-09-20 17:23   ` [PATCH 1/6] drm/ttm: add on_alloc_stage and reservation into ttm_operation_ctx Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=88f70ef5-da72-95ff-07e4-d3ece034ec14@gmail.com \
    --to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Hongbo.He-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox