From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752412AbdARJ7T (ORCPT ); Wed, 18 Jan 2017 04:59:19 -0500 Received: from regular1.263xmail.com ([211.150.99.132]:47871 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751405AbdARJ7G (ORCPT ); Wed, 18 Jan 2017 04:59:06 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-RL-SENDER: randy.li@rock-chips.com X-FST-TO: ayaka@soulik.info X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: randy.li@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: drm: rockchip: CONFIG_DRM_FBDEV_EMULATION will crash the HDMI down sometimes To: Mark yao References: <587DD4E3.5070202@rock-chips.com> Cc: airlied@linux.ie, heiko@sntech.de, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, "ayaka@soulik.info" From: Randy Li Organization: Fuzhou Rockchip Message-ID: Date: Wed, 18 Jan 2017 17:58:37 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <587DD4E3.5070202@rock-chips.com> 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 On 01/17/2017 04:25 PM, Mark yao wrote: > > static void vop_plane_atomic_update(struct drm_plane *plane, > struct drm_plane_state *old_state) > { > if (WARN_ON(!vop->is_enabled)) > return; > > The issues seems vop is not enable. but commit planes is using > DRM_PLANE_COMMIT_ACTIVE_ONLY... > > Hi Randy > > Can you add some print for this bug: > 1, I think vop_crtc_enable function should be call before > vop_plane_atomic_update, you can add some print to verified it. Not hint > 2, also add a trace on vop_crtc_disable. Not hint > 3, print the status of crtc->state->active and > plane_crtc_active(plane->state) when bug happen. hint [ 11.481977] vop active 1, state 1 The full log is attached here [ 10.887294] rockchip-drm display-subsystem: bound ff940000.vop (ops vop_component_ops [rockchipdrm]) [ OK ] Started Initialize hardware monitoring sensors. [ 10.898567] rockchip-drm display-subsystem: bound ff930000.vop (ops vop_component_ops [rockchipdrm]) [ 10.912280] dwhdmi-rockchip ff980000.hdmi: Detected HDMI controller 0x20:0xa:0xa0:0xc1 [ 10.921423] rockchip-drm display-subsystem: bound ff980000.hdmi (ops dw_hdmi_rockchip_ops [dw_hdmi_rockchip]) [ 10.931413] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 10.938090] [drm] No driver support for vblank timestamp query. [ 11.002102] rockchip-drm display-subsystem: fb0: frame buffer device [ 11.031833] [drm] Initialized rockchip 1.0.0 20140818 for display-subsystem on minor 0 [ OK ] Started Login Service. [ OK ] Created slice system-systemd\x2dbacklight.slice. Starting Load/Save Screen Backlight...htness of backlight:backlight... [ 11.128697] rk_iommu ff940300.iommu: FORCE_RESET command timed out [ 11.134928] rockchip-vop ff940000.vop: failed to attach dma mapping, -110 [ 11.141805] rockchip-vop ff940000.vop: [drm:vop_crtc_enable] *ERROR* Failed to enable vop (-110) [ OK ] Started Load/Save Screen Backlight Brightness of backlight:backlight. [ 11.181850] ------------[ cut here ]------------ [ 11.186568] WARNING: CPU: 3 PID: 167 at /home/ayaka/workspace/rk3288/kernel/linux-kernel/drivers/gpu/drm/rockchip/rockchip_drm$ vop.c:731 vop_plane_atomic_update+0x94/0x17a8 [rockchipdrm] [ 11.203254] Modules linked in: rockchip_vop_reg dw_hdmi_rockchip dw_hdmi rockchipdrm drm_kms_helper mali_kbase cfbfillrect sys$ opyarea rk_crypto gpio_ir_recv cfbimgblt panel_simple sysfillrect rc_core sysimgblt nvmem_rockchip_efuse fb_sys_fops cfbcopyarea $ rm des_generic dwc2 pwm_rockchip phy_rockchip_usb udc_core fb pwm_bl backlight [ 11.233011] CPU: 3 PID: 167 Comm: kworker/3:2 Not tainted 4.10.0-rc3-next-20170111+ #149 [ 11.241105] Hardware name: Rockchip (Device Tree) [ 11.245898] Workqueue: events output_poll_execute [drm_kms_helper] [ 11.252129] [] (unwind_backtrace) from [] (show_stack+0x20/0x24) [ 11.259896] [] (show_stack) from [] (dump_stack+0x8c/0xa0) [ 11.267137] [] (dump_stack) from [] (__warn+0xf8/0x110) [ 11.274119] [] (__warn) from [] (warn_slowpath_null+0x30/0x38) [ 11.281724] [] (warn_slowpath_null) from [] (vop_plane_atomic_update+0x94/0x17a8 [rockchipdrm]) [ 11.292283] [] (vop_plane_atomic_update [rockchipdrm]) from [] (drm_atomic_helper_commit_planes+0xd4/0x2b8 [drm_kms_helper]) [ 11.305337] [] (drm_atomic_helper_commit_planes [drm_kms_helper]) from [] (rockchip_atomic_commit_tail+0x44 /0x68 [rockchipdrm]) [ 11.318643] [] (rockchip_atomic_commit_tail [rockchipdrm]) from [] (commit_tail+0x50/0xb8 [drm_kms_helper]) [ 11.330262] [] (commit_tail [drm_kms_helper]) from [] (drm_atomic_helper_commit+0xd4/0x13c [drm_kms_helper] ) [ 11.342071] [] (drm_atomic_helper_commit [drm_kms_helper]) from [] (drm_atomic_commit+0x5c/0x68 [drm]) [ 11.353363] [] (drm_atomic_commit [drm]) from [] (restore_fbdev_mode+0x160/0x300 [drm_kms_helper]) [ 11.364207] [] (restore_fbdev_mode [drm_kms_helper]) from [] (drm_fb_helper_restore_fbdev_mode_unlocked+0x4 0/0x84 [drm_kms_helper]) [ 11.377916] [] (drm_fb_helper_restore_fbdev_mode_unlocked [drm_kms_helper]) from [] (drm_fb_helper_set_par+ 0x40/0x70 [drm_kms_helper]) [ 11.391942] [] (drm_fb_helper_set_par [drm_kms_helper]) from [] (drm_fb_helper_hotplug_event+0xb4/0xbc [drm _kms_helper]) [ 11.404652] [] (drm_fb_helper_hotplug_event [drm_kms_helper]) from [] (rockchip_drm_output_poll_changed+0x2 4/0x28 [rockchipdrm]) [ 11.418047] [] (rockchip_drm_output_poll_changed [rockchipdrm]) from [] (drm_kms_helper_hotplug_event+0x34$ 0x38 [drm_kms_helper]) [ 11.431573] [] (drm_kms_helper_hotplug_event [drm_kms_helper]) from [] (output_poll_execute+0xbc/0x1f4 [dr$ _kms_helper]) [ 11.444286] [] (output_poll_execute [drm_kms_helper]) from [] (process_one_work+0x1b0/0x4c0) [ 11.454476] [] (process_one_work) from [] (worker_thread+0x60/0x548) [ 11.462581] [] (worker_thread) from [] (kthread+0x128/0x158) [ 11.469994] [] (kthread) from [] (ret_from_fork+0x14/0x24) [ 11.477309] ---[ end trace 92447684af807ac2 ]--- [ 11.481977] vop active 1, state 1 [ 11.481985] ------------[ cut here ]------------ [ 11.482021] WARNING: CPU: 3 PID: 167 at /home/ayaka/workspace/rk3288/kernel/linux-kernel/drivers/gpu/drm/rockchip/rockchip_drm_ vop.c:1023 vop_crtc_atomic_flush+0x27c/0x2b8 [rockchipdrm] [ 11.482030] Modules linked in: rockchip_vop_reg dw_hdmi_rockchip dw_hdmi rockchipdrm drm_kms_helper mali_kbase cfbfillrect sysc opyarea rk_crypto gpio_ir_recv cfbimgblt panel_simple sysfillrect rc_core sysimgblt nvmem_rockchip_efuse fb_sys_fops cfbcopyarea d rm des_generic dwc2 pwm_rockchip phy_rockchip_usb udc_core fb pwm_bl backlight [ 11.482119] CPU: 3 PID: 167 Comm: kworker/3:2 Tainted: G W 4.10.0-rc3-next-20170111+ #149 [ 11.482122] Hardware name: Rockchip (Device Tree) [ 11.482200] Workqueue: events output_poll_execute [drm_kms_helper] [ 11.482227] [] (unwind_backtrace) from [] (show_stack+0x20/0x24) [ 11.482242] [] (show_stack) from [] (dump_stack+0x8c/0xa0) [ 11.482259] [] (dump_stack) from [] (__warn+0xf8/0x110) [ 11.482275] [] (__warn) from [] (warn_slowpath_null+0x30/0x38) [ 11.482308] [] (warn_slowpath_null) from [] (vop_crtc_atomic_flush+0x27c/0x2b8 [rockchipdrm]) [ 11.482416] [] (vop_crtc_atomic_flush [rockchipdrm]) from [] (drm_atomic_helper_commit_planes+0x1d0/0x2b8 [ drm_kms_helper]) [ 11.482522] [] (drm_atomic_helper_commit_planes [drm_kms_helper]) from [] (rockchip_atomic_commit_tail+0x44 /0x68 [rockchipdrm]) [ 11.482623] [] (rockchip_atomic_commit_tail [rockchipdrm]) from [] (commit_tail+0x50/0xb8 [drm_kms_helper]) [ 11.482779] [] (commit_tail [drm_kms_helper]) from [] (drm_atomic_helper_commit+0xd4/0x13c [drm_kms_helper] ) [ 11.483024] [] (drm_atomic_helper_commit [drm_kms_helper]) from [] (drm_atomic_commit+0x5c/0x68 [drm]) [ 11.483270] [] (drm_atomic_commit [drm]) from [] (restore_fbdev_mode+0x160/0x300 [drm_kms_helper]) [ 11.483422] [] (restore_fbdev_mode [drm_kms_helper]) from [] (drm_fb_helper_restore_fbdev_mode_unlocked+0x4 0/0x84 [drm_kms_helper]) [ 11.483569] [] (drm_fb_helper_restore_fbdev_mode_unlocked [drm_kms_helper]) from [] (drm_fb_helper_set_par+ 0x40/0x70 [drm_kms_helper]) [ 11.483715] [] (drm_fb_helper_set_par [drm_kms_helper]) from [] (drm_fb_helper_hotplug_event+0xb4/0xbc [drm _kms_helper]) [ 11.483821] [] (drm_fb_helper_hotplug_event [drm_kms_helper]) from [] (rockchip_drm_output_poll_changed+0x2 4/0x28 [rockchipdrm]) > > Thanks. > On 2017年01月17日 15:58, Randy Li wrote: >> Hello: >> I want to enable the video output at RK3288 Firefly board, but I >> found if I enable CONFIG_DRM_FBDEV_EMULATION, the HDMI would crash >> down sometimes but sometimes it works. After disable that opinion, I >> never meet a problem. I have not verified it with eDP as I meet a big >> problem in there. >>[..] >> [ 34.464856] ---[ end trace 95ed2c3f167607d5 ]--- > > -- Randy Li