Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@intel.com>
To: Matthew Auld <matthew.auld@intel.com>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] drm/xe/device: fix XE_MAX_GT_PER_TILE check
Date: Mon, 18 Mar 2024 19:42:48 +0100	[thread overview]
Message-ID: <caccd575-75a3-485f-aed2-7ff4fa7e5215@intel.com> (raw)
In-Reply-To: <20240318180532.57522-5-matthew.auld@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]


On 3/18/2024 7:05 PM, Matthew Auld wrote:
> Here XE_MAX_GT_PER_TILE is the total, therefore the gt index should
> always be less than.
>
> Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
> Signed-off-by: Matthew Auld<matthew.auld@intel.com>
> Cc: Nirmoy Das<nirmoy.das@intel.com>

Reviewed-by: Nirmoy Das <nirmoy.das@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..5c254ec9c602 100644
> --- a/drivers/gpu/drm/xe/xe_device.h
> +++ b/drivers/gpu/drm/xe/xe_device.h
> @@ -58,7 +58,7 @@ static inline struct xe_tile *xe_device_get_root_tile(struct xe_device *xe)
>   
>   static inline struct xe_gt *xe_tile_get_gt(struct xe_tile *tile, u8 gt_id)
>   {
> -	if (drm_WARN_ON(&tile_to_xe(tile)->drm, gt_id > XE_MAX_GT_PER_TILE))
> +	if (drm_WARN_ON(&tile_to_xe(tile)->drm, gt_id >= XE_MAX_GT_PER_TILE))
>   		gt_id = 0;
>   
>   	return gt_id ? tile->media_gt : tile->primary_gt;

[-- Attachment #2: Type: text/html, Size: 2034 bytes --]

  reply	other threads:[~2024-03-18 18:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 18:05 [PATCH 1/3] drm/xe/queue: fix engine_class bounds check Matthew Auld
2024-03-18 18:05 ` [PATCH 2/3] drm/xe/device: fix XE_MAX_GT_PER_TILE check Matthew Auld
2024-03-18 18:42   ` Nirmoy Das [this message]
2024-03-18 18:05 ` [PATCH 3/3] drm/xe/device: fix XE_MAX_TILES_PER_DEVICE check Matthew Auld
2024-03-18 18:42 ` [PATCH 1/3] drm/xe/queue: fix engine_class bounds check Nirmoy Das
2024-03-19  1:00 ` ✓ CI.Patch_applied: success for series starting with [1/3] " Patchwork
2024-03-19  1:00 ` ✓ CI.checkpatch: " Patchwork
2024-03-19  1:01 ` ✓ CI.KUnit: " Patchwork
2024-03-19  1:12 ` ✓ CI.Build: " Patchwork
2024-03-19  1:14 ` ✓ CI.Hooks: " Patchwork
2024-03-19  1:15 ` ✓ CI.checksparse: " Patchwork
2024-03-19  1:42 ` ✓ CI.BAT: " 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=caccd575-75a3-485f-aed2-7ff4fa7e5215@intel.com \
    --to=nirmoy.das@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@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