From: Jani Nikula <jani.nikula@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
Jim Rees <rees@umich.edu>,
stable@vger.kernel.org,
DRI Development <dri-devel@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 1/2] drm: refernce count event->completion
Date: Thu, 09 Feb 2017 16:39:29 +0200 [thread overview]
Message-ID: <87mvdvsa1q.fsf@intel.com> (raw)
In-Reply-To: <20170104100510.fhgu237qfhiv47gr@phenom.ffwll.local>
On Wed, 04 Jan 2017, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Dec 21, 2016 at 12:08:45PM +0100, Maarten Lankhorst wrote:
>> Op 21-12-16 om 11:36 schreef Chris Wilson:
>> > On Wed, Dec 21, 2016 at 11:23:30AM +0100, Daniel Vetter wrote:
>> >> When writing the generic nonblocking commit code I assumed that
>> >> through clever lifetime management I can assure that the completion
>> >> (stored in drm_crtc_commit) only gets freed after it is completed. And
>> >> that worked.
>> >>
>> >> I also wanted to make nonblocking helpers resilient against driver
>> >> bugs, by having timeouts everywhere. And that worked too.
>> >>
>> >> Unfortunately taking boths things together results in oopses :( Well,
>> >> at least sometimes: What seems to happen is that the drm event hangs
>> >> around forever stuck in limbo land. The nonblocking helpers eventually
>> >> time out, move on and release it. Now the bug I tested all this
>> >> against is drivers that just entirely fail to deliver the vblank
>> >> events like they should, and in those cases the event is simply
>> >> leaked. But what seems to happen, at least sometimes, on i915 is that
>> >> the event is set up correctly, but somohow the vblank fails to fire in
>> >> time. Which means the event isn't leaked, it's still there waiting for
>> >> evevntually a vblank to fire. That tends to happen when re-enabling the
>> >> pipe, and then the trap springs and the kernel oopses.
>> >>
>> >> The correct fix here is simply to refcount the crtc commit to make
>> >> sure that the event sticks around even for drivers which only
>> >> sometimes fail to deliver vblanks for some arbitrary reasons. Since
>> >> crtc commits are already refcounted that's easy to do.
>> > Or make the event a part of the atomic state?
>> > -Chris
>> >
>> afaict crtc commit is already taken to wait for completion, so this patch makes sense.
>>
>> There's just a minor typo in the subject. :)
>> Not sure that release_commit should be a function pointer, regardless..
>>
>> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>
> It didn't help the bug reporters against oopses (but the reporters are
> supremely confusing, I have no idea what's really being tested, the
> bugzilla is a mess), but I still think the patch is useful for more
> robuestness, I dropped the cc: stable and applied it to drm-misc.
Agreed on the bug [1] being a mess. However, the bug has a reliable
bisect result, the revert was posted by some of the reporters on the
lists and in the bug, and now something that will not help anyone in
v4.9 or v4.10 was pushed. :(
BR,
Jani.
[1] https://bugs.freedesktop.org/show_bug.cgi?id=96781
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-02-09 14:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-21 10:23 [PATCH 1/2] drm: refernce count event->completion Daniel Vetter
2016-12-21 10:23 ` [PATCH 2/2] drm: Add kernel-doc for drm_crtc_commit_get/put Daniel Vetter
2016-12-21 13:03 ` [PATCH] " Daniel Vetter
2017-01-04 16:11 ` Daniel Vetter
2017-01-04 20:26 ` Alex Deucher
2017-01-05 7:55 ` Daniel Vetter
2016-12-22 3:11 ` [Intel-gfx] [PATCH 2/2] " kbuild test robot
2016-12-21 10:36 ` [PATCH 1/2] drm: refernce count event->completion Chris Wilson
2016-12-21 11:08 ` Maarten Lankhorst
2017-01-04 10:05 ` Daniel Vetter
2017-02-09 14:39 ` Jani Nikula [this message]
2017-02-09 17:20 ` Daniel Vetter
2017-02-09 19:09 ` Jim Rees
2016-12-21 12:18 ` 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=87mvdvsa1q.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=rees@umich.edu \
--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;
as well as URLs for NNTP newsgroup(s).