Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Auld, Matthew" <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: check if compressed_llb was allocated
Date: Thu, 1 Jul 2021 17:14:03 +0000	[thread overview]
Message-ID: <8ab278470961d8729d9f1beccbd4d3bd27cda708.camel@intel.com> (raw)
In-Reply-To: <20210701090326.1056452-1-matthew.auld@intel.com>

On Thu, 2021-07-01 at 10:03 +0100, Matthew Auld wrote:
> If we hit the error path here we unconditionally call
> i915_gem_stolen_remove_node, even though we only allocate the
> compressed_llb on older platforms. Therefore we should first check that
> we actually allocated the node before trying to remove it.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> 
> References: https://gitlab.freedesktop.org/drm/intel/-/issues/3709
> Fixes: 46b2c40e0af3 ("drm/i915/fbc: Allocate llb before cfb")
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index 7dc72e4a4656..82effb64a3b9 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -516,7 +516,8 @@ static int intel_fbc_alloc_cfb(struct drm_i915_private *dev_priv,
>  	return 0;
>  
>  err_llb:
> -	i915_gem_stolen_remove_node(dev_priv, &fbc->compressed_llb);
> +	if (drm_mm_node_allocated(&fbc->compressed_llb))
> +		i915_gem_stolen_remove_node(dev_priv, &fbc->compressed_llb);
>  err:
>  	if (drm_mm_initialized(&dev_priv->mm.stolen))
>  		drm_info_once(&dev_priv->drm, "not enough stolen space for compressed buffer (need %d more bytes), disabling. Hint: you may be able to increase stolen memory size in the BIOS to avoid this.\n", size);

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2021-07-01 17:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01  9:03 [Intel-gfx] [PATCH] drm/i915/display: check if compressed_llb was allocated Matthew Auld
2021-07-01 10:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-07-01 11:19 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-07-01 17:14 ` Souza, Jose [this message]
2021-07-01 17:42 ` [Intel-gfx] [PATCH] " Ville Syrjälä

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=8ab278470961d8729d9f1beccbd4d3bd27cda708.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=intel-gfx@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