dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Gustavo Padovan <gustavo.padovan@collabora.com>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v2 2/7] drm/atomic: Clean up drm_atomic_helper_async_check
Date: Tue, 25 Jul 2017 12:36:46 +0200	[thread overview]
Message-ID: <13e11df0-f406-4515-af84-5827cf6c4a52@linux.intel.com> (raw)
In-Reply-To: <CAKMK7uEi0_-wXhjPoXxfCKwBs_YjjJoaFiJwfHt6diHNxysGQA@mail.gmail.com>

Op 25-07-17 om 11:27 schreef Daniel Vetter:
> On Tue, Jul 25, 2017 at 11:11 AM, Maarten Lankhorst
> <maarten.lankhorst@linux.intel.com> wrote:
>> Op 25-07-17 om 10:23 schreef Daniel Vetter:
>>> On Wed, Jul 19, 2017 at 04:39:15PM +0200, Maarten Lankhorst wrote:
>>>>      /*
>>>> -     * Don't do an async update if there is an outstanding commit modifying
>>>> -     * the plane.  This prevents our async update's changes from getting
>>>> -     * overridden by a previous synchronous update's state.
>>>> +     * FIXME: We should prevent an async update if there is an outstanding
>>>> +     * commit modifying the plane.  This prevents our async update's
>>>> +     * changes from getting overwritten by a previous synchronous update's
>>>> +     * state.
>>>>       */
>>>> -    for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
>>>> -            if (plane->crtc != crtc)
>>>> -                    continue;
>>>> -
>>>> -            spin_lock(&crtc->commit_lock);
>>>> -            commit = list_first_entry_or_null(&crtc->commit_list,
>>>> -                                              struct drm_crtc_commit,
>>>> -                                              commit_entry);
>>>> -            if (!commit) {
>>>> -                    spin_unlock(&crtc->commit_lock);
>>>> -                    continue;
>>>> -            }
>>>> -            spin_unlock(&crtc->commit_lock);
>>>> -
>>>> -            if (!crtc->state->state)
>>>> -                    continue;
>>>> -
>>>> -            for_each_plane_in_state(crtc->state->state, __plane,
>>>> -                                    __plane_state, j) {
>>> I'm pretty sure this oopses, because crtc->state->state is NULL after
>>> commit. I think Gustavo needs to review this first (and write a nasty igt
>>> testcase to catch it) before we remove this. I think the correct check is
>>> to simply bail out if our current crtc has a pending commit (i.e.
>>> !list_empty(&crtc->commit_list) should be all we need to check.
>> It didn't oops. Right above it was a null check. It was never executed. :)
>>
>> obj->state->state is always NULL. Excluding a brief moment during swap_state where this may oops,  this code willl never do a thing.
> Oh right. It's still completely buggy, and I'd like to fix that first,
> testcase included. Can you pls poke Gustavo a bit (or maybe he's on
> vacation)?
> -Daniel

The only thing we have atm excercising it is kms_cursor_legacy, but that doesn't check if flips can be overwritten.
Perhaps we should make IGT tests a requirement for features in the future?

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-07-25 10:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 14:39 [PATCH v2 0/7] drm/atomic: Remove deprecated atomic iterator macros, v2 Maarten Lankhorst
2017-07-19 14:39 ` [PATCH v2 1/7] drm/atomic: Use new iterator macros in drm_atomic_helper_wait_for_flip_done, again Maarten Lankhorst
2017-07-25  8:19   ` Daniel Vetter
2017-07-19 14:39 ` [PATCH v2 2/7] drm/atomic: Clean up drm_atomic_helper_async_check Maarten Lankhorst
2017-07-25  8:23   ` Daniel Vetter
2017-07-25  9:11     ` Maarten Lankhorst
2017-07-25  9:27       ` Daniel Vetter
2017-07-25 10:36         ` Maarten Lankhorst [this message]
2017-07-19 14:39 ` [PATCH v2 3/7] drm/rcar-du: Use new iterator macros, v2 Maarten Lankhorst
2017-07-25  8:26   ` Daniel Vetter
2017-07-26 11:53   ` Laurent Pinchart
2017-07-29 20:57     ` Laurent Pinchart
2017-07-19 14:39 ` [PATCH v2 4/7] drm/omapdrm: Fix omap_atomic_wait_for_completion Maarten Lankhorst
2017-07-25  8:27   ` Daniel Vetter
2017-08-01  9:50     ` Maarten Lankhorst
2017-07-19 14:39 ` [PATCH v2 5/7] drm/msm: Convert to use new iterator macros, v2 Maarten Lankhorst
2017-07-19 14:39 ` [PATCH v2 6/7] drm/nouveau: Convert nouveau " Maarten Lankhorst
2017-07-25  9:04   ` Daniel Vetter
2017-07-19 14:39 ` [PATCH v2 7/7] drm/atomic: Remove deprecated accessor macros Maarten Lankhorst
2017-07-25  9:05   ` Daniel Vetter

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=13e11df0-f406-4515-af84-5827cf6c4a52@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.com \
    --cc=intel-gfx@lists.freedesktop.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