Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755534AbbLQKcp (ORCPT ); Thu, 17 Dec 2015 05:32:45 -0500 Received: from regular1.263xmail.com ([211.150.99.134]:33539 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750846AbbLQKcm (ORCPT ); Thu, 17 Dec 2015 05:32:42 -0500 X-263anti-spam: KSV:0;BIG:0;ABS:1;DNS:0;ATT:0;SPF:S; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ADDR-CHECKED: 0 X-RL-SENDER: mark.yao@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: mark.yao@rock-chips.com X-UNIQUE-TAG: <81d5e54b8d271f9f18d7647d88d86182> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <56728F3F.6060309@rock-chips.com> Date: Thu, 17 Dec 2015 18:32:31 +0800 From: Mark yao User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: =?UTF-8?B?SGVpa28gU3TDvGJuZXI=?= CC: David Airlie , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/8] drm/rockchip: covert to support atomic API References: <1450321275-31154-1-git-send-email-mark.yao@rock-chips.com> <4029109.1DucZWNrFm@diego> In-Reply-To: <4029109.1DucZWNrFm@diego> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9046 Lines: 133 On 2015年12月17日 18:00, Heiko Stübner wrote: > Hi Mark, > > Am Donnerstag, 17. Dezember 2015, 11:01:07 schrieb Mark Yao: >> The series of patches coverting drm rockchip to atomic API, do some >> cleanup and some fixes on atomic side. >> >> TODO: fence is not support on current version. >> >> Tested on rk3288 popmetal board. > In general this works nicely and hdmi is still working on my firefly, so > > Tested-by: Heiko Stuebner Thanks. > > I get one warning though, which seems to be related to fbcon grabbing > the framebuffer it seems. > > > HDMI plugged in on boot: > > [ 4.345329] ------------[ cut here ]------------ > [ 4.345360] WARNING: CPU: 1 PID: 66 at drivers/gpu/drm/drm_atomic_helper.c:682 drm_atomic_helper_update_legacy_modeset_state+0x6c/0x200() > [ 4.345373] Modules linked in: > [ 4.345386] CPU: 1 PID: 66 Comm: kworker/u8:1 Not tainted 4.4.0-rc5+ #2787 > [ 4.345392] Hardware name: Rockchip (Device Tree) > [ 4.345411] Workqueue: deferwq deferred_probe_work_func > [ 4.345438] [] (unwind_backtrace) from [] (show_stack+0x20/0x24) > [ 4.345458] [] (show_stack) from [] (dump_stack+0x84/0xb8) > [ 4.345479] [] (dump_stack) from [] (warn_slowpath_common+0x98/0xc4) > [ 4.345496] [] (warn_slowpath_common) from [] (warn_slowpath_null+0x2c/0x34) > [ 4.345514] [] (warn_slowpath_null) from [] (drm_atomic_helper_update_legacy_modeset_state+0x6c/0x200) > [ 4.345534] [] (drm_atomic_helper_update_legacy_modeset_state) from [] (drm_atomic_helper_commit_modeset_disables+0x1e4/0x35c) > [ 4.345557] [] (drm_atomic_helper_commit_modeset_disables) from [] (rockchip_atomic_commit_complete+0x34/0x108) > [ 4.345576] [] (rockchip_atomic_commit_complete) from [] (rockchip_drm_atomic_commit+0x84/0xa0) > [ 4.345594] [] (rockchip_drm_atomic_commit) from [] (drm_atomic_commit+0x60/0x70) > [ 4.345609] [] (drm_atomic_commit) from [] (restore_fbdev_mode+0x128/0x258) > [ 4.345625] [] (restore_fbdev_mode) from [] (drm_fb_helper_restore_fbdev_mode_unlocked+0x3c/0x80) > [ 4.345640] [] (drm_fb_helper_restore_fbdev_mode_unlocked) from [] (drm_fb_helper_set_par+0x50/0x60) > [ 4.345659] [] (drm_fb_helper_set_par) from [] (fbcon_init+0x328/0x458) > [ 4.345676] [] (fbcon_init) from [] (visual_init+0xc4/0x114) > [ 4.345692] [] (visual_init) from [] (do_bind_con_driver+0x1fc/0x330) > [ 4.345707] [] (do_bind_con_driver) from [] (do_take_over_console+0x174/0x1b4) > [ 4.345722] [] (do_take_over_console) from [] (do_fbcon_takeover+0x68/0xd0) > [ 4.345738] [] (do_fbcon_takeover) from [] (fbcon_event_notify+0x3fc/0x7d8) > [ 4.345756] [] (fbcon_event_notify) from [] (notifier_call_chain+0x58/0x80) > [ 4.345771] [] (notifier_call_chain) from [] (__blocking_notifier_call_chain+0x54/0x6c) > [ 4.345785] [] (__blocking_notifier_call_chain) from [] (blocking_notifier_call_chain+0x28/0x30) > [ 4.345804] [] (blocking_notifier_call_chain) from [] (fb_notifier_call_chain+0x24/0x2c) > [ 4.345822] [] (fb_notifier_call_chain) from [] (register_framebuffer+0x214/0x264) > [ 4.345839] [] (register_framebuffer) from [] (drm_fb_helper_initial_config+0x2dc/0x34c) > [ 4.345856] [] (drm_fb_helper_initial_config) from [] (rockchip_drm_fbdev_init+0x9c/0xe4) > [ 4.345873] [] (rockchip_drm_fbdev_init) from [] (rockchip_drm_load+0x25c/0x2b0) > [ 4.345892] [] (rockchip_drm_load) from [] (drm_dev_register+0x80/0xc4) > [ 4.345910] [] (drm_dev_register) from [] (rockchip_drm_bind+0x58/0x84) > [ 4.345932] [] (rockchip_drm_bind) from [] (try_to_bring_up_master.part.0+0xbc/0x114) > [ 4.345950] [] (try_to_bring_up_master.part.0) from [] (component_add+0xb0/0x118) > [ 4.345967] [] (component_add) from [] (vop_probe+0x40/0x4c) > [ 4.345984] [] (vop_probe) from [] (platform_drv_probe+0x60/0xb0) > [ 4.345999] [] (platform_drv_probe) from [] (driver_probe_device+0x1a0/0x418) > [ 4.346014] [] (driver_probe_device) from [] (__device_attach_driver+0x94/0xa0) > [ 4.346028] [] (__device_attach_driver) from [] (bus_for_each_drv+0x94/0xa4) > [ 4.346042] [] (bus_for_each_drv) from [] (__device_attach+0xa4/0x144) > [ 4.346055] [] (__device_attach) from [] (device_initial_probe+0x1c/0x20) > [ 4.346068] [] (device_initial_probe) from [] (bus_probe_device+0x38/0x94) > [ 4.346082] [] (bus_probe_device) from [] (deferred_probe_work_func+0x8c/0xbc) > [ 4.346098] [] (deferred_probe_work_func) from [] (process_one_work+0x328/0x668) > [ 4.346112] [] (process_one_work) from [] (worker_thread+0x2cc/0x41c) > [ 4.346128] [] (worker_thread) from [] (kthread+0xf4/0x10c) > [ 4.346146] [] (kthread) from [] (ret_from_fork+0x14/0x24) > [ 4.346155] ---[ end trace 8cd78a9f6ee0a57e ]--- > > > Plugging in HDMI after boot: > > [ 20.559534] ------------[ cut here ]------------ > [ 20.564412] WARNING: CPU: 3 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:682 drm_atomic_helper_update_legacy_modeset_state+0x6c/0x200() > [ 20.576991] Modules linked in: > [ 20.580175] CPU: 3 PID: 74 Comm: irq/51-ff980000 Not tainted 4.4.0-rc5+ #2787 > [ 20.587502] Hardware name: Rockchip (Device Tree) > [ 20.592347] [] (unwind_backtrace) from [] (show_stack+0x20/0x24) > [ 20.600319] [] (show_stack) from [] (dump_stack+0x84/0xb8) > [ 20.607776] [] (dump_stack) from [] (warn_slowpath_common+0x98/0xc4) > [ 20.616087] [] (warn_slowpath_common) from [] (warn_slowpath_null+0x2c/0x34) > [ 20.625106] [] (warn_slowpath_null) from [] (drm_atomic_helper_update_legacy_modeset_state+0x6c/0x200) > [ 20.636382] [] (drm_atomic_helper_update_legacy_modeset_state) from [] (drm_atomic_helper_commit_modeset_disables+0x1e4/0x35c) > [ 20.649732] [] (drm_atomic_helper_commit_modeset_disables) from [] (rockchip_atomic_commit_complete+0x34/0x108) > [ 20.661789] [] (rockchip_atomic_commit_complete) from [] (rockchip_drm_atomic_commit+0x84/0xa0) > [ 20.672442] [] (rockchip_drm_atomic_commit) from [] (drm_atomic_commit+0x60/0x70) > [ 20.681711] [] (drm_atomic_commit) from [] (restore_fbdev_mode+0x128/0x258) > [ 20.690418] [] (restore_fbdev_mode) from [] (drm_fb_helper_restore_fbdev_mode_unlocked+0x3c/0x80) > [ 20.701033] [] (drm_fb_helper_restore_fbdev_mode_unlocked) from [] (drm_fb_helper_set_par+0x50/0x60) > [ 20.711907] [] (drm_fb_helper_set_par) from [] (drm_fb_helper_hotplug_event+0xc8/0xe0) > [ 20.721569] [] (drm_fb_helper_hotplug_event) from [] (rockchip_drm_output_poll_changed+0x24/0x28) > [ 20.732185] [] (rockchip_drm_output_poll_changed) from [] (drm_kms_helper_hotplug_event+0x34/0x38) > [ 20.742891] [] (drm_kms_helper_hotplug_event) from [] (drm_helper_hpd_irq_event+0x120/0x150) > [ 20.753078] [] (drm_helper_hpd_irq_event) from [] (dw_hdmi_irq+0x14c/0x18c) > [ 20.761772] [] (dw_hdmi_irq) from [] (irq_thread_fn+0x2c/0x44) > [ 20.769350] [] (irq_thread_fn) from [] (irq_thread+0x118/0x21c) > [ 20.777019] [] (irq_thread) from [] (kthread+0xf4/0x10c) > [ 20.784083] [] (kthread) from [] (ret_from_fork+0x14/0x24) > [ 20.791300] ---[ end trace 3deaa51d288067a0 ]--- > > > > Hi Heiko This issue can be explained from following thread: https://lkml.org/lkml/2015/11/16/498 You can fix it by following changes: @@ -1667,8 +1667,6 @@ static int dw_hdmi_register(struct drm_device *drm, struct dw_hdmi *hdmi) &dw_hdmi_connector_funcs, DRM_MODE_CONNECTOR_HDMIA); - hdmi->connector.encoder = encoder; Thanks. -- Mark Yao -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/