From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20F07C04A95 for ; Tue, 25 Oct 2022 11:36:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230366AbiJYLgO (ORCPT ); Tue, 25 Oct 2022 07:36:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbiJYLgM (ORCPT ); Tue, 25 Oct 2022 07:36:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0903885AAB; Tue, 25 Oct 2022 04:36:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5F01AB81C4E; Tue, 25 Oct 2022 11:36:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67087C433C1; Tue, 25 Oct 2022 11:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666697765; bh=FP+xDQm/fMcpABfdVoP8FT/aX0L5t/2j4/YpFeFO+jI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ElviCW5AQEx3xm+RVwc+kjflXkingkanSmARDUD9ctWYLnX094KxT4frshxSfGZf8 Te/XnFb8OCwwDzpDSgnJy1Nh9ZNKAF62Z2gUvbL7rJpCo7IVxgMhy/6vAECp6SmFVO GJywtdr+AsgWITWncPkCi4aBloJgiMhnceg7x+r8= Date: Tue, 25 Oct 2022 13:36:03 +0200 From: Greg KH To: Thomas Zimmermann Cc: javierm@redhat.com, deller@gmx.de, sashal@kernel.org, stable@vger.kernel.org, Andreas Thalhammer , Thorsten Leemhuis , Zack Rusin , Daniel Vetter , Daniel Vetter , Sam Ravnborg , Alex Deucher , Zhen Lei , Changcheng Deng , Maarten Lankhorst , Maxime Ripard , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH] video/aperture: Call sysfb_disable() before removing PCI devices Message-ID: References: <20221025110453.9404-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221025110453.9404-1-tzimmermann@suse.de> Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org On Tue, Oct 25, 2022 at 01:04:53PM +0200, Thomas Zimmermann wrote: > Call sysfb_disable() from aperture_remove_conflicting_pci_devices() > before removing PCI devices. Without, simpledrm can still bind to > simple-framebuffer devices after the hardware driver has taken over > the hardware. Both drivers interfere with each other and results are > undefined. > > Reported modesetting errors are shown below. > > ---- snap ---- > rcu: INFO: rcu_sched detected expedited stalls on CPUs/tasks: { 13-.... } 7 jiffies s: 165 root: 0x2000/. > rcu: blocking rcu_node structures (internal RCU debug): > Task dump for CPU 13: > task:X state:R running task stack: 0 pid: 4242 ppid: 4228 flags:0x00000008 > Call Trace: > > ? commit_tail+0xd7/0x130 > ? drm_atomic_helper_commit+0x126/0x150 > ? drm_atomic_commit+0xa4/0xe0 > ? drm_plane_get_damage_clips.cold+0x1c/0x1c > ? drm_atomic_helper_dirtyfb+0x19e/0x280 > ? drm_mode_dirtyfb_ioctl+0x10f/0x1e0 > ? drm_mode_getfb2_ioctl+0x2d0/0x2d0 > ? drm_ioctl_kernel+0xc4/0x150 > ? drm_ioctl+0x246/0x3f0 > ? drm_mode_getfb2_ioctl+0x2d0/0x2d0 > ? __x64_sys_ioctl+0x91/0xd0 > ? do_syscall_64+0x60/0xd0 > ? entry_SYSCALL_64_after_hwframe+0x4b/0xb5 > > ... > rcu: INFO: rcu_sched detected expedited stalls on CPUs/tasks: { 13-.... } 30 jiffies s: 169 root: 0x2000/. > rcu: blocking rcu_node structures (internal RCU debug): > Task dump for CPU 13: > task:X state:R running task stack: 0 pid: 4242 ppid: 4228 flags:0x0000400e > Call Trace: > > ? memcpy_toio+0x76/0xc0 > ? memcpy_toio+0x1b/0xc0 > ? drm_fb_memcpy_toio+0x76/0xb0 > ? drm_fb_blit_toio+0x75/0x2b0 > ? simpledrm_simple_display_pipe_update+0x132/0x150 > ? drm_atomic_helper_commit_planes+0xb6/0x230 > ? drm_atomic_helper_commit_tail+0x44/0x80 > ? commit_tail+0xd7/0x130 > ? drm_atomic_helper_commit+0x126/0x150 > ? drm_atomic_commit+0xa4/0xe0 > ? drm_plane_get_damage_clips.cold+0x1c/0x1c > ? drm_atomic_helper_dirtyfb+0x19e/0x280 > ? drm_mode_dirtyfb_ioctl+0x10f/0x1e0 > ? drm_mode_getfb2_ioctl+0x2d0/0x2d0 > ? drm_ioctl_kernel+0xc4/0x150 > ? drm_ioctl+0x246/0x3f0 > ? drm_mode_getfb2_ioctl+0x2d0/0x2d0 > ? __x64_sys_ioctl+0x91/0xd0 > ? do_syscall_64+0x60/0xd0 > ? entry_SYSCALL_64_after_hwframe+0x4b/0xb5 > > > The problem was added by commit 5e0137612430 ("video/aperture: Disable > and unregister sysfb devices via aperture helpers") to v6.0.3 and does > not exist in the mainline branch. Why isn't this a problem in Linus's tree? What commits there cause this to not be an issue and why can't we just take them instead? thanks, greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0A6EC38A2D for ; Tue, 25 Oct 2022 11:36:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 40B7C10E1BA; Tue, 25 Oct 2022 11:36:14 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0357210E1FF for ; Tue, 25 Oct 2022 11:36:08 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 35B11B81CF4; Tue, 25 Oct 2022 11:36:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67087C433C1; Tue, 25 Oct 2022 11:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666697765; bh=FP+xDQm/fMcpABfdVoP8FT/aX0L5t/2j4/YpFeFO+jI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ElviCW5AQEx3xm+RVwc+kjflXkingkanSmARDUD9ctWYLnX094KxT4frshxSfGZf8 Te/XnFb8OCwwDzpDSgnJy1Nh9ZNKAF62Z2gUvbL7rJpCo7IVxgMhy/6vAECp6SmFVO GJywtdr+AsgWITWncPkCi4aBloJgiMhnceg7x+r8= Date: Tue, 25 Oct 2022 13:36:03 +0200 From: Greg KH To: Thomas Zimmermann Subject: Re: [PATCH] video/aperture: Call sysfb_disable() before removing PCI devices Message-ID: References: <20221025110453.9404-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221025110453.9404-1-tzimmermann@suse.de> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sashal@kernel.org, linux-fbdev@vger.kernel.org, Andreas Thalhammer , dri-devel@lists.freedesktop.org, Daniel Vetter , deller@gmx.de, javierm@redhat.com, stable@vger.kernel.org, Changcheng Deng , Thorsten Leemhuis , Zhen Lei , Alex Deucher , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Oct 25, 2022 at 01:04:53PM +0200, Thomas Zimmermann wrote: > Call sysfb_disable() from aperture_remove_conflicting_pci_devices() > before removing PCI devices. Without, simpledrm can still bind to > simple-framebuffer devices after the hardware driver has taken over > the hardware. Both drivers interfere with each other and results are > undefined. > > Reported modesetting errors are shown below. > > ---- snap ---- > rcu: INFO: rcu_sched detected expedited stalls on CPUs/tasks: { 13-.... } 7 jiffies s: 165 root: 0x2000/. > rcu: blocking rcu_node structures (internal RCU debug): > Task dump for CPU 13: > task:X state:R running task stack: 0 pid: 4242 ppid: 4228 flags:0x00000008 > Call Trace: > > ? commit_tail+0xd7/0x130 > ? drm_atomic_helper_commit+0x126/0x150 > ? drm_atomic_commit+0xa4/0xe0 > ? drm_plane_get_damage_clips.cold+0x1c/0x1c > ? drm_atomic_helper_dirtyfb+0x19e/0x280 > ? drm_mode_dirtyfb_ioctl+0x10f/0x1e0 > ? drm_mode_getfb2_ioctl+0x2d0/0x2d0 > ? drm_ioctl_kernel+0xc4/0x150 > ? drm_ioctl+0x246/0x3f0 > ? drm_mode_getfb2_ioctl+0x2d0/0x2d0 > ? __x64_sys_ioctl+0x91/0xd0 > ? do_syscall_64+0x60/0xd0 > ? entry_SYSCALL_64_after_hwframe+0x4b/0xb5 > > ... > rcu: INFO: rcu_sched detected expedited stalls on CPUs/tasks: { 13-.... } 30 jiffies s: 169 root: 0x2000/. > rcu: blocking rcu_node structures (internal RCU debug): > Task dump for CPU 13: > task:X state:R running task stack: 0 pid: 4242 ppid: 4228 flags:0x0000400e > Call Trace: > > ? memcpy_toio+0x76/0xc0 > ? memcpy_toio+0x1b/0xc0 > ? drm_fb_memcpy_toio+0x76/0xb0 > ? drm_fb_blit_toio+0x75/0x2b0 > ? simpledrm_simple_display_pipe_update+0x132/0x150 > ? drm_atomic_helper_commit_planes+0xb6/0x230 > ? drm_atomic_helper_commit_tail+0x44/0x80 > ? commit_tail+0xd7/0x130 > ? drm_atomic_helper_commit+0x126/0x150 > ? drm_atomic_commit+0xa4/0xe0 > ? drm_plane_get_damage_clips.cold+0x1c/0x1c > ? drm_atomic_helper_dirtyfb+0x19e/0x280 > ? drm_mode_dirtyfb_ioctl+0x10f/0x1e0 > ? drm_mode_getfb2_ioctl+0x2d0/0x2d0 > ? drm_ioctl_kernel+0xc4/0x150 > ? drm_ioctl+0x246/0x3f0 > ? drm_mode_getfb2_ioctl+0x2d0/0x2d0 > ? __x64_sys_ioctl+0x91/0xd0 > ? do_syscall_64+0x60/0xd0 > ? entry_SYSCALL_64_after_hwframe+0x4b/0xb5 > > > The problem was added by commit 5e0137612430 ("video/aperture: Disable > and unregister sysfb devices via aperture helpers") to v6.0.3 and does > not exist in the mainline branch. Why isn't this a problem in Linus's tree? What commits there cause this to not be an issue and why can't we just take them instead? thanks, greg k-h