dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Matthew Auld <matthew.auld@intel.com>,
	intel-gfx@lists.freedesktop.org,
	 dri-devel@lists.freedesktop.org
Cc: maarten.lankhorst@linux.intel.com
Subject: Re: [PATCH v2 5/6] drm/i915: Don't back up pinned LMEM context images and rings during suspend
Date: Wed, 08 Sep 2021 14:26:27 +0200	[thread overview]
Message-ID: <da61dd83293eb1650ca3da8a650db74a856142ad.camel@linux.intel.com> (raw)
In-Reply-To: <160c96ac-3cf2-5542-9ad0-bbc0b5ebec55@intel.com>

On Wed, 2021-09-08 at 12:07 +0100, Matthew Auld wrote:
> On 06/09/2021 17:55, Thomas Hellström wrote:
> > Pinned context images are now reset during resume. Don't back them
> > up,
> > and assuming that rings can be assumed empty at suspend, don't back
> > them
> > up either.
> > 
> > Introduce a new object flag, I915_BO_ALLOC_PM_VOLATILE meaning that
> > an
> > object is allowed to lose its content on suspend.
> > 
> > Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > ---
> >   .../gpu/drm/i915/gem/i915_gem_object_types.h    | 17 ++++++++++--
> > -----
> >   drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c      |  3 +++
> >   drivers/gpu/drm/i915/gt/intel_lrc.c             |  3 ++-
> >   drivers/gpu/drm/i915/gt/intel_ring.c            |  3 ++-
> >   4 files changed, 17 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> > b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> > index 734cc8e16481..66123ba46247 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> > @@ -288,16 +288,19 @@ struct drm_i915_gem_object {
> >         I915_SELFTEST_DECLARE(struct list_head st_link);
> >   
> >         unsigned long flags;
> > -#define I915_BO_ALLOC_CONTIGUOUS BIT(0)
> > -#define I915_BO_ALLOC_VOLATILE   BIT(1)
> > -#define I915_BO_ALLOC_CPU_CLEAR  BIT(2)
> > -#define I915_BO_ALLOC_USER       BIT(3)
> > +#define I915_BO_ALLOC_CONTIGUOUS  BIT(0)
> > +#define I915_BO_ALLOC_VOLATILE    BIT(1)
> > +#define I915_BO_ALLOC_CPU_CLEAR   BIT(2)
> > +#define I915_BO_ALLOC_USER        BIT(3)
> > +/* Object may lose its contents on suspend / resume */
> > +#define I915_BO_ALLOC_PM_VOLATILE BIT(4)

> 
> PM_SKIP_PINNED? Not sure if that is better.

I think we could update the comment to say "object is allowed to
lose..", I think we could keep PM_VOLATILE to keep it consistent with
the ALLOC_VOLATILE flag?

/Thomas



  reply	other threads:[~2021-09-08 12:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 16:55 [PATCH v2 0/6] drm/i915: Suspend / resume backup- and restore of LMEM Thomas Hellström
2021-09-06 16:55 ` [PATCH v2 1/6] drm/i915/ttm: Implement a function to copy the contents of two TTM-base objects Thomas Hellström
2021-09-07  8:54   ` Matthew Auld
2021-09-06 16:55 ` [PATCH v2 2/6] drm/i915/gem: Implement a function to process all gem objects of a region Thomas Hellström
2021-09-07  9:12   ` Matthew Auld
2021-09-06 16:55 ` [PATCH v2 3/6] drm/i915 Implement LMEM backup and restore for suspend / resume Thomas Hellström
2021-09-07 17:37   ` Matthew Auld
2021-09-08  7:58     ` Thomas Hellström
2021-09-10 13:27   ` Thomas Hellström
2021-09-06 16:55 ` [PATCH v2 4/6] drm/i915/gt: Register the migrate contexts with their engines Thomas Hellström
2021-09-06 16:55 ` [PATCH v2 5/6] drm/i915: Don't back up pinned LMEM context images and rings during suspend Thomas Hellström
2021-09-08 11:01   ` Matthew Auld
2021-09-08 11:07   ` Matthew Auld
2021-09-08 12:26     ` Thomas Hellström [this message]
2021-09-08 13:18       ` Matthew Auld
2021-09-06 16:55 ` [PATCH v2 6/6] drm/i915: Reduce the number of objects subject to memcpy recover Thomas Hellström

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=da61dd83293eb1650ca3da8a650db74a856142ad.camel@linux.intel.com \
    --to=thomas.hellstrom@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).