From: Rob Clark <robdclark@gmail.com> To: Tomi Valkeinen <tomi.valkeinen@ti.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:34:08 +0000 [thread overview] Message-ID: <CAF6AEGtV1-tgvA0D-BFZ8NMNyNN7C8-jst5xXBKrQHGFVWCpyA@mail.gmail.com> (raw) In-Reply-To: <55E57ED1.5060109@ti.com> 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.. BR, -R > Tomi >
WARNING: multiple messages have this Message-ID (diff)
From: Rob Clark <robdclark@gmail.com> To: Tomi Valkeinen <tomi.valkeinen@ti.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, 1 Sep 2015 10:34:08 -0400 [thread overview] Message-ID: <CAF6AEGtV1-tgvA0D-BFZ8NMNyNN7C8-jst5xXBKrQHGFVWCpyA@mail.gmail.com> (raw) In-Reply-To: <55E57ED1.5060109@ti.com> 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.. BR, -R > Tomi > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-09-01 14:34 UTC|newest] Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-08-25 13:45 [PATCH 1/4] drm: Make drm_fb_unregister/remove accept NULL fb Daniel Vetter 2015-08-25 13:45 ` [PATCH 2/4] drm/fb-helper: Use -errno return in restore_mode_unlocked Daniel Vetter 2015-08-25 15:20 ` [PATCH] " Daniel Vetter 2015-08-25 19:20 ` Rob Clark 2015-08-26 11:36 ` Daniel Vetter 2015-08-29 19:04 ` shuang.he 2015-08-25 13:45 ` [PATCH 3/4] drm/fb-helper: Add module option to disable fbdev emulation Daniel Vetter 2015-08-26 5:12 ` Archit Taneja 2015-08-26 8:44 ` Archit Taneja 2015-08-26 11:34 ` Daniel Vetter 2015-08-26 11:37 ` Daniel Vetter 2015-08-26 12:29 ` Archit Taneja 2015-08-26 12:51 ` Daniel Vetter 2015-08-26 12:18 ` Archit Taneja 2015-08-25 13:45 ` [PATCH 4/4] fbdev: Debug knob to register without holding console_lock Daniel Vetter 2015-08-25 13:45 ` Daniel Vetter 2015-08-25 19:24 ` Rob Clark 2015-08-25 19:24 ` Rob Clark 2015-09-01 10:32 ` Tomi Valkeinen 2015-09-01 10:32 ` Tomi Valkeinen 2015-09-01 14:34 ` Rob Clark [this message] 2015-09-01 14:34 ` Rob Clark 2015-09-01 14:41 ` Tomi Valkeinen 2015-09-01 14:41 ` Tomi Valkeinen 2015-09-01 15:12 ` Rob Clark 2015-09-01 15:12 ` Rob Clark 2015-09-01 15:31 ` Daniel Vetter 2015-09-01 15:31 ` Daniel Vetter 2015-09-24 10:56 ` Tomi Valkeinen 2015-09-24 10:56 ` Tomi Valkeinen 2015-12-07 17:32 ` Tomi Valkeinen 2015-12-07 17:32 ` Tomi Valkeinen 2015-12-08 8:19 ` Daniel Vetter 2015-12-08 8:19 ` Daniel Vetter 2015-12-08 8:26 ` Tomi Valkeinen 2015-12-08 8:26 ` Tomi Valkeinen 2015-08-25 19:19 ` [PATCH 1/4] drm: Make drm_fb_unregister/remove accept NULL fb Rob Clark
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=CAF6AEGtV1-tgvA0D-BFZ8NMNyNN7C8-jst5xXBKrQHGFVWCpyA@mail.gmail.com \ --to=robdclark@gmail.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=tomi.valkeinen@ti.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.