public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: Nirmoy Das <nirmoy.das@intel.com>, intel-gfx@lists.freedesktop.org
Cc: thomas.hellstrom@intel.com, chris.p.wilson@intel.com,
	dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/ttm: Abort suspend on i915_ttm_backup failure
Date: Wed, 31 Aug 2022 16:50:48 +0100	[thread overview]
Message-ID: <f8f8d5d8-3e50-2eac-1a29-d3583ef99ebe@intel.com> (raw)
In-Reply-To: <20220829120409.24260-1-nirmoy.das@intel.com>

On 29/08/2022 13:04, Nirmoy Das wrote:
> On system suspend when system memory is low then i915_gem_obj_copy_ttm()
> could fail trying to backup a lmem obj. GEM_WARN_ON() is not enough,
> suspend shouldn't continue if i915_ttm_backup() throws an error.
> 
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6529

Does this fix it? Does CI not complain about the drm_err? Also do we 
know what the actual error was?

> Suggested-by: Chris P Wilson <chris.p.wilson@intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>

Passing the error along seems reasonable to me,
Reviewed-by: Matthew Auld <matthew.auld@intel.com>

> ---
>   drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c
> index 9aad84059d56..6f5d5c0909b4 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c
> @@ -79,7 +79,12 @@ static int i915_ttm_backup(struct i915_gem_apply_to_region *apply,
>   		goto out_no_populate;
>   
>   	err = i915_gem_obj_copy_ttm(backup, obj, pm_apply->allow_gpu, false);
> -	GEM_WARN_ON(err);
> +	if (err) {
> +		drm_err(&i915->drm,
> +			"Unable to copy from device to system memory, err:%d\n",
> +			err);
> +		goto out_no_populate;
> +	}
>   	ttm_bo_wait_ctx(backup_bo, &ctx);
>   
>   	obj->ttm.backup = backup;

  parent reply	other threads:[~2022-08-31 15:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 12:04 [Intel-gfx] [PATCH] drm/i915/ttm: Abort suspend on i915_ttm_backup failure Nirmoy Das
2022-08-29 15:18 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-08-31  6:09 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-08-31 15:50 ` Matthew Auld [this message]
2022-08-31 16:09   ` [Intel-gfx] [PATCH] " Das, Nirmoy
  -- strict thread matches above, loose matches on Subject: below --
2022-08-31 16:18 Nirmoy Das
2022-09-01 15:57 ` Andrzej Hajda
2022-09-01 17:23   ` Das, Nirmoy

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=f8f8d5d8-3e50-2eac-1a29-d3583ef99ebe@intel.com \
    --to=matthew.auld@intel.com \
    --cc=chris.p.wilson@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=nirmoy.das@intel.com \
    --cc=thomas.hellstrom@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