From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Matthew Auld <matthew.auld@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, Nirmoy Das <nirmoy.das@intel.com>
Subject: Re: [PATCH] drm/xe/device: fix drm_WARN_ON() check
Date: Mon, 18 Mar 2024 16:38:45 -0400 [thread overview]
Message-ID: <ZfimVQfEp32JOj9F@intel.com> (raw)
In-Reply-To: <20240318113708.32938-2-matthew.auld@intel.com>
On Mon, Mar 18, 2024 at 11:37:09AM +0000, Matthew Auld wrote:
> Here XE_MAX_TILES_PER_DEVICE is the gt array size, therefore the gt
> index should always be less than.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/xe/xe_device.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_device.h b/drivers/gpu/drm/xe/xe_device.h
> index 14be34d9f543..6b32f09a4c89 100644
> --- a/drivers/gpu/drm/xe/xe_device.h
> +++ b/drivers/gpu/drm/xe/xe_device.h
> @@ -79,7 +79,7 @@ static inline struct xe_gt *xe_device_get_gt(struct xe_device *xe, u8 gt_id)
> if (MEDIA_VER(xe) >= 13) {
> gt = xe_tile_get_gt(root_tile, gt_id);
> } else {
> - if (drm_WARN_ON(&xe->drm, gt_id > XE_MAX_TILES_PER_DEVICE))
> + if (drm_WARN_ON(&xe->drm, gt_id >= XE_MAX_TILES_PER_DEVICE))
> gt_id = 0;
>
> gt = xe->tiles[gt_id].primary_gt;
> --
> 2.44.0
>
prev parent reply other threads:[~2024-03-18 20:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 11:37 [PATCH] drm/xe/device: fix drm_WARN_ON() check Matthew Auld
2024-03-18 11:39 ` Nirmoy Das
2024-03-18 14:38 ` Lucas De Marchi
2024-03-18 19:44 ` ✓ CI.Patch_applied: success for " Patchwork
2024-03-18 19:44 ` ✓ CI.checkpatch: " Patchwork
2024-03-18 19:45 ` ✓ CI.KUnit: " Patchwork
2024-03-18 19:56 ` ✓ CI.Build: " Patchwork
2024-03-18 19:58 ` ✓ CI.Hooks: " Patchwork
2024-03-18 20:00 ` ✓ CI.checksparse: " Patchwork
2024-03-18 20:22 ` ✓ CI.BAT: " Patchwork
2024-03-18 20:38 ` Rodrigo Vivi [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=ZfimVQfEp32JOj9F@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=nirmoy.das@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