All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Palminha <CARLOS.PALMINHA@synopsys.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Carlos Palminha <CARLOS.PALMINHA@synopsys.com>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH] drm/fbdev-helper: Explain how to debug console_lock fun
Date: Fri, 22 Jan 2016 11:50:06 +0000	[thread overview]
Message-ID: <56A2176E.8010009@synopsys.com> (raw)
In-Reply-To: <1453449225-10954-1-git-send-email-daniel.vetter@ffwll.ch>

Hi Daniel,

Thanks for the tip.
I just enabled fb.lockless_register_fb=1 and still cannot see any debug 
messages after the console_lock... :(

Regards,
C.Palminha

On 22-01-2016 07:53, Daniel Vetter wrote:
> Every new KMS driver writer seems to run into this and wonder how
> exactly drm_fb_helper_initial_config can die doing nothing at all.
> Set up some big warnings signs around this newbie trap to avoid future
> frustration and wasting everyone's time.
>
> Cc: Carlos Palminha <CARLOS.PALMINHA@synopsys.com>
> Cc: Xinliang Liu <xinliang.liu@linaro.org>
> Cc: laurent.pinchart@ideasonboard.com
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>   drivers/gpu/drm/drm_fb_helper.c | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 1e103c4c6ee0..9bf84b227613 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -2091,6 +2091,28 @@ out:
>    * drm_fb_helper_fill_fix() are provided as helpers to setup simple default
>    * values for the fbdev info structure.
>    *
> + * HANG DEBUGGING:
> + *
> + * When you have fbcon support built-in or already loaded, this function will do
> + * a full modeset to setup the fbdev console. And due to locking misdesign in
> + * the VT/fbdev subsystem that entire modeset sequence has to be done while
> + * holding console_lock. And until console_unlock is called no dmesg lines will
> + * be sent out to consoles, not even serial console. Which means when your
> + * driver crashes, you will see absolutely nothing else but a system stuck in
> + * this function, with no further output. And any kind of printk() you place
> + * within your own driver or in the drm core modeset code will also never show
> + * up.
> + *
> + * Standard debug practice is to run the fbcon setup without taking the
> + * console_lock as a hack, to be able to see backtraces and crashes on the
> + * serial line. This can be done by setting the fb.lockless_register_fb=1 kernel
> + * cmdline option.
> + *
> + * The other option is to just disable fbdev emulation since very likely the
> + * first modest from userspace will crash in the same way, and is even easier to
> + * debug. This can be done by setting the drm_kms_helper.fbdev_emulation=0
> + * kernel cmdline option.
> + *
>    * RETURNS:
>    * Zero if everything went ok, nonzero otherwise.
>    */
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-01-22 11:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22  7:53 [PATCH] drm/fbdev-helper: Explain how to debug console_lock fun Daniel Vetter
2016-01-22  9:42 ` ✗ Fi.CI.BAT: warning for " Patchwork
2016-01-22 11:50 ` Carlos Palminha [this message]
2016-01-22 16:45   ` [PATCH] " Daniel Vetter
2016-01-24 20:33 ` Laurent Pinchart
2016-01-25  7:34   ` 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=56A2176E.8010009@synopsys.com \
    --to=carlos.palminha@synopsys.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.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 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.