All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/3] drm/i915: Fix HAS_REGION() usage in intel_gt_probe_lmem()
Date: Thu, 2 May 2024 08:52:51 -0400	[thread overview]
Message-ID: <ZjOMoxKY3GipUpcq@intel.com> (raw)
In-Reply-To: <20240502121423.1002-1-ville.syrjala@linux.intel.com>

On Thu, May 02, 2024 at 03:14:21PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> HAS_REGION() takes a bitmask, not the region ID. This causes the
> GEM_BUG_ON() to assert that the SMEM region is available rather
> than the intended LMEM region. No real harm since SMEM is always
> available, but also not checking what was intended.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/gt/intel_gt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
> index 626b166e67ef..5a7ecf823ae6 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt.c
> @@ -105,7 +105,7 @@ static int intel_gt_probe_lmem(struct intel_gt *gt)
>  
>  	intel_memory_region_set_name(mem, "local%u", mem->instance);
>  
> -	GEM_BUG_ON(!HAS_REGION(i915, id));
> +	GEM_BUG_ON(!HAS_REGION(i915, BIT(id)));
>  	GEM_BUG_ON(i915->mm.regions[id]);
>  	i915->mm.regions[id] = mem;
>  
> -- 
> 2.43.2
> 

  parent reply	other threads:[~2024-05-02 12:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 12:14 [PATCH 1/3] drm/i915: Fix HAS_REGION() usage in intel_gt_probe_lmem() Ville Syrjala
2024-05-02 12:14 ` [PATCH 2/3] drm/i915: Pass the region ID rather than a bitmask to HAS_REGION() Ville Syrjala
2024-05-02 12:54   ` Rodrigo Vivi
2024-05-02 12:14 ` [PATCH 3/3] drm/i915: Remove counter productive REGION_* wrappers Ville Syrjala
2024-05-02 12:54   ` Rodrigo Vivi
2024-05-02 12:52 ` Rodrigo Vivi [this message]
2024-05-02 12:59 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Fix HAS_REGION() usage in intel_gt_probe_lmem() Patchwork
2024-05-02 12:59 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-05-02 13:06 ` ✓ Fi.CI.BAT: success " Patchwork
2024-05-03  0:11 ` ✗ Fi.CI.IGT: failure " 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=ZjOMoxKY3GipUpcq@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.