public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora•com>
To: Helen Koike <helen.koike@collabora•com>
Cc: andrey.grodzovsky@amd•com,
	"Stéphane Marchesin" <marcheu@google•com>,
	"Heiko Stübner" <heiko@sntech•de>,
	"Sean Paul" <seanpaul@google•com>,
	"David Airlie" <airlied@linux•ie>,
	daniel.vetter@ffwll•ch, linux-kernel@vger•kernel.org,
	dri-devel@lists•freedesktop.org,
	"Tomasz Figa" <tfiga@chromium•org>,
	linux-rockchip@lists•infradead.org,
	"Sandy Huang" <hjc@rock-chips•com>,
	"Daniel Vetter" <daniel@ffwll•ch>,
	kernel@collabora•com, harry.wentland@amd•com,
	nicholas.kazlauskas@amd•com,
	linux-arm-kernel@lists•infradead.org
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.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-06-04  8:34 UTC|newest]

Thread overview: 6+ 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 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$(echo .)com \
    --cc=airlied@linux$(echo .)ie \
    --cc=andrey.grodzovsky@amd$(echo .)com \
    --cc=daniel.vetter@ffwll$(echo .)ch \
    --cc=daniel@ffwll$(echo .)ch \
    --cc=dri-devel@lists$(echo .)freedesktop.org \
    --cc=harry.wentland@amd$(echo .)com \
    --cc=heiko@sntech$(echo .)de \
    --cc=helen.koike@collabora$(echo .)com \
    --cc=hjc@rock-chips$(echo .)com \
    --cc=kernel@collabora$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-rockchip@lists$(echo .)infradead.org \
    --cc=marcheu@google$(echo .)com \
    --cc=nicholas.kazlauskas@amd$(echo .)com \
    --cc=seanpaul@google$(echo .)com \
    --cc=tfiga@chromium$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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