Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 10/12] drm/xe: Rename xe_ggtt balloon functions to make the node clear
Date: Thu, 11 Jul 2024 22:17:24 +0200	[thread overview]
Message-ID: <72b8f83b-72e7-4b78-93fa-aa56f17c4177@intel.com> (raw)
In-Reply-To: <20240711171155.173717-10-rodrigo.vivi@intel.com>



On 11.07.2024 19:11, Rodrigo Vivi wrote:
> These operations are related to node. Convert them to the
> new appropriate name space xe_ggtt_node.

hmm, actually these operations were meant to be GGTT related [1], but it
was suggested that it would be better to keep required nodes on the
client side

[1] https://patchwork.freedesktop.org/patch/341977/?series=69844&rev=1

but maybe we can return to this idea and on the Xe driver lets hide
balloon nodes inside the xe_ggtt ?

and later on we may want to add xe_ggtt_reballoon() to shift the range

> 
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_ggtt.c        | 12 ++++++------
>  drivers/gpu/drm/xe/xe_ggtt.h        |  4 ++--
>  drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 10 +++++-----
>  3 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
> index 5b51753fe1ba..928c01f9e212 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.c
> +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> @@ -347,17 +347,17 @@ static void xe_ggtt_dump_node(struct xe_ggtt *ggtt,
>  }
>  
>  /**
> - * xe_ggtt_balloon - prevent allocation of specified GGTT addresses
> + * xe_ggtt_node_balloon - prevent allocation of specified GGTT addresses
>   * @ggtt: the &xe_ggtt where we want to make reservation
>   * @start: the starting GGTT address of the reserved region
>   * @end: then end GGTT address of the reserved region
>   * @node: the &xe_ggtt_node to hold reserved GGTT node
>   *
> - * Use xe_ggtt_deballoon() to release a reserved GGTT node.
> + * Use xe_ggtt_node_deballoon() to release a reserved GGTT node.
>   *
>   * Return: 0 on success or a negative error code on failure.
>   */
> -int xe_ggtt_balloon(struct xe_ggtt *ggtt, u64 start, u64 end, struct xe_ggtt_node *node)
> +int xe_ggtt_node_balloon(struct xe_ggtt *ggtt, u64 start, u64 end, struct xe_ggtt_node *node)
>  {
>  	int err;
>  
> @@ -384,13 +384,13 @@ int xe_ggtt_balloon(struct xe_ggtt *ggtt, u64 start, u64 end, struct xe_ggtt_nod
>  }
>  
>  /**
> - * xe_ggtt_deballoon - release a reserved GGTT region
> + * xe_ggtt_node_deballoon - release a reserved GGTT region
>   * @ggtt: the &xe_ggtt where reserved node belongs
>   * @node: the &xe_ggtt_node with reserved GGTT region
>   *
> - * See xe_ggtt_balloon() for details.
> + * See xe_ggtt_node_balloon() for details.
>   */
> -void xe_ggtt_deballoon(struct xe_ggtt *ggtt, struct xe_ggtt_node *node)
> +void xe_ggtt_node_deballoon(struct xe_ggtt *ggtt, struct xe_ggtt_node *node)
>  {
>  	if (!drm_mm_node_allocated(&node->base))
>  		return;
> diff --git a/drivers/gpu/drm/xe/xe_ggtt.h b/drivers/gpu/drm/xe/xe_ggtt.h
> index 67ae5f1602a3..e68cede2e6b5 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.h
> +++ b/drivers/gpu/drm/xe/xe_ggtt.h
> @@ -13,8 +13,8 @@ struct drm_printer;
>  int xe_ggtt_init_early(struct xe_ggtt *ggtt);
>  int xe_ggtt_init(struct xe_ggtt *ggtt);
>  
> -int xe_ggtt_balloon(struct xe_ggtt *ggtt, u64 start, u64 size, struct xe_ggtt_node *node);
> -void xe_ggtt_deballoon(struct xe_ggtt *ggtt, struct xe_ggtt_node *node);
> +int xe_ggtt_node_balloon(struct xe_ggtt *ggtt, u64 start, u64 size, struct xe_ggtt_node *node);
> +void xe_ggtt_node_deballoon(struct xe_ggtt *ggtt, struct xe_ggtt_node *node);
>  
>  int xe_ggtt_node_insert(struct xe_ggtt *ggtt, struct xe_ggtt_node *node,
>  			u32 size, u32 align);
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> index 41e46a00c01e..a478e6e1b20e 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> @@ -528,7 +528,7 @@ static int vf_balloon_ggtt(struct xe_gt *gt)
>  	start = xe_wopcm_size(xe);
>  	end = config->ggtt_base;
>  	if (end != start) {
> -		err = xe_ggtt_balloon(ggtt, start, end, &tile->sriov.vf.ggtt_balloon[0]);
> +		err = xe_ggtt_node_balloon(ggtt, start, end, &tile->sriov.vf.ggtt_balloon[0]);
>  		if (err)
>  			goto failed;
>  	}
> @@ -536,7 +536,7 @@ static int vf_balloon_ggtt(struct xe_gt *gt)
>  	start = config->ggtt_base + config->ggtt_size;
>  	end = GUC_GGTT_TOP;
>  	if (end != start) {
> -		err = xe_ggtt_balloon(ggtt, start, end, &tile->sriov.vf.ggtt_balloon[1]);
> +		err = xe_ggtt_node_balloon(ggtt, start, end, &tile->sriov.vf.ggtt_balloon[1]);
>  		if (err)
>  			goto deballoon;
>  	}
> @@ -544,7 +544,7 @@ static int vf_balloon_ggtt(struct xe_gt *gt)
>  	return 0;
>  
>  deballoon:
> -	xe_ggtt_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[0]);
> +	xe_ggtt_node_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[0]);
>  failed:
>  	return err;
>  }
> @@ -555,8 +555,8 @@ static void deballoon_ggtt(struct drm_device *drm, void *arg)
>  	struct xe_ggtt *ggtt = tile->mem.ggtt;
>  
>  	xe_tile_assert(tile, IS_SRIOV_VF(tile_to_xe(tile)));
> -	xe_ggtt_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[1]);
> -	xe_ggtt_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[0]);
> +	xe_ggtt_node_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[1]);
> +	xe_ggtt_node_deballoon(ggtt, &tile->sriov.vf.ggtt_balloon[0]);
>  }
>  
>  /**

  reply	other threads:[~2024-07-11 20:17 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-11 17:11 [PATCH 01/12] drm/xe: Removed unused xe_ggtt_printk Rodrigo Vivi
2024-07-11 17:11 ` [PATCH 02/12] drm/xe: Introduce GGTT documentation Rodrigo Vivi
2024-07-11 19:41   ` Michal Wajdeczko
2024-07-11 17:11 ` [PATCH 03/12] drm/xe: Remove unnecessary drm_mm.h includes Rodrigo Vivi
2024-07-11 18:35   ` Cavitt, Jonathan
2024-07-11 17:11 ` [PATCH 04/12] drm/{i915, xe}: Avoid direct inspection of dpt_vma from outside dpt Rodrigo Vivi
2024-07-11 18:38   ` Cavitt, Jonathan
2024-07-11 17:11 ` [PATCH 05/12] drm/xe: Encapsulate drm_mm_node inside xe_ggtt_node Rodrigo Vivi
2024-07-11 19:51   ` Michal Wajdeczko
2024-07-16 17:16   ` Matthew Brost
2024-07-11 17:11 ` [PATCH 06/12] drm/xe: Rename xe_ggtt_node related functions Rodrigo Vivi
2024-07-16 17:24   ` Matthew Brost
2024-07-11 17:11 ` [PATCH 07/12] drm/xe: Limit drm_mm_node_allocated access to xe_ggtt_node Rodrigo Vivi
2024-07-17 23:27   ` Matthew Brost
2024-07-11 17:11 ` [PATCH 08/12] drm/xe: Introduce xe_ggtt_largest_hole Rodrigo Vivi
2024-07-11 20:00   ` Michal Wajdeczko
2024-08-09 21:33     ` Rodrigo Vivi
2024-07-11 17:11 ` [PATCH 09/12] drm/xe: Introduce xe_ggtt_print_holes Rodrigo Vivi
2024-07-11 18:43   ` Cavitt, Jonathan
2024-07-11 20:09   ` Michal Wajdeczko
2024-08-09 21:38     ` Rodrigo Vivi
2024-07-11 17:11 ` [PATCH 10/12] drm/xe: Rename xe_ggtt balloon functions to make the node clear Rodrigo Vivi
2024-07-11 20:17   ` Michal Wajdeczko [this message]
2024-08-09 21:42     ` Rodrigo Vivi
2024-07-11 17:11 ` [PATCH 11/12] drm/xe: Make xe_ggtt_node struct independent Rodrigo Vivi
2024-07-17 23:50   ` Matthew Brost
2024-07-11 17:11 ` [PATCH 12/12] drm/xe: Fix missing runtime outer protection for ggtt_remove_node Rodrigo Vivi
2024-07-16 17:32   ` Matthew Brost
2024-07-11 17:25 ` ✓ CI.Patch_applied: success for series starting with [01/12] drm/xe: Removed unused xe_ggtt_printk Patchwork
2024-07-11 17:26 ` ✓ CI.checkpatch: " Patchwork
2024-07-11 17:28 ` ✓ CI.KUnit: " Patchwork
2024-07-11 17:34 ` ✗ CI.Build: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-08-15 22:07 [PATCH 01/12] " Rodrigo Vivi
2024-08-15 22:07 ` [PATCH 10/12] drm/xe: Rename xe_ggtt balloon functions to make the node clear Rodrigo Vivi
2024-08-16 15:02 [PATCH 01/12] drm/xe: Removed unused xe_ggtt_printk Rodrigo Vivi
2024-08-16 15:02 ` [PATCH 10/12] drm/xe: Rename xe_ggtt balloon functions to make the node clear Rodrigo Vivi
2024-08-16 15:45   ` Lucas De Marchi

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=72b8f83b-72e7-4b78-93fa-aa56f17c4177@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=rodrigo.vivi@intel.com \
    /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