All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: John Stultz <john.stultz@linaro.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 00/13] fbdev locking rework and deferred setup, take 2
Date: Wed, 28 Jun 2017 09:36:03 +0200	[thread overview]
Message-ID: <20170628073603.ks2ug5vpfj4imxbu@phenom.ffwll.local> (raw)
In-Reply-To: <CALAqxLUPLg8hwLsciW_opQY_tqsYSnDiezYYFFxnQqqzmpHBVw@mail.gmail.com>

On Tue, Jun 27, 2017 at 04:02:02PM -0700, John Stultz wrote:
> On Tue, Jun 27, 2017 at 7:59 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> >
> > Thanks to Liviu's help I realized that I fumbled the locking rework completely.
> > This one here should be better, but somehow I'm having a real bad day today and
> > I spent all day typing shit code, and then making it worse.
> >
> > This here seems to work at first glance, but please test and review carefully.
> 
> After some self-caused testing pain (somehow missed picking one of the
> patches in mutt), I managed to get these tested w/ HiKey against
> 4.12-rc7.
> 
> Things seemed to work fairly well.
> 
> Though the one quirk I saw was that previously if I booted the device
> w/o HDMI plugged in, it would boot up defaulting to 1024x768
> resolution, and when I plugged in the HDMI cable, the monitor would
> start up and use that resolution.
> 
> With your patchset, if I boot without the monitor attached,  it seems
> no fb is created, so surfaceflinger crashes repeatedly trying to start
> up.  Then when I do plug the montior in, I get the following crash:
> 
> [  106.503724] Unable to handle kernel NULL pointer dereference at
> virtual address 00000038
> [  106.512050] pgd = ffffff8008e89000
> [  106.515596] [00000038] *pgd=0000000077ffe003,
> *pud=0000000077ffe003, *pmd=0000000000000000
> [  106.524050] Internal error: Oops: 96000005 [#1] PREEMPT SMP
> [  106.529678] CPU: 2 PID: 1184 Comm: kworker/2:2 Tainted: G        W
>      4.12.0-rc7-00093-g42439fe-dirty #3054
> [  106.539711] Hardware name: HiKey Development Board (DT)
> [  106.544996] Workqueue: events adv7511_hpd_work
> [  106.549484] task: ffffffc0753c3e80 task.stack: ffffffc074b0c000
> [  106.555449] PC is at drm_sysfs_hotplug_event+0x34/0x58
> [  106.560624] LR is at drm_sysfs_hotplug_event+0x34/0x58
> [  106.565796] pc : [<ffffff8008536634>] lr : [<ffffff8008536634>]
> pstate: 40000145
> [  106.573221] sp : ffffffc074b0fd40
> [  106.576562] x29: ffffffc074b0fd40 x28: 0000000000000000
> [  106.581925] x27: ffffffc005f93d20 x26: ffffffc074d387b8
> [  106.587288] x25: ffffffc0753c3e80 x24: ffffffc0747e3258
> [  106.592650] x23: 0000000000000000 x22: ffffffc077f44a80
> [  106.598012] x21: ffffffc077f46900 x20: ffffffc07441cd00
> [  106.603373] x19: 0000000000000000 x18: 0000000000000000
> [  106.608733] x17: 0000000000000000 x16: 0000000000000000
> [  106.614093] x15: 00000018cc1b97ed x14: 0000000000000000
> [  106.619453] x13: 0000000000000000 x12: 0000000000000000
> [  106.624813] x11: 00000000000002e5 x10: 0000000000000880
> [  106.630173] x9 : ffffffc074b0fa10 x8 : ffffffc0753c4760
> [  106.635534] x7 : ffffffc077f3ec80 x6 : ffffffc077f3c090
> [  106.640895] x5 : ffffff8008da0568 x4 : 0000000000000000
> [  106.646254] x3 : 0000000000000000 x2 : ffffff8008c39d90
> [  106.651613] x1 : 0000000000000001 x0 : ffffff8008c02fe8
> [  106.656981] Process kworker/2:2 (pid: 1184, stack limit = 0xffffffc074b0c000)
> [  106.664152] Stack: (0xffffffc074b0fd40 to 0xffffffc074b10000)
> [  106.669940] fd40: ffffffc074b0fd70 ffffff800851d1ec
> 0000000000000000 ffffff80085c7b04
> [  106.677813] fd60: ffffff8008c39d80 0000000000000000
> ffffffc074b0fd90 ffffff8008550bd4
> [  106.685687] fd80: ffffffc0747e3018 ffffff80080df688
> ffffffc074b0fdc0 ffffff80080d0814
> [  106.693561] fda0: 0000000000000000 ffffff8008a45eb8
> ffffffc074b0fdc0 000000d0080d0808
> [  106.701436] fdc0: ffffffc074b0fe00 ffffff80080d0a68
> ffffffc07441cd00 ffffffc074a83a00
> [  106.709310] fde0: ffffffc077f44a80 ffffffc07441cd30
> ffffff8008d46000 ffffffc077f44aa0
> [  106.717184] fe00: ffffffc074b0fe60 ffffff80080d6974
> ffffffc074d38780 ffffffc074a83a00
> [  106.725059] fe20: ffffff8008df9160 ffffffc0753c3e80
> ffffff8008bf9528 ffffffc07441cd00
> [  106.732929] fe40: ffffff80080d0a20 ffffffc074d387b8
> ffffffc005f93d20 0000000000000000
> [  106.740801] fe60: 0000000000000000 ffffff8008082ec0
> ffffff80080d6878 ffffffc074a83a00
> [  106.748671] fe80: 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000
> [  106.756541] fea0: 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000
> [  106.764411] fec0: 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000
> [  106.772281] fee0: 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000
> [  106.780151] ff00: 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000
> [  106.788021] ff20: 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000
> [  106.795889] ff40: 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000
> [  106.803759] ff60: 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000
> [  106.811629] ff80: 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000
> [  106.819475] ffa0: 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000
> [  106.827308] ffc0: 0000000000000000 0000000000000005
> 0000000000000000 0000000000000000
> [  106.835143] ffe0: 0000000000000000 0000000000000000
> 0000000000000000 0000000000000000
> [  106.842974] Call trace:
> [  106.845422] Exception stack(0xffffffc074b0fb70 to 0xffffffc074b0fca0)
> [  106.851866] fb60:
> 0000000000000000 0000008000000000
> [  106.859701] fb80: ffffffc074b0fd40 ffffff8008536634
> ffffffc074b0fba0 ffffff80085b6d88
> [  106.867535] fba0: ffffffc074b0fbd0 ffffff8008700f4c
> ffffffc0747e2818 0000000000000002
> [  106.875370] fbc0: ffffffc0747e28b8 0000000000000002
> ffffffc074b0fc20 ffffff80086fd5dc
> [  106.883205] fbe0: ffffffc0747e28b8 0000000000000001
> 0000000000000002 ffffffc074b0fca0
> [  106.891039] fc00: ffffffc074b0fc50 ffffff80086fb5c8
> ffffff8008c02fe8 0000000000000001
> [  106.898872] fc20: ffffff8008c39d90 0000000000000000
> 0000000000000000 ffffff8008da0568
> [  106.906706] fc40: ffffffc077f3c090 ffffffc077f3ec80
> ffffffc0753c4760 ffffffc074b0fa10
> [  106.914540] fc60: 0000000000000880 00000000000002e5
> 0000000000000000 0000000000000000
> [  106.922374] fc80: 0000000000000000 00000018cc1b97ed
> 0000000000000000 0000000000000000
> [  106.930209] [<ffffff8008536634>] drm_sysfs_hotplug_event+0x34/0x58
> [  106.936397] [<ffffff800851d1ec>] drm_kms_helper_hotplug_event+0x14/0x38
> [  106.943015] [<ffffff8008550bd4>] adv7511_hpd_work+0x4c/0x60
> [  106.948594] [<ffffff80080d0814>] process_one_work+0x114/0x320
> [  106.954344] [<ffffff80080d0a68>] worker_thread+0x48/0x428
> [  106.959748] [<ffffff80080d6974>] kthread+0xfc/0x128
> [  106.964632] [<ffffff8008082ec0>] ret_from_fork+0x10/0x50
> [  106.969949] Code: 913fa020 52800021 a9027fa3 97fff898 (f9401e60)
> [  106.976112] ---[ end trace dd098614ee129219 ]---
> [  107.016693] Kernel panic - not syncing: Fatal exception
> 
> 
> I've got to dig a bit more here (probably something is wrong with the
> bridge driver), but let me know if the lack of the 1024x768 default fb
> is expected.

That's the entire point of the deferred setup trick - only once you plug
in the first output will we create the fbdev (because the framebuffer for
that stuff is static, because fbdev doesn't allow remapping and moving).
Oops otoh isn't what should happen.

Since I don't do arm, can you pls explain where/how it blew up? Only quick
guess I have is that adv7511->connector.dev is NULL in adv7511_hpd_work,
which would indeed be a bug in your bridge. Or the driver load sequence of
your driver, handling hotplug before the connector is fully registered
isn't a good idea.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-06-28  7:36 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 14:59 Daniel Vetter
2017-06-27 14:59 ` [PATCH 01/13] drm/fb-helper: Push down modeset lock into FB helpers Daniel Vetter
2017-06-29  9:10   ` Maarten Lankhorst
2017-06-29  9:23     ` Daniel Vetter
2017-06-29  9:33       ` Maarten Lankhorst
2017-06-29  9:44         ` Daniel Vetter
2017-06-29 11:13           ` Maarten Lankhorst
2017-06-29 12:38             ` Daniel Vetter
2017-06-27 14:59 ` [PATCH 02/13] drm/i915: Drop FBDEV #ifdev in mst code Daniel Vetter
2017-06-27 14:59 ` [PATCH 03/13] drm/fb-helper: Add top-level lock Daniel Vetter
2017-06-27 14:59 ` [PATCH 04/13] drm/fb-helper: Push locking in fb_is_bound Daniel Vetter
2017-06-27 14:59 ` [PATCH 05/13] drm/fb-helper: Drop locking from the vsync wait ioctl code Daniel Vetter
2017-06-27 14:59 ` [PATCH 06/13] drm/fb-helper: Push locking into pan_display_atomic|legacy Daniel Vetter
2017-06-27 14:59 ` [PATCH 07/13] drm/fb-helper: Push locking into restore_fbdev_mode_atomic|legacy Daniel Vetter
2017-06-27 14:59 ` [PATCH 08/13] drm/fb-helper: Stop using mode_config.mutex for internals Daniel Vetter
2017-06-27 14:59 ` [PATCH 09/13] drm/fb-helper: Split dpms handling into legacy and atomic paths Daniel Vetter
2017-06-29 10:22   ` Maarten Lankhorst
2017-06-29 10:31     ` Daniel Vetter
2017-06-29 10:58       ` Maarten Lankhorst
2017-06-29 11:00         ` Daniel Vetter
2017-06-29 11:23           ` Maarten Lankhorst
2017-06-27 14:59 ` [PATCH 10/13] drm/fb-helper: Support deferred setup Daniel Vetter
2017-06-28 11:32   ` [PATCH] " Daniel Vetter
2017-06-28 16:24     ` Liviu Dudau
2017-06-29 10:59     ` Maarten Lankhorst
2017-06-29 12:36       ` Daniel Vetter
2017-06-30 16:51     ` [PATCH] drm/fb-helper: Restore first connection behaviour on " Liviu Dudau
2017-06-30 18:13       ` Daniel Vetter
2017-07-03  8:44         ` Liviu Dudau
2017-07-03 16:33           ` Daniel Vetter
2017-06-27 14:59 ` [PATCH 11/13] drm/exynos: Remove custom FB helper " Daniel Vetter
2017-06-27 14:59 ` [PATCH 12/13] drm/hisilicon: " Daniel Vetter
2017-06-28  9:08   ` [PATCH] " Daniel Vetter
2017-06-27 14:59 ` [PATCH 13/13] drm/atomic-helper: Realign function parameters Daniel Vetter
2017-06-27 15:01   ` Deucher, Alexander
2017-06-27 15:42   ` Harry Wentland
2017-07-04 15:16     ` Daniel Vetter
2017-06-27 15:30 ` ✓ Fi.CI.BAT: success for fbdev locking rework and deferred setup, take 2 Patchwork
2017-06-27 23:02 ` [PATCH 00/13] " John Stultz
2017-06-28  7:36   ` Daniel Vetter [this message]
2017-06-28  9:28 ` ✓ Fi.CI.BAT: success for fbdev locking rework and deferred setup, take 2 (rev2) Patchwork
2017-06-28 12:28 ` ✓ Fi.CI.BAT: success for fbdev locking rework and deferred setup, take 2 (rev3) Patchwork

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=20170628073603.ks2ug5vpfj4imxbu@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=john.stultz@linaro.org \
    --subject='Re: [PATCH 00/13] fbdev locking rework and deferred setup, take 2' \
    /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

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.