Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 04/13] drm/xe/sa: Drop useless is_iomem member
Date: Wed, 11 Dec 2024 19:09:52 -0800	[thread overview]
Message-ID: <Z1pUAL6Nh5Jp+3Rd@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20241212010141.389-5-michal.wajdeczko@intel.com>

On Thu, Dec 12, 2024 at 02:01:32AM +0100, Michal Wajdeczko wrote:
> We can rely on the sa->bo->vmap.is_iomem instead as sa->bo is
> still available at this moment.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_sa.c       | 3 +--
>  drivers/gpu/drm/xe/xe_sa_types.h | 1 -
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_sa.c b/drivers/gpu/drm/xe/xe_sa.c
> index a5e05237b646..b990bd8a49fd 100644
> --- a/drivers/gpu/drm/xe/xe_sa.c
> +++ b/drivers/gpu/drm/xe/xe_sa.c
> @@ -24,7 +24,7 @@ static void sa_bo_manager_fini_bo(void *arg)
>  {
>  	struct xe_sa_manager *sa_manager = arg;
>  
> -	if (sa_manager->is_iomem)
> +	if (sa_manager->bo->vmap.is_iomem)

If we do this anywhere else in the driver (e.g. check bo->vmap.is_iomem)
then maybe add a BO layer helper for this check. If not, fine with this
open coded here.

Anyways:
Reviewed-by: Matthew Brost <matthew.brost@intel.com>

>  		kvfree(sa_manager->cpu_ptr);
>  
>  	sa_manager->cpu_ptr = NULL;
> @@ -55,7 +55,6 @@ struct xe_sa_manager *xe_sa_bo_manager_init(struct xe_tile *tile, u32 size, u32
>  		return ERR_CAST(bo);
>  	}
>  	sa_manager->bo = bo;
> -	sa_manager->is_iomem = bo->vmap.is_iomem;
>  	sa_manager->gpu_addr = xe_bo_ggtt_addr(bo);
>  
>  	if (bo->vmap.is_iomem) {
> diff --git a/drivers/gpu/drm/xe/xe_sa_types.h b/drivers/gpu/drm/xe/xe_sa_types.h
> index 2b070ff1292e..2ef896aeca1d 100644
> --- a/drivers/gpu/drm/xe/xe_sa_types.h
> +++ b/drivers/gpu/drm/xe/xe_sa_types.h
> @@ -14,7 +14,6 @@ struct xe_sa_manager {
>  	struct xe_bo *bo;
>  	u64 gpu_addr;
>  	void *cpu_ptr;
> -	bool is_iomem;
>  };
>  
>  #endif
> -- 
> 2.47.1
> 

  reply	other threads:[~2024-12-12  3:09 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12  1:01 [PATCH 00/13] The xe_sa_manager based GuC Buffer Cache Michal Wajdeczko
2024-12-12  1:01 ` [PATCH 01/13] drm/xe/sa: Always call drm_suballoc_manager_fini() Michal Wajdeczko
2024-12-12  3:03   ` Matthew Brost
2024-12-12  1:01 ` [PATCH 02/13] drm/xe/sa: Drop redundant NULL assignments Michal Wajdeczko
2024-12-12  3:03   ` Matthew Brost
2024-12-12  1:01 ` [PATCH 03/13] drm/xe/sa: Cleanup internal BO data at device removal Michal Wajdeczko
2024-12-12  3:07   ` Matthew Brost
2024-12-12  1:01 ` [PATCH 04/13] drm/xe/sa: Drop useless is_iomem member Michal Wajdeczko
2024-12-12  3:09   ` Matthew Brost [this message]
2024-12-18 20:53     ` Michal Wajdeczko
2024-12-12  1:01 ` [PATCH 05/13] drm/xe/sa: Improve error message on init failure Michal Wajdeczko
2024-12-12  3:10   ` Matthew Brost
2024-12-12  1:01 ` [PATCH 06/13] drm/xe/sa: Tidy up coding style in init() Michal Wajdeczko
2024-12-12  3:11   ` Matthew Brost
2024-12-12  1:01 ` [PATCH 07/13] drm/xe/sa: Allow making suballocations using custom gfp flags Michal Wajdeczko
2024-12-12  3:12   ` Matthew Brost
2024-12-12  1:01 ` [PATCH 08/13] drm/xe/sa: Allow creating suballocator with custom guard size Michal Wajdeczko
2024-12-12  3:23   ` Matthew Brost
2024-12-12 21:57     ` Michal Wajdeczko
2024-12-12 22:48       ` Matthew Brost
2024-12-12  1:01 ` [PATCH 09/13] drm/xe/sa: Minor header cleanups Michal Wajdeczko
2024-12-12  3:14   ` Matthew Brost
2024-12-12  1:01 ` [PATCH 10/13] drm/xe/guc: Introduce the GuC Buffer Cache Michal Wajdeczko
2024-12-12  3:30   ` Matthew Brost
2024-12-12 21:48     ` Michal Wajdeczko
2024-12-13 18:38       ` Matthew Brost
2024-12-13 20:13         ` Rodrigo Vivi
2024-12-18 21:03           ` Michal Wajdeczko
2024-12-19 20:28             ` Rodrigo Vivi
2024-12-12  1:01 ` [PATCH 11/13] drm/xe/pf: Use GuC Buffer Cache during VFs provisioning Michal Wajdeczko
2024-12-12  3:34   ` Matthew Brost
2024-12-12 22:02     ` Michal Wajdeczko
2024-12-12  1:01 ` [PATCH 12/13] drm/xe/kunit: Allow to replace xe_managed_bo_create_pin_map() Michal Wajdeczko
2024-12-12  1:01 ` [PATCH 13/13] drm/xe/kunit: Add KUnit tests for GuC Buffer Cache Michal Wajdeczko
2024-12-12  3:36   ` Matthew Brost
2024-12-18 21:06     ` Michal Wajdeczko
2024-12-12  2:20 ` ✓ CI.Patch_applied: success for The xe_sa_manager based " Patchwork
2024-12-12  2:20 ` ✗ CI.checkpatch: warning " Patchwork
2024-12-12  2:21 ` ✓ CI.KUnit: success " Patchwork
2024-12-12  2:41 ` ✓ CI.Build: " Patchwork
2024-12-12  2:45 ` ✓ CI.Hooks: " Patchwork
2024-12-12  2:48 ` ✓ CI.checksparse: " Patchwork
2024-12-12  3:14 ` ✗ Xe.CI.BAT: failure " Patchwork
2024-12-12  8:50 ` ✗ Xe.CI.Full: " Patchwork

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=Z1pUAL6Nh5Jp+3Rd@lstrano-desk.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@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