LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Helen Koike <helen.koike@collabora.com>
Cc: dri-devel@lists.freedesktop.org, nicholas.kazlauskas@amd.com,
andrey.grodzovsky@amd.com, daniel.vetter@ffwll.ch,
linux-kernel@vger.kernel.org, "Tomasz Figa" <tfiga@chromium.org>,
"David Airlie" <airlied@linux.ie>,
"Sean Paul" <seanpaul@google.com>,
kernel@collabora.com, harry.wentland@amd.com,
"Stéphane Marchesin" <marcheu@google.com>,
"Sandy Huang" <hjc@rock-chips.com>,
linux-rockchip@lists.infradead.org,
"Heiko Stübner" <heiko@sntech.de>,
linux-arm-kernel@lists.infradead.org,
"Daniel Vetter" <daniel@ffwll.ch>
Subject: Re: [PATCH v4 1/5] drm/rockchip: fix fb references in async update
Date: Tue, 4 Jun 2019 10:34:22 +0200 [thread overview]
Message-ID: <20190604103422.63a61f46@collabora.com> (raw)
In-Reply-To: <aecadca2-f67b-5d9d-550e-f90cbca5fd3f@collabora.com>
On Mon, 3 Jun 2019 17:13:34 -0300
Helen Koike <helen.koike@collabora.com> wrote:
> On 6/3/19 1:56 PM, Helen Koike wrote:
> > In the case of async update, modifications are done in place, i.e. in the
> > current plane state, so the new_state is prepared and the new_state is
> > cleaned up (instead of the old_state, unlike what happens in a
> > normal sync update).
> > To cleanup the old_fb properly, it needs to be placed in the new_state
> > in the end of async_update, so cleanup call will unreference the old_fb
> > correctly.
> >
> > Also, the previous code had a:
> >
> > plane_state = plane->funcs->atomic_duplicate_state(plane);
> > ...
> > swap(plane_state, plane->state);
> >
> > if (plane->state->fb && plane->state->fb != new_state->fb) {
> > ...
> > }
> >
> > Which was wrong, as the fb were just assigned to be equal, so this if
> > statement nevers evaluates to true.
> >
> > Another details is that the function drm_crtc_vblank_get() can only be
> > called when vop->is_enabled is true, otherwise it has no effect and
> > trows a WARN_ON().
> >
> > Calling drm_atomic_set_fb_for_plane() (which get a referent of the new
> > fb and pus the old fb) is not required, as it is taken care by
> > drm_mode_cursor_universal() when calling
> > drm_atomic_helper_update_plane().
> >
> > Signed-off-by: Helen Koike <helen.koike@collabora.com>
>
> Cc: <stable@vger.kernel.org> # v4.20+
> Fixes: 15609559a834 ("drm/rockchip: update cursors asynchronously
> through atomic.")
One comment for next time you have to add such tags after the fact:
please try to keep lines unwrapped, otherwise patchwork only gets what's
on the first line.
next prev parent reply other threads:[~2019-06-04 8:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 16:56 [PATCH v4 0/5] drm: Fix fb changes for async updates Helen Koike
2019-06-03 16:56 ` [PATCH v4 1/5] drm/rockchip: fix fb references in async update Helen Koike
2019-06-03 20:13 ` Helen Koike
2019-06-04 8:34 ` Boris Brezillon [this message]
2019-06-03 16:56 ` [PATCH v4 2/5] drm/amd: " Helen Koike
2019-06-03 20:14 ` Helen Koike
2019-06-03 16:56 ` [PATCH v4 3/5] drm/msm: " Helen Koike
2019-06-03 16:56 ` [PATCH v4 4/5] drm/vc4: " Helen Koike
2019-06-03 16:56 ` [PATCH v4 5/5] drm: don't block fb changes for async plane updates Helen Koike
2019-06-04 8:32 ` [PATCH v4 0/5] drm: Fix fb changes for async updates Boris Brezillon
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=20190604103422.63a61f46@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=airlied@linux.ie \
--cc=andrey.grodzovsky@amd.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=heiko@sntech.de \
--cc=helen.koike@collabora.com \
--cc=hjc@rock-chips.com \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=marcheu@google.com \
--cc=nicholas.kazlauskas@amd.com \
--cc=seanpaul@google.com \
--cc=tfiga@chromium.org \
--subject='Re: [PATCH v4 1/5] drm/rockchip: fix fb references in async update' \
/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
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).