From: Eric Anholt <eric@anholt.net>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org,
Peter Robinson <pbrobinson@gmail.com>,
Boris Brezillon <boris.brezillon@bootlin.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] drm/vc4: Make sure vc4_bo_{inc,dec}_usecnt() calls are balanced
Date: Mon, 30 Apr 2018 13:54:54 -0700 [thread overview]
Message-ID: <87y3h4jty9.fsf@anholt.net> (raw)
In-Reply-To: <20180430133232.32457-1-boris.brezillon@bootlin.com>
[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]
Boris Brezillon <boris.brezillon@bootlin.com> writes:
> Commit b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl")
> introduced a mechanism to mark some BOs as purgeable to allow the driver
> to drop them under memory pressure. In order to implement this feature
> we had to add a mechanism to mark BOs as currently used by a piece of
> hardware which materialized through the ->usecnt counter.
>
> Plane code is supposed to increment usecnt when it attaches a BO to a
> plane and decrement it when it's done with this BO, which was done in
> the ->prepare_fb() and ->cleanup_fb() hooks. The problem is, async page
> flip logic does not go through the regular atomic update path, and
> ->prepare_fb() and ->cleanup_fb() are not called in this case.
>
> Fix that by manually calling vc4_bo_{inc,dec}_usecnt() in the
> async-page-flip path.
>
> Note that all this should go away as soon as we get generic async page
> flip support in the core, in the meantime, this fix should do the
> trick.
Pushed to drm-misc-fixes. Thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
prev parent reply other threads:[~2018-04-30 20:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-30 13:32 [PATCH] drm/vc4: Make sure vc4_bo_{inc,dec}_usecnt() calls are balanced Boris Brezillon
2018-04-30 20:54 ` Eric Anholt [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=87y3h4jty9.fsf@anholt.net \
--to=eric@anholt.net \
--cc=airlied@linux.ie \
--cc=boris.brezillon@bootlin.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=pbrobinson@gmail.com \
--cc=stable@vger.kernel.org \
/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