From: Daniel Vetter <daniel@ffwll.ch>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Petr Mladek <pmladek@suse.com>,
Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH v5 2/3] fbcon: Call WARN_CONSOLE_UNLOCKED() where applicable
Date: Wed, 11 Jul 2018 17:56:02 +0000 [thread overview]
Message-ID: <CAKMK7uFuZ6NJOKHG6PRNLUytE4m6ZUdMakwLx9Ns39OwvTneWQ@mail.gmail.com> (raw)
In-Reply-To: <2f37f47c-e28e-77fa-2383-96c7d3e77433@redhat.com>
On Wed, Jul 11, 2018 at 7:35 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> Hi,
>
>
> On 11-07-18 17:42, Daniel Vetter wrote:
>>
>> On Wed, Jul 11, 2018 at 5:35 PM, Hans de Goede <hdegoede@redhat.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> On 11-07-18 17:28, Daniel Vetter wrote:
>>>>
>>>>
>>>> On Wed, Jul 11, 2018 at 5:14 PM, Hans de Goede <hdegoede@redhat.com>
>>>> wrote:
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> On 11-07-18 17:07, Thomas Zimmermann wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> Am 11.07.2018 um 16:52 schrieb Steven Rostedt:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> What if you make lockless_register_fb visible to fbcon, and then we
>>>>>>> can
>>>>>>> have a macro:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> There are more of these macro invocations under drivers/tty/vt, which
>>>>>> also mess up the log during debugging.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Hmm, so this option is already broken (in a way) then, my first
>>>>> reaction
>>>>> to your mail was that we should just remove that option. But that
>>>>> seemed
>>>>> a bit harsh to me so I've been working on a fix for the last 10 minutes
>>>>> or so.
>>>>>
>>>>> But if it is already broken I'm tempted to just remove the option and
>>>>> be done with it. We really need less cruft in the fbdev/fbcon code not
>>>>> more.
>>>>
>>>>
>>>>
>>>> Please don't remove it, it makes debugging kms driver issues on
>>>> initial modeset (which is usually run from framebuffer_register, while
>>>> hodling the console_lock) impossible.
>>>
>>>
>>>
>>> OK, so if we don't remove it, we should probably make it so that it
>>> can be used without triggering any WARN_ONs, which would require changing
>>> the existing WARN_CONSOLE_UNLOCKED() so that the calls from
>>> drivers/tty/vt/vt.c
>>> also do not trigger it ?
>>>
>>> I guess one can just ignore the oopses when debugging, but debugging
>>> surely
>>> would be easier if there are just no oopses ?
>>
>>
>> I'd say let's only bother with the ones in fbcon.c. Avoids the trouble
>> with having to expose the fb module option to vt.c somehow.
>
>
> The plan was actually do the things the other way around, add a flag to
> vt.c which when set disables the WARN_ON calls and then have fbdev[.ko]
> set that when the fb.lockless_fb_register option is set.
>
>> The ones
>> in vt.c are as old as the git history (from a quick check at least),
>> and in my debugging they never have been annoying (or I somehow didn't
>> ever hit them, not idea).
>
>
> There is a #if 1 #define #else #define empty around the
> WARN_CONSOLE_UNLOCKED()
> call in include/linux/console.h I've the feeling that is there as a hack
> to be able to quickly disable the WARN_ONs when debugging.
>
> Have you seen Steven's suggestion which he send about the same time
> as your mail I'm replying to here ? I personally think that doing
> something like that makes sense (for as long as we have the need
> for the lockless_fb_register debug hack).
>
> Note I've 2 patches ready to go to only fix this in fbcon.c, but I
> think a more thorough fix makes sense.
Yeah Steven's suggestion looks reasonable to fix this all for good.
The #if 1 predates git history, so no idea why it was added or by whom
:-)
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2018-07-11 17:56 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180628090357epcas5p28361ab4b3ce11c179a167548f4851983@epcas5p2.samsung.com>
2018-06-28 9:03 ` [PATCH v5 0/3] console/fbcon: Add support for deferred console takeover Hans de Goede
2018-06-28 9:03 ` [PATCH v5 1/3] printk: Export is_console_locked Hans de Goede
2018-06-28 9:03 ` [PATCH v5 2/3] fbcon: Call WARN_CONSOLE_UNLOCKED() where applicable Hans de Goede
2018-07-11 14:46 ` Thomas Zimmermann
2018-07-11 14:52 ` Steven Rostedt
2018-07-11 15:01 ` Hans de Goede
2018-07-11 15:07 ` Daniel Vetter
2018-07-11 15:07 ` Thomas Zimmermann
2018-07-11 15:14 ` Hans de Goede
2018-07-11 15:28 ` Daniel Vetter
2018-07-11 15:35 ` Hans de Goede
2018-07-11 15:41 ` Steven Rostedt
2018-07-11 15:42 ` Daniel Vetter
2018-07-11 17:35 ` Hans de Goede
2018-07-11 17:56 ` Daniel Vetter [this message]
2018-07-11 19:19 ` Steven Rostedt
2018-07-11 19:41 ` Hans de Goede
2018-07-12 10:16 ` Thomas Zimmermann
2018-07-11 23:59 ` Sergey Senozhatsky
2018-06-28 9:03 ` [PATCH v5 3/3] console/fbcon: Add support for deferred console takeover Hans de Goede
2018-07-03 16:13 ` Sergey Senozhatsky
2018-07-03 16:14 ` Steven Rostedt
2018-07-03 16:36 ` Sergey Senozhatsky
2018-06-28 13:50 ` [PATCH v5 0/3] " Bartlomiej Zolnierkiewicz
2018-06-28 15:24 ` Hans de Goede
2018-06-28 22:44 ` Gustavo Padovan
2018-06-29 10:08 ` Bartlomiej Zolnierkiewicz
2018-06-29 12:51 ` Gustavo Padovan
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=CAKMK7uFuZ6NJOKHG6PRNLUytE4m6ZUdMakwLx9Ns39OwvTneWQ@mail.gmail.com \
--to=daniel@ffwll.ch \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=tzimmermann@suse.de \
/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).