public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: "Chris Wilson" <chris@chris-wilson.co.uk>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Track pinned vma in intel_plane_state
Date: Wed, 4 Jan 2017 20:06:54 +0100	[thread overview]
Message-ID: <c4c01236-9823-8e74-7ad6-e4873f37cecf@linux.intel.com> (raw)
In-Reply-To: <20170104161911.GK9639@nuc-i3427.alporthouse.com>

Op 04-01-17 om 17:19 schreef Chris Wilson:
> On Wed, Jan 04, 2017 at 06:06:42PM +0200, Ville Syrjälä wrote:
>> On Wed, Jan 04, 2017 at 04:00:49PM +0000, Chris Wilson wrote:
>>> If we are restoring the same plane_state, the old_plane_state will not
>>> be unpinned until after the swap. So prepare_fb will return the
>>> duplicate VMA with incremented pin_count.
>> During suspend we throw away the old state, and resume will read in
>> the state from the hardware. So when we do the swap we won't have the
>> original old state in place anymore.
> But in this case, we should have a plane_config from HW readout that has
> a recovered VMA? I presume the same takeover code is run after resume as
> on init...
No, we only recover it during init. On resume we still have the old vma pinned and in plane_state.
Which should be fine for our purpose, but even if we didn't resume should probably not fail.
> On the other hand, if the plane_state was removed from the hardware, its
> VMA would be unpinned and we would be free to rebind it in a new location.
> Provided the obj itself wasn't freed, the VMA will be kept. However, we
> still risk a potential error on remapping (if the vma was unbound during
> suspend). That's not a huge risk though, and does require the VMA to be
> actually unbound on suspend.

Not currently the case, but it's an implementation detail that might be changed. :)

~Maarten

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

  reply	other threads:[~2017-01-04 19:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 13:31 [PATCH] drm/i915: Track pinned vma in intel_plane_state Maarten Lankhorst
2017-01-04 14:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-01-04 15:06 ` [PATCH] " Ville Syrjälä
2017-01-04 15:14   ` Chris Wilson
2017-01-04 15:47     ` Ville Syrjälä
2017-01-04 16:00       ` Chris Wilson
2017-01-04 16:06         ` Ville Syrjälä
2017-01-04 16:19           ` Chris Wilson
2017-01-04 19:06             ` Maarten Lankhorst [this message]
2017-01-04 16:35       ` Maarten Lankhorst

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=c4c01236-9823-8e74-7ad6-e4873f37cecf@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox