From: Liviu Dudau <Liviu.Dudau@arm.com>
To: Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
Rob Clark <robdclark@gmail.com>,
DRI devel <dri-devel@lists.freedesktop.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: drm: Bogus WARN() in drm_atomic_helper_update_legacy_modeset_state() ?
Date: Tue, 10 Nov 2015 15:01:03 +0000 [thread overview]
Message-ID: <20151110150102.GP963@e106497-lin.cambridge.arm.com> (raw)
Hello,
When booting my Juno board with the HDLCD driver that I have converted to
atomic operations I'm getting the following warning:
------------[ cut here ]------------
WARNING: at /work/repositories/kernel/drivers/gpu/drm/drm_atomic_helper.c:674
Modules linked in: hdlcd(+) clk_scpi
CPU: 3 PID: 1375 Comm: systemd-udevd Not tainted 4.3.0-next-20151109+ #5
Hardware name: ARM Juno development board (r0) (DT)
task: ffffffc974888b00 ti: ffffffc9755dc000 task.ti: ffffffc9755dc000
PC is at drm_atomic_helper_update_legacy_modeset_state+0x204/0x20c
LR is at drm_atomic_helper_commit_modeset_disables+0x1c0/0x394
pc : [<ffffffc0003e6d18>] lr : [<ffffffc0003e8214>] pstate: 20000145
sp : ffffffc9755df430
x29: ffffffc9755df430 x28: ffffffc975703600
x27: 0000000000000000 x26: ffffffc976253960
x25: ffffffc976254040 x24: ffffffc000819000
x23: ffffffc000689ea0 x22: ffffffc976251800
x21: ffffffc976251800 x20: 0000000000000000
x19: ffffffc9766b1f80 x18: 00000000715fe015
x17: 0000007fb4b855b0 x16: 0000000000000220
x15: 0000000000000001 x14: 0ffffffffffffffe
x13: 0000000000000008 x12: 0101010101010101
x11: ffffffc000964000 x10: ffffffc0009d2000
x9 : 0000000000000000 x8 : ffffffc97ff5f700
x7 : ffffffc97566cb80 x6 : ffffffc9766b1700
x5 : ffffffc975665100 x4 : 0000000000000000
x3 : ffffffc976253960 x2 : ffffffc97566cd00
x1 : ffffffc976253900 x0 : 0000000000000000
---[ end trace 9fe289f798e7178e ]---
Call trace:
[<ffffffc0003e6d18>] drm_atomic_helper_update_legacy_modeset_state+0x204/0x20c
[<ffffffc0003e8214>] drm_atomic_helper_commit_modeset_disables+0x1c0/0x394
[<ffffffc0003e84c8>] drm_atomic_helper_commit+0xe0/0x150
[<ffffffc00040bcc0>] drm_atomic_commit+0x40/0x6c
[<ffffffc0003e92c0>] restore_fbdev_mode+0x294/0x2d4
[<ffffffc0003eb6ec>] drm_fb_helper_restore_fbdev_mode_unlocked+0x34/0x8c
[<ffffffc0003eb770>] drm_fb_helper_set_par+0x2c/0x58
[<ffffffc000378048>] fbcon_init+0x4d4/0x534
[<ffffffc0003b44f4>] visual_init+0xac/0x104
[<ffffffc0003b63f8>] do_bind_con_driver+0x16c/0x398
[<ffffffc0003b6968>] do_take_over_console+0xd8/0x1f4
[<ffffffc00037811c>] do_fbcon_takeover+0x74/0xf8
[<ffffffc00037c5cc>] fbcon_event_notify+0x8a4/0x8f8
[<ffffffc0000d19f0>] notifier_call_chain+0x4c/0x88
[<ffffffc0000d1d78>] __blocking_notifier_call_chain+0x44/0x74
[<ffffffc0000d1dbc>] blocking_notifier_call_chain+0x14/0x1c
[<ffffffc00037d614>] fb_notifier_call_chain+0x1c/0x24
[<ffffffc00037f8a8>] register_framebuffer+0x1c0/0x2ac
[<ffffffc0003eb9f8>] drm_fb_helper_initial_config+0x25c/0x3ec
[<ffffffc0003ec28c>] drm_fbdev_cma_init+0x98/0x134
[<ffffffbffc006780>] hdlcd_drm_bind+0x180/0x498 [hdlcd]
[<ffffffc0004158e0>] try_to_bring_up_master.part.5+0xd4/0x118
[<ffffffc0004159e8>] component_master_add_with_match+0xc4/0x148
[<ffffffc000415a7c>] component_master_add+0x10/0x18
[<ffffffbffc0065ec>] hdlcd_probe+0x14/0x28 [hdlcd]
[<ffffffc00041c504>] platform_drv_probe+0x54/0xc0
[<ffffffc00041a9b0>] driver_probe_device+0x1ec/0x2e8
[<ffffffc00041ab48>] __driver_attach+0x9c/0xa0
[<ffffffc000418bcc>] bus_for_each_dev+0x58/0x98
[<ffffffc00041a41c>] driver_attach+0x20/0x28
[<ffffffc00041a058>] bus_add_driver+0x1c8/0x22c
[<ffffffc00041b3d0>] driver_register+0x68/0x108
[<ffffffc00041c408>] __platform_driver_register+0x4c/0x54
[<ffffffbffc00b018>] hdlcd_init+0x18/0x30 [hdlcd]
[<ffffffc00008293c>] do_one_initcall+0x90/0x1a8
[<ffffffc0001424dc>] do_init_module+0x60/0x1c8
[<ffffffc00011d364>] load_module+0x1554/0x1c98
[<ffffffc00011dc64>] SyS_finit_module+0x7c/0x88
[<ffffffc000085cb0>] el0_svc_naked+0x24/0x28
The line that triggers the warning is:
674: WARN_ON(!connector->encoder->crtc);
As far as I can see the encoder->crtc value is being set to a non-NULL value only
in two places:
- in drm_atomic_helper_update_legacy_modeset_state() after WARN_ON()
encoder->crtc = connector->state->crtc;
- in drm_crtc_helper_set_config(drm_mode_set *set):
encoder->crtc = new_crtc;
Nothing in the call path from drm_atomic_commit() calls crtc_funcs->set_config() or
drm_crtc_helper_set_config() directly, so the question is if this WARN() is actually
valid.
Call path from drm_atomic_commit:
drm_atomic_helper_commit()
- drm_atomic_helper_prepare_planes()
- drm_atomic_helper_swap_state()
- drm_atomic_helper_commit_modeset_disables()
- disable_outputs()
- drm_atomic_helper_update_legacy_modeset_state()
- WARN_ON(!connector->encoder->crtc)
Best regards,
Liviu
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
next reply other threads:[~2015-11-10 15:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 15:01 Liviu Dudau [this message]
2015-11-10 16:56 ` Thierry Reding
2015-11-11 16:09 ` Liviu Dudau
2015-11-12 12:16 ` Thierry Reding
2015-11-12 13:57 ` Liviu Dudau
2015-11-12 16:28 ` Thierry Reding
2015-11-16 16:30 ` Daniel Vetter
[not found] ` <56443151.3020508@rock-chips.com>
[not found] ` <56443311.2020902@rock-chips.com>
2015-11-12 10:34 ` Liviu Dudau
2015-11-12 10:52 ` Mark yao
2015-11-12 12:26 ` Thierry Reding
[not found] ` <56444EA1.3050506@rock-chips.com>
2015-11-12 10:36 ` Liviu Dudau
2015-11-12 10:49 ` Mark yao
2015-11-12 13:34 ` Thierry Reding
2015-11-12 14:03 ` Liviu Dudau
2015-11-12 16:12 ` Thierry Reding
2015-11-12 16:48 ` Liviu Dudau
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=20151110150102.GP963@e106497-lin.cambridge.arm.com \
--to=liviu.dudau@arm.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®