From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Rob Clark <robdclark@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 4/4] fbdev: Debug knob to register without holding console_lock
Date: Tue, 01 Sep 2015 14:41:48 +0000 [thread overview]
Message-ID: <55E5B92C.7000202@ti.com> (raw)
In-Reply-To: <CAF6AEGtV1-tgvA0D-BFZ8NMNyNN7C8-jst5xXBKrQHGFVWCpyA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2587 bytes --]
On 01/09/15 17:34, Rob Clark wrote:
> On Tue, Sep 1, 2015 at 6:32 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>>
>>
>> On 25/08/15 22:24, Rob Clark wrote:
>>> On Tue, Aug 25, 2015 at 9:45 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>>>> When the usual fbcon legacy options are enabled we have
>>>> ->register_framebuffer
>>>> ->fb notifier chain calls into fbcon
>>>> ->fbcon sets up console on new fbi
>>>> ->fbi->set_par
>>>> ->drm_fb_helper_set_par exercises full kms api
>>>>
>>>> And because of locking inversion hilarity all of register_framebuffer
>>>> is done with the console lock held. Which means that the first time on
>>>> driver load we exercise _all_ the kms code (all probe paths and
>>>> modeset paths for everything connected) is under the console lock.
>>>> That means if anything goes belly-up in that big pile of code nothing
>>>> ever reaches logfiles (and the machine is dead).
>>>>
>>>> Usual tactic to debug that is to temporarily remove those console_lock
>>>> calls to be able to capture backtraces. I'm fed up writing this patch
>>>> and recompiling kernels. Hence this patch here to add an unsafe,
>>>> kernel-taining option to do this at runtime.
>>>>
>>>> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
>>>> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
>>>> Cc: linux-fbdev@vger.kernel.org
>>>> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>>>
>>> This one was causing me some problems, if I tried to enable
>>> lockless_register_fb. It *looks* like it should work, so I'm not
>>> quite sure what the deal is. But I'm 110% fan of getting something
>>> like this working, because console_lock is pretty much the bane of kms
>>> developer's existence..
>>>
>>> I'll have to debug further on a system where I can see more than the
>>> bottom three lines of the second to last backtrace..
>>
>> Any idea if anyone has ever looked at properly fixing this?
>
> I hadn't had a chance to look at it further yet.. I think Daniel
> claimed it worked for him, but he was probably on intel-next, where I
> was on drm-next at the time which seemed to be having some unrelated
> i915 issues (when I was trying to debug atomic fb-helper patches). So
> can't really say that the issue I had was actually related to this
> patch. I'll try again later this week or next, when hopefully i915 in
> drm-next is in better shape..
Oh, I didn't mean this patch, but the whole console lock in general.
I've also banged my head to a wall because of it =).
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-09-01 14:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1440510314-8633-1-git-send-email-daniel.vetter@ffwll.ch>
2015-08-25 13:45 ` [PATCH 4/4] fbdev: Debug knob to register without holding console_lock Daniel Vetter
2015-08-25 19:24 ` Rob Clark
2015-09-01 10:32 ` Tomi Valkeinen
2015-09-01 14:34 ` Rob Clark
2015-09-01 14:41 ` Tomi Valkeinen [this message]
2015-09-01 15:12 ` Rob Clark
2015-09-01 15:31 ` Daniel Vetter
2015-09-24 10:56 ` Tomi Valkeinen
2015-12-07 17:32 ` Tomi Valkeinen
2015-12-08 8:19 ` Daniel Vetter
2015-12-08 8:26 ` Tomi Valkeinen
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=55E5B92C.7000202@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
--cc=robdclark@gmail.com \
/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).