Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
To: Matthew Brost <matthew.brost@intel.com>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe: Fix tile fini sequence
Date: Mon, 12 Aug 2024 08:39:26 +0530	[thread overview]
Message-ID: <9b683da5-8b3c-42b1-a1db-5be14819895e@intel.com> (raw)
In-Reply-To: <20240809232830.3302251-1-matthew.brost@intel.com>



On 10-08-2024 04:58, Matthew Brost wrote:
> Only set tile->mmio.regs to NULL if not the root tile in tile_fini. The
> root tile mmio regs is setup ealier in MMIO init thus it should be set
> to NULL in mmio_fini.
> 
> Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_mmio.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
> index bdcc7282385c..f5bdb540e823 100644
> --- a/drivers/gpu/drm/xe/xe_mmio.c
> +++ b/drivers/gpu/drm/xe/xe_mmio.c
> @@ -30,7 +30,8 @@ static void tiles_fini(void *arg)
>   	int id;
>   
>   	for_each_tile(tile, xe, id)
> -		tile->mmio.regs = NULL;
> +		if (tile != xe_device_get_root_tile(xe))
> +			tile->mmio.regs = NULL;

Patch LGTM, just a minor nit.

if (tile != xe_device_get_root_tile(xe)) can be avoided by using 
for_each_remote_tile.

With that
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>

>   }
>   
>   /*
> @@ -146,9 +147,11 @@ int xe_mmio_probe_tiles(struct xe_device *xe)
>   static void mmio_fini(void *arg)
>   {
>   	struct xe_device *xe = arg;
> +	struct xe_tile *root_tile = xe_device_get_root_tile(xe);
>   
>   	pci_iounmap(to_pci_dev(xe->drm.dev), xe->mmio.regs);
>   	xe->mmio.regs = NULL;
> +	root_tile->mmio.regs = NULL;
>   }
>   
>   int xe_mmio_init(struct xe_device *xe)

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

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09 23:28 [PATCH] drm/xe: Fix tile fini sequence Matthew Brost
2024-08-10  0:57 ` ✓ CI.Patch_applied: success for " Patchwork
2024-08-10  0:57 ` ✓ CI.checkpatch: " Patchwork
2024-08-10  0:59 ` ✓ CI.KUnit: " Patchwork
2024-08-10  1:11 ` ✓ CI.Build: " Patchwork
2024-08-10  1:13 ` ✓ CI.Hooks: " Patchwork
2024-08-10  1:14 ` ✓ CI.checksparse: " Patchwork
2024-08-10  1:34 ` ✓ CI.BAT: " Patchwork
2024-08-10  4:19 ` [PATCH] " Lucas De Marchi
2024-08-10  5:30 ` ✗ CI.FULL: failure for " Patchwork
2024-08-12  3:09 ` Ghimiray, Himal Prasad [this message]

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=9b683da5-8b3c-42b1-a1db-5be14819895e@intel.com \
    --to=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@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