From: Sandy Huang <sandy.huang@rock-chips.com>
To: Mark Yao <mark.yao@rock-chips.com>,
David Airlie <airlied@linux.ie>, Heiko Stuebner <heiko@sntech.de>
Cc: linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1.1] drm/rockchip: fix race with kms hotplug and fbdev
Date: Fri, 4 Aug 2017 11:20:25 +0800 [thread overview]
Message-ID: <3084b854-1b82-5a72-ad51-f7b12e5a57a0@rock-chips.com> (raw)
In-Reply-To: <1501575103-20136-1-git-send-email-mark.yao@rock-chips.com>
Hi Mark,
在 2017/8/1 16:11, Mark Yao 写道:
> According to the kerneldoc[0], should do fbdev setup before calling
> drm_kms_helper_poll_init(), otherwise, Kms hotplug event may race
> into fbdev helper initial, and fb_helper->dev may be NULL pointer,
> that would cause the bug:
> [ 0.735411] [00000200] *pgd=00000000f6ffe003, *pud=00000000f6ffe003, *pmd=0000000000000000
> [ 0.736156] Internal error: Oops: 96000005 [#1] PREEMPT SMP
> [ 0.736648] Modules linked in:
> [ 0.736930] CPU: 2 PID: 20 Comm: kworker/2:0 Not tainted 4.4.41 #20
> [ 0.737480] Hardware name: Rockchip RK3399 Board rev2 (BOX) (DT)
> [ 0.738020] Workqueue: events cdn_dp_pd_event_work
> [ 0.738447] task: ffffffc0f21f3100 ti: ffffffc0f2218000 task.ti: ffffffc0f2218000
> [ 0.739109] PC is at mutex_lock+0x14/0x44
> [ 0.739469] LR is at drm_fb_helper_hotplug_event+0x30/0x114
> [ 0.756253] [<ffffff8008a344f4>] mutex_lock+0x14/0x44
> [ 0.756260] [<ffffff8008445708>] drm_fb_helper_hotplug_event+0x30/0x114
> [ 0.756271] [<ffffff8008473c84>] rockchip_drm_output_poll_changed+0x18/0x20
> [ 0.756280] [<ffffff8008439fcc>] drm_kms_helper_hotplug_event+0x28/0x34
> [ 0.756286] [<ffffff800846c444>] cdn_dp_pd_event_work+0x394/0x3c4
> [ 0.756295] [<ffffff80080b2b38>] process_one_work+0x218/0x3e0
> [ 0.756302] [<ffffff80080b3538>] worker_thread+0x2e8/0x404
> [ 0.756308] [<ffffff80080b7e70>] kthread+0xe8/0xf0
> [ 0.756316] [<ffffff8008082690>] ret_from_fork+0x10/0x40
>
> [0]: https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-kms-helpers.html
>
> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
> ---
> Changes in v1.1:
> - According to the kerneldoc, fix the race bug in generic way.
>
> drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
Reviewed-by: Sandy huang <sandy.huang@rock-chips.com>
WARNING: multiple messages have this Message-ID (diff)
From: Sandy Huang <sandy.huang@rock-chips.com>
To: Mark Yao <mark.yao@rock-chips.com>,
David Airlie <airlied@linux.ie>, Heiko Stuebner <heiko@sntech.de>
Cc: linux-rockchip@lists.infradead.org,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1.1] drm/rockchip: fix race with kms hotplug and fbdev
Date: Fri, 4 Aug 2017 11:20:25 +0800 [thread overview]
Message-ID: <3084b854-1b82-5a72-ad51-f7b12e5a57a0@rock-chips.com> (raw)
In-Reply-To: <1501575103-20136-1-git-send-email-mark.yao@rock-chips.com>
Hi Mark,
在 2017/8/1 16:11, Mark Yao 写道:
> According to the kerneldoc[0], should do fbdev setup before calling
> drm_kms_helper_poll_init(), otherwise, Kms hotplug event may race
> into fbdev helper initial, and fb_helper->dev may be NULL pointer,
> that would cause the bug:
> [ 0.735411] [00000200] *pgd=00000000f6ffe003, *pud=00000000f6ffe003, *pmd=0000000000000000
> [ 0.736156] Internal error: Oops: 96000005 [#1] PREEMPT SMP
> [ 0.736648] Modules linked in:
> [ 0.736930] CPU: 2 PID: 20 Comm: kworker/2:0 Not tainted 4.4.41 #20
> [ 0.737480] Hardware name: Rockchip RK3399 Board rev2 (BOX) (DT)
> [ 0.738020] Workqueue: events cdn_dp_pd_event_work
> [ 0.738447] task: ffffffc0f21f3100 ti: ffffffc0f2218000 task.ti: ffffffc0f2218000
> [ 0.739109] PC is at mutex_lock+0x14/0x44
> [ 0.739469] LR is at drm_fb_helper_hotplug_event+0x30/0x114
> [ 0.756253] [<ffffff8008a344f4>] mutex_lock+0x14/0x44
> [ 0.756260] [<ffffff8008445708>] drm_fb_helper_hotplug_event+0x30/0x114
> [ 0.756271] [<ffffff8008473c84>] rockchip_drm_output_poll_changed+0x18/0x20
> [ 0.756280] [<ffffff8008439fcc>] drm_kms_helper_hotplug_event+0x28/0x34
> [ 0.756286] [<ffffff800846c444>] cdn_dp_pd_event_work+0x394/0x3c4
> [ 0.756295] [<ffffff80080b2b38>] process_one_work+0x218/0x3e0
> [ 0.756302] [<ffffff80080b3538>] worker_thread+0x2e8/0x404
> [ 0.756308] [<ffffff80080b7e70>] kthread+0xe8/0xf0
> [ 0.756316] [<ffffff8008082690>] ret_from_fork+0x10/0x40
>
> [0]: https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-kms-helpers.html
>
> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
> ---
> Changes in v1.1:
> - According to the kerneldoc, fix the race bug in generic way.
>
> drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
Reviewed-by: Sandy huang <sandy.huang@rock-chips.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: sandy.huang@rock-chips.com (Sandy Huang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1.1] drm/rockchip: fix race with kms hotplug and fbdev
Date: Fri, 4 Aug 2017 11:20:25 +0800 [thread overview]
Message-ID: <3084b854-1b82-5a72-ad51-f7b12e5a57a0@rock-chips.com> (raw)
In-Reply-To: <1501575103-20136-1-git-send-email-mark.yao@rock-chips.com>
Hi Mark,
? 2017/8/1 16:11, Mark Yao ??:
> According to the kerneldoc[0], should do fbdev setup before calling
> drm_kms_helper_poll_init(), otherwise, Kms hotplug event may race
> into fbdev helper initial, and fb_helper->dev may be NULL pointer,
> that would cause the bug:
> [ 0.735411] [00000200] *pgd=00000000f6ffe003, *pud=00000000f6ffe003, *pmd=0000000000000000
> [ 0.736156] Internal error: Oops: 96000005 [#1] PREEMPT SMP
> [ 0.736648] Modules linked in:
> [ 0.736930] CPU: 2 PID: 20 Comm: kworker/2:0 Not tainted 4.4.41 #20
> [ 0.737480] Hardware name: Rockchip RK3399 Board rev2 (BOX) (DT)
> [ 0.738020] Workqueue: events cdn_dp_pd_event_work
> [ 0.738447] task: ffffffc0f21f3100 ti: ffffffc0f2218000 task.ti: ffffffc0f2218000
> [ 0.739109] PC is at mutex_lock+0x14/0x44
> [ 0.739469] LR is at drm_fb_helper_hotplug_event+0x30/0x114
> [ 0.756253] [<ffffff8008a344f4>] mutex_lock+0x14/0x44
> [ 0.756260] [<ffffff8008445708>] drm_fb_helper_hotplug_event+0x30/0x114
> [ 0.756271] [<ffffff8008473c84>] rockchip_drm_output_poll_changed+0x18/0x20
> [ 0.756280] [<ffffff8008439fcc>] drm_kms_helper_hotplug_event+0x28/0x34
> [ 0.756286] [<ffffff800846c444>] cdn_dp_pd_event_work+0x394/0x3c4
> [ 0.756295] [<ffffff80080b2b38>] process_one_work+0x218/0x3e0
> [ 0.756302] [<ffffff80080b3538>] worker_thread+0x2e8/0x404
> [ 0.756308] [<ffffff80080b7e70>] kthread+0xe8/0xf0
> [ 0.756316] [<ffffff8008082690>] ret_from_fork+0x10/0x40
>
> [0]: https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-kms-helpers.html
>
> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
> ---
> Changes in v1.1:
> - According to the kerneldoc, fix the race bug in generic way.
>
> drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
Reviewed-by: Sandy huang <sandy.huang@rock-chips.com>
next prev parent reply other threads:[~2017-08-04 3:20 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-31 9:49 [PATCH 0/6] drm/rockchip: Some fixes Mark Yao
2017-07-31 9:49 ` Mark Yao
2017-07-31 9:49 ` Mark Yao
2017-07-31 9:49 ` [PATCH 1/6] drm/rockchip: vop: no need wait vblank on crtc enable Mark Yao
2017-07-31 9:49 ` Mark Yao
2017-07-31 9:49 ` Mark Yao
2017-08-03 12:36 ` Sandy Huang
2017-08-03 12:36 ` Sandy Huang
2017-07-31 9:49 ` [PATCH 2/6] drm/rockchip: vop: fix iommu page fault when resume Mark Yao
2017-07-31 9:49 ` Mark Yao
2017-07-31 9:49 ` Mark Yao
2017-08-03 13:06 ` Sandy Huang
2017-08-03 13:06 ` Sandy Huang
2017-08-03 13:06 ` Sandy Huang
2017-07-31 9:49 ` [PATCH 3/6] drm/rockchip: vop: fix NV12 video display error Mark Yao
2017-07-31 9:49 ` Mark Yao
2017-08-04 0:56 ` Sandy Huang
2017-08-04 0:56 ` Sandy Huang
2017-08-04 0:56 ` Sandy Huang
2017-07-31 9:49 ` [PATCH 4/6] drm/rockchip: vop: round_up pitches to word align Mark Yao
2017-07-31 9:49 ` Mark Yao
2017-08-04 0:56 ` Sandy Huang
2017-08-04 0:56 ` Sandy Huang
2017-08-04 0:56 ` Sandy Huang
2017-07-31 9:49 ` [PATCH 5/6] drm/rockchip: vop: report error when check resource error Mark Yao
2017-07-31 9:49 ` Mark Yao
2017-07-31 9:49 ` Mark Yao
2017-08-04 0:57 ` Sandy Huang
2017-08-04 0:57 ` Sandy Huang
2017-08-04 0:57 ` Sandy Huang
2017-07-31 9:50 ` [PATCH 6/6] drm/rockchip: fix race with kms hotplug and fbdev Mark Yao
2017-07-31 9:50 ` Mark Yao
2017-07-31 11:57 ` Emil Velikov
2017-07-31 11:57 ` Emil Velikov
2017-07-31 12:28 ` Daniel Vetter
2017-07-31 12:28 ` Daniel Vetter
2017-07-31 12:28 ` Daniel Vetter
2017-08-01 2:00 ` Mark yao
2017-08-01 2:00 ` Mark yao
2017-08-01 8:11 ` [PATCH v1.1] " Mark Yao
2017-08-01 8:11 ` Mark Yao
2017-08-01 8:11 ` Mark Yao
2017-08-04 3:20 ` Sandy Huang [this message]
2017-08-04 3:20 ` Sandy Huang
2017-08-04 3:20 ` Sandy Huang
2017-08-09 13:38 ` [PATCH 0/6] drm/rockchip: Some fixes Sean Paul
2017-08-09 13:38 ` Sean Paul
2017-08-09 13:38 ` Sean Paul
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=3084b854-1b82-5a72-ad51-f7b12e5a57a0@rock-chips.com \
--to=sandy.huang@rock-chips.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mark.yao@rock-chips.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.