Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1443641lqh; Mon, 6 May 2024 07:57:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWCV321BDmDOy6WFMhB0jd7xtkepV/dk2q9lLJSQ2DmxsJ2EUaqNQsY60zoUuoSWnfX4gAyQx3hSuEcrt9TKogYyXu4vGbTKTxxW/CSJw== X-Google-Smtp-Source: AGHT+IGbyWcqCgkLfBlZ+KzoQcKndXufwvt2fk4ChC0IhSD4FHHb/NLfnEbvO0ITlYi2fbq0BZVF X-Received: by 2002:a05:620a:c4a:b0:790:efc7:9f8f with SMTP id u10-20020a05620a0c4a00b00790efc79f8fmr16141053qki.18.1715007450138; Mon, 06 May 2024 07:57:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715007450; cv=pass; d=google.com; s=arc-20160816; b=iwPKCwB5H/v/l6PhefRCyRZ4FOCsiuHT3K4/1D9iKQlNYMITVlOdtMBoyk8hsxjNHG el+WV/ljhswFDqHA5P/XRikRvHt6XlnP+LdxyG8V2oWGEM/8f6/GaxNegiZaY+06q5cM UoHwqv00IeprA1oJJ5nNRGCHfiNDY3rBshT80yr68Mg5sSsYlFYI7zXXtTaRvfIOvsRd ltW2l5eQuC/YNnW7QZ0kWBq4ckitGfypHB4UmQkSgyXRNfbZK5uU+/71x5veNAW5nano hZ8GLY1anP+1/2UeRobZQKbtO3OBOdiV0nAasR9Q+wNsresJYX/0Mx1FDIsrUK3NINae yZwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=UNOU17a7+9y01wIiMXK3gS5QhQyxMPKDGnxAA5DiTWg=; fh=fFdFdT8H+ZkQefB7FgpKRVSOoobT6MhUlTUMvzFFhR0=; b=gU29KYZuXQqsfiHJUNEEQT3kmFRmgIyb9bIXfNLENGRGjX9rztTKmFngcKjqGrFCFw waS1Y6+Icik5L0qY8k0mYfRR4BBhQL6OUh0lQLJ3HWB7iLbSU7QIaCONJ0JRAMBddr0Q wihfAsZ8MobhPBS1MPnzOwRJBH78YHL4iPZYAhBAwPGGWEw8pxOL2fEAHBOaoQKrQOrX RG6D+TZpLdxRuW80MBofQoiJXetm7LpmqX77/kzrz70CCUGHgpRZNsU4YeMk7xOGD438 +dfX8JlY2BngU09XbQ6uyu9QYJJFgVAMm2LuDsNMZDUDj8KdCmuZEEFqJCJyTbTKVgMS S0ew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=egkMcHdm; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-170029-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170029-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id de21-20020a05620a371500b00792a16a66f5si1003492qkb.542.2024.05.06.07.57.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 07:57:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170029-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=egkMcHdm; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-170029-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170029-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D9B751C2098E for ; Mon, 6 May 2024 14:57:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1347153824; Mon, 6 May 2024 14:57:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="egkMcHdm" Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (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 8E92313CFA5 for ; Mon, 6 May 2024 14:57:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715007444; cv=none; b=f+9hBqKEbA90PGvFSw1peow71fsonsU1TVpsATzNrGCjjqhbb9Vvegp0kJyXo5VsgZ8ncxrvuJJT7EUmfIUYd7z4W1mmv4z33m7UlvdpJjQWcy2EsUBaW5EAKBHtHQOTJVQVFZgf2rUsZxnx75p/ADb/Fu/uwCO1eJGE+umFkEI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715007444; c=relaxed/simple; bh=bsMxhpAz1OKLRRZB0ij9rKv9iZ7OIXUETXCxDufQiwI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qgourAigmua+yoWXEtMRJWtHz/KB4fVX7TKa9+dO+nXdCtD9ci0UjKgrY3CQd/T31uC8aiy5a5BQwgZMfjcIBG6td9RVhAzVPHbCLBigCgQTe8+WjMnfIL6p9PcQudcIzUMDUFelwDUQ0QitvVAuQ+rnGoVKY4xvcuShbuOYPxs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=egkMcHdm; arc=none smtp.client-ip=91.218.175.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: <97811bfe-a1fb-419c-a148-74e3d84aa0e2@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1715007440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UNOU17a7+9y01wIiMXK3gS5QhQyxMPKDGnxAA5DiTWg=; b=egkMcHdmBidVkS8JLCA1vU+/AjS9tHSraXTHXo7UrU+0zJAT3oxkNukxv1Ni4xKqK0j/zg qfUqyw85DMilp4AFoWiSfC8ec1d41ydAwJN2n7R9h9oD+9L20d597GBfZJJ6pS3FyGl0F3 TSGRvYRCyv9jt0SWgqQGDw6Hlaojwok= Date: Mon, 6 May 2024 10:57:17 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [BUG] drm: zynqmp_dp: Lockup in zynqmp_dp_bridge_detect when device is unbound To: Laurent Pinchart , Maxime Ripard Cc: 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 References: <4d8f4c9b-2efb-4774-9a37-2f257f79b2c9@linux.dev> <20240504122118.GB24548@pendragon.ideasonboard.com> <20240506-charcoal-griffin-of-tact-174dde@houat> <20240506073531.GA10260@pendragon.ideasonboard.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sean Anderson In-Reply-To: <20240506073531.GA10260@pendragon.ideasonboard.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 5/6/24 03:35, Laurent Pinchart wrote: > On Mon, May 06, 2024 at 09:29:36AM +0200, Maxime Ripard wrote: >> 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 >> > > >> > > echo fd4a0000.display > /sys/bus/platform/drivers/zynqmp-dpsub/unbind >> > > >> > > 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. >> > > >> > > 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. >> > >> > 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. > > I didn't mean the crash was on purpose :-) It's the registers being > unmapped that is, as nothing should touch those registers after > .remove() returns. OK, so then we need to have some kind of flag in the driver or in the drm subsystem so we know not to access those registers. --Sean