Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Vivekanandan, Balasubramani" <balasubramani.vivekanandan@intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>,
	<intel-gfx@lists.freedesktop.org>
Cc: <saurabhg.gupta@intel.com>, <John.C.Harrison@intel.com>,
	<chris.p.wilson@linux.intel.com>, <andi.shyti@linux.intel.com>,
	<nirmoy.das@intel.com>
Subject: Re: [PATCH] drm/i915/gem: Downgrade stolen lmem setup warning
Date: Mon, 22 Apr 2024 11:59:01 +0530	[thread overview]
Message-ID: <ZiYDrR6uUEqNFeSn@bvivekan-mobl2> (raw)
In-Reply-To: <20240419212643.3915745-1-jonathan.cavitt@intel.com>

On 19.04.2024 14:26, Jonathan Cavitt wrote:
> In the case where lmem_size < dsm_base, hardware is reporting that
> stolen lmem is unusable.  In this case, instead of throwing a warning,
> we can continue execution as normal by disabling stolen LMEM support.
> For example, this change will allow the following error report from
> ATS-M to no longer apply:
> 
> <6> [144.859887] pcieport 0000:4b:00.0: bridge window [mem 0xb1000000-0xb11fffff]
> <6> [144.859900] pcieport 0000:4b:00.0: bridge window [mem 0x3bbc00000000-0x3bbc17ffffff 64bit pref]
> <6> [144.859917] pcieport 0000:4c:01.0: PCI bridge to [bus 4d-4e]
> <6> [144.859932] pcieport 0000:4c:01.0: bridge window [mem 0xb1000000-0xb11fffff]
> <6> [144.859945] pcieport 0000:4c:01.0: bridge window [mem 0x3bbc00000000-0x3bbc17ffffff 64bit pref]
> <6> [144.859984] i915 0000:4d:00.0: [drm] BAR2 resized to 256M
> <6> [144.860640] i915 0000:4d:00.0: [drm] Using a reduced BAR size of 256MiB. Consider enabling 'Resizable BAR' or similar, if available in the BIOS.
> <4> [144.860719] -----------[ cut here ]-----------
> <4> [144.860727] WARNING: CPU: 17 PID: 1815 at drivers/gpu/drm/i915/gem/i915_gem_stolen.c:939 i915_gem_stolen_lmem_setup+0x38c/0x430 [i915]
> <4> [144.861430] Modules linked in: i915 snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core snd_pcm vgem drm_shmem_helper prime_numbers i2c_algo_bit ttm video drm_display_helper drm_buddy fuse x86_pkg_temp_thermal coretemp kvm_intel kvm ixgbe mdio irqbypass ptp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pps_core i2c_i801 mei_me i2c_smbus mei wmi acpi_power_meter [last unloaded: i915]
> <4> [144.861611] CPU: 17 PID: 1815 Comm: i915_module_loa Tainted: G U 6.8.0-rc5-drmtip_1515-g78f49af27723+ #1
> <4> [144.861624] Hardware name: Intel Corporation WHITLEY/WHITLEY, BIOS SE5C6200.86B.0020.P41.2109300305 09/30/2021
> <4> [144.861632] RIP: 0010:i915_gem_stolen_lmem_setup+0x38c/0x430 [i915]
> <4> [144.862287] Code: ff 41 c1 e4 05 e9 ac fe ff ff 4d 63 e4 48 89 ef 48 85 ed 74 04 48 8b 7d 08 48 c7 c6 10 a3 7b a0 e8 e9 90 43 e1 e9 ee fd ff ff <0f> 0b 49 c7 c4 ed ff ff ff e9 e0 fd ff ff 0f b7 d2 48 c7 c6 00 d9
> <4> [144.862299] RSP: 0018:ffffc90005607980 EFLAGS: 00010207
> <4> [144.862315] RAX: fffffffffff00000 RBX: 0000000000000003 RCX: 0000000000000000
> 
> Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/10833
> 
> Suggested-by: Chris Wilson <chris.p.wilson@linux.intel.com>
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> index ad6dd7f3259bc..efa632a9e61c6 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> @@ -936,8 +936,12 @@ i915_gem_stolen_lmem_setup(struct drm_i915_private *i915, u16 type,
>  	} else {
>  		/* Use DSM base address instead for stolen memory */
>  		dsm_base = intel_uncore_read64(uncore, GEN6_DSMBASE) & GEN11_BDSM_MASK;
> -		if (WARN_ON(lmem_size < dsm_base))
> +		if (lmem_size < dsm_base) {
> +			drm_dbg(&i915->drm,
> +				"Disabling stolen memory support due to OOB placement: lmem_size = %lli vs dsm_base = %lli\n",
> +				lmem_size, dsm_base);
>  			return ERR_PTR(-ENODEV);
The patch is still returning an error and aborting initialization. Only the
warning is eliminated. But as per the commit description, the execution
should continue as normal after disabling stolen lmem support.

Regards,
Bala

> +		}
>  		dsm_size = ALIGN_DOWN(lmem_size - dsm_base, SZ_1M);
>  	}
>  
> -- 
> 2.25.1
> 

  parent reply	other threads:[~2024-04-22  6:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19 21:26 [PATCH] drm/i915/gem: Downgrade stolen lmem setup warning Jonathan Cavitt
2024-04-19 22:09 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2024-04-19 22:19 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-04-22  6:29 ` Vivekanandan, Balasubramani [this message]
2024-04-25 21:09   ` [PATCH] " Cavitt, Jonathan
2024-04-22  8:28 ` Jani Nikula
2024-04-25 21:10   ` Cavitt, Jonathan

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=ZiYDrR6uUEqNFeSn@bvivekan-mobl2 \
    --to=balasubramani.vivekanandan@intel.com \
    --cc=John.C.Harrison@intel.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=chris.p.wilson@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=nirmoy.das@intel.com \
    --cc=saurabhg.gupta@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