linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Eric Anholt <eric@anholt.net>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Eben Upton <eben@raspberrypi.org>
Subject: Re: [PATCH 3/3] drm/vc4: Don't liberate the binner BO at runtime suspend
Date: Wed, 20 Mar 2019 16:17:32 +0100	[thread overview]
Message-ID: <8d6f1e9191638e243616ac7832b1b650a80d85ad.camel@bootlin.com> (raw)
In-Reply-To: <87o96alk7k.fsf@anholt.net>

Hi,

Le samedi 16 mars 2019 à 11:58 -0700, Eric Anholt a écrit :
> Paul Kocialkowski <paul.kocialkowski@bootlin.com> writes:
> 
> > The binner BO is a pre-requisite to GPU operations, so we must ensure
> > that it is always allocated when the GPU is in use.
> > 
> > Because the buffer is allocated from the same pool as other GPU buffers,
> > we might run into a situation where we are out of memory at runtime
> > resume. This causes the binner BO allocation to fail and results in all
> > subsequent operations to fail, resulting in a major hang in userspace.
> > 
> > Now that we allocate the buffer at firstopen and liberate it at
> > lastclose, we can just keep it alive during runtime suspend.
> 
> I think this needs to be squashed into the previous patch, as otherwise
> coming from suspended, a firstopen -> resume -> render will leak a copy
> of the bin BO.

Woops, you're definitely right: vc4_allocate_bin_bo won't check whether
we already have allocated it or not. I'll send a new version with both
patches squashed.

Cheers,

Paul

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


      reply	other threads:[~2019-03-20 15:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 16:25 [PATCH 1/3] drm/file: Rehabilitate the firstopen hook for non-legacy drivers Paul Kocialkowski
2019-03-15 16:25 ` [PATCH 2/3] drm/vc4: Allocate/liberate the binner BO at firstopen/lastclose Paul Kocialkowski
2019-03-15 16:25 ` [PATCH 3/3] drm/vc4: Don't liberate the binner BO at runtime suspend Paul Kocialkowski
2019-03-16 18:58   ` Eric Anholt
2019-03-20 15:17     ` Paul Kocialkowski [this message]

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=8d6f1e9191638e243616ac7832b1b650a80d85ad.camel@bootlin.com \
    --to=paul.kocialkowski@bootlin.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eben@raspberrypi.org \
    --cc=eric@anholt.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=sean@poorly.run \
    --cc=thomas.petazzoni@bootlin.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).