From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF7FD3E462 for ; Mon, 6 May 2024 07:29:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714980579; cv=none; b=nTfqhNBjfUfMSoNBbfqN4iwOTrpaf4UG7A604kXtTQgR1nQkuvIUr5AuFxUa7Hfpm6sucnfEQNLAX3dkiXYj4F3qiDZ+leWtGBOx1u6zeSeOIe5fKKnb0kxIWraDbSUEYrTMPCFDwrDm07SHIgChIro4KX+VCkuHpnnMebr7nuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714980579; c=relaxed/simple; bh=6EAfDReBTGm2/618iI3K5J9zc5rNJX39dIPTNS7/tC8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VESx3Yjxe/HYwFnvCGJvBhhkNCBcbRqdE9vpBIP+mEMxmWHVfMdXtflFBaI51n4TG62vXmLQq8Xenuw1dsO0Upz6HeDnpvecDcB9sXuksFKAFQZnFRXDbGNxfKZh0ZZZtZabs6vuLIw1p/7auC08Fi1pB5A3p57ii3Hgf2/oBDw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LTT6vfcv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LTT6vfcv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEDF3C116B1; Mon, 6 May 2024 07:29:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714980579; bh=6EAfDReBTGm2/618iI3K5J9zc5rNJX39dIPTNS7/tC8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LTT6vfcvkv+HM+jrI2Ok6j4+eJlWYmbJn2/gUqM4HBexny+ZPOtF3kTZ7bla4jK9f NoyyXaR6xdUl7F8hPvO63U5xyg28jtKJmAORVdzwL5lYHrGBu5t8bAKih3aAu9frYI 0gDlAz9fp8Bzc09RCv/Ei4+F3oPBKcXU4JeOlMaEnfmFfinRMiw3YLVp8/AiFYjxAz jUL+BuUNplEfy/8S6WKjIylgkGqdkwPqRHI283ob1XYdgBdcnOfA021042v77EAdx0 B5iXaAm0LRAjr+PqEszgHpTWuE3BfKRgRKHYmLvj31BMeqgUK5eE333c/+lxQmYSP2 pGJHumzUzEY5w== Date: Mon, 6 May 2024 09:29:36 +0200 From: Maxime Ripard To: Laurent Pinchart Cc: Sean Anderson , Tomi Valkeinen , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Michal Simek , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [BUG] drm: zynqmp_dp: Lockup in zynqmp_dp_bridge_detect when device is unbound Message-ID: <20240506-charcoal-griffin-of-tact-174dde@houat> References: <4d8f4c9b-2efb-4774-9a37-2f257f79b2c9@linux.dev> <20240504122118.GB24548@pendragon.ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha384; protocol="application/pgp-signature"; boundary="ocucrrp6xgvwroku" Content-Disposition: inline In-Reply-To: <20240504122118.GB24548@pendragon.ideasonboard.com> --ocucrrp6xgvwroku Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Laurent, Sean, On Sat, May 04, 2024 at 03:21:18PM GMT, Laurent Pinchart wrote: > On Fri, May 03, 2024 at 05:54:32PM -0400, Sean Anderson wrote: > > I have discovered a bug in the displayport driver on drm-misc-next. To > > trigger it, run > >=20 > > echo fd4a0000.display > /sys/bus/platform/drivers/zynqmp-dpsub/unbind > >=20 > > The system will become unresponsive and (after a bit) splat with a hard > > LOCKUP. One core will be unresponsive at the first zynqmp_dp_read in > > zynqmp_dp_bridge_detect. > >=20 > > I believe the issue is due the registers being unmapped and the block > > put into reset in zynqmp_dp_remove instead of zynqmp_dpsub_release. >=20 > That is on purpose. Drivers are not allowed to access the device at all > after .remove() returns. It's not "on purpose" no. Drivers indeed are not allowed to access the device after remove, but the kernel shouldn't crash. This is exactly why we have drm_dev_enter / drm_dev_exit. Maxime --ocucrrp6xgvwroku Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCZjiG4AAKCRAnX84Zoj2+ dgeOAX9MWR6b74vbLNz7k9jf5IToCNO+03AZ7DaUKMEY6avOZ4UMCs5HJXcFnAR+ /TeAmFIBgJyNn/OtniP2Hp5Bfq8TvJKZl8ZZ6WzuVaWny/ME4+2poozKoG2ZNm0K 70BmtsE9YA== =rd0O -----END PGP SIGNATURE----- --ocucrrp6xgvwroku-- 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 86DE8C4345F for ; Mon, 6 May 2024 07:29:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VcgoB6/8fOqgqwYbeGaTsr8QR4M7ygZREVxuU0GLQG8=; b=Hf86p/AFH8wNchxwG5nkYmyNfe ylICXpARNbkxgFOnWasrLUw1mOcsMAq6j6xrhv5irdg+csBFAZw8DoQZphVVYQSpgIuyDnsnWNmLV j8NUlJAnB78OjuZcwQhRhcudEKS/G98P6iKPY225jtqAPytVfBbqqtmPlS1CD9YU+1y72bVL0CFdm 4qTCJKTS9uOZbX7dyGpL/+l6s9PNm9rHDD+hsbtUdaxBc7wjMDPK8PeW4SoUm5Sg2kWsXK+3XopE+ QAPU383rPmFx+4zdaB3Bbi5Zb9f7fMaSAg9lC0i+jqh5SVjHKLf9pYWPPol2zV37a+dkhrsbPOdwr h+9LZqcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3sn9-00000006SWb-2NSB; Mon, 06 May 2024 07:29:43 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3sn6-00000006SVj-3Ivd for linux-arm-kernel@lists.infradead.org; Mon, 06 May 2024 07:29:42 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 98ECA60F73; Mon, 6 May 2024 07:29:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEDF3C116B1; Mon, 6 May 2024 07:29:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714980579; bh=6EAfDReBTGm2/618iI3K5J9zc5rNJX39dIPTNS7/tC8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LTT6vfcvkv+HM+jrI2Ok6j4+eJlWYmbJn2/gUqM4HBexny+ZPOtF3kTZ7bla4jK9f NoyyXaR6xdUl7F8hPvO63U5xyg28jtKJmAORVdzwL5lYHrGBu5t8bAKih3aAu9frYI 0gDlAz9fp8Bzc09RCv/Ei4+F3oPBKcXU4JeOlMaEnfmFfinRMiw3YLVp8/AiFYjxAz jUL+BuUNplEfy/8S6WKjIylgkGqdkwPqRHI283ob1XYdgBdcnOfA021042v77EAdx0 B5iXaAm0LRAjr+PqEszgHpTWuE3BfKRgRKHYmLvj31BMeqgUK5eE333c/+lxQmYSP2 pGJHumzUzEY5w== Date: Mon, 6 May 2024 09:29:36 +0200 From: Maxime Ripard To: Laurent Pinchart Cc: Sean Anderson , Tomi Valkeinen , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Michal Simek , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [BUG] drm: zynqmp_dp: Lockup in zynqmp_dp_bridge_detect when device is unbound Message-ID: <20240506-charcoal-griffin-of-tact-174dde@houat> References: <4d8f4c9b-2efb-4774-9a37-2f257f79b2c9@linux.dev> <20240504122118.GB24548@pendragon.ideasonboard.com> MIME-Version: 1.0 In-Reply-To: <20240504122118.GB24548@pendragon.ideasonboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_002941_001572_381C5307 X-CRM114-Status: GOOD ( 17.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5483439988815680415==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5483439988815680415== Content-Type: multipart/signed; micalg=pgp-sha384; protocol="application/pgp-signature"; boundary="ocucrrp6xgvwroku" Content-Disposition: inline --ocucrrp6xgvwroku Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Laurent, Sean, On Sat, May 04, 2024 at 03:21:18PM GMT, Laurent Pinchart wrote: > On Fri, May 03, 2024 at 05:54:32PM -0400, Sean Anderson wrote: > > I have discovered a bug in the displayport driver on drm-misc-next. To > > trigger it, run > >=20 > > echo fd4a0000.display > /sys/bus/platform/drivers/zynqmp-dpsub/unbind > >=20 > > The system will become unresponsive and (after a bit) splat with a hard > > LOCKUP. One core will be unresponsive at the first zynqmp_dp_read in > > zynqmp_dp_bridge_detect. > >=20 > > I believe the issue is due the registers being unmapped and the block > > put into reset in zynqmp_dp_remove instead of zynqmp_dpsub_release. >=20 > That is on purpose. Drivers are not allowed to access the device at all > after .remove() returns. It's not "on purpose" no. Drivers indeed are not allowed to access the device after remove, but the kernel shouldn't crash. This is exactly why we have drm_dev_enter / drm_dev_exit. Maxime --ocucrrp6xgvwroku Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCZjiG4AAKCRAnX84Zoj2+ dgeOAX9MWR6b74vbLNz7k9jf5IToCNO+03AZ7DaUKMEY6avOZ4UMCs5HJXcFnAR+ /TeAmFIBgJyNn/OtniP2Hp5Bfq8TvJKZl8ZZ6WzuVaWny/ME4+2poozKoG2ZNm0K 70BmtsE9YA== =rd0O -----END PGP SIGNATURE----- --ocucrrp6xgvwroku-- --===============5483439988815680415== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============5483439988815680415==--