Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp251490rdb; Sat, 17 Feb 2024 07:03:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWDQ9T4oqmfOBohzEGukQA1vAZaNq/c2IBk941WR/qOUTtx40wZgoVY2UF6Q+cD/alZV1BrZaPwaijmTmaTHItCDdZ0IrAmlTiSsWuogQ== X-Google-Smtp-Source: AGHT+IEqpQ8KOsh7kdU2wxX5N/aTyxTCQz6acTuBL4omGLsgFDuXoK+/iye86TS17Fv1f9vwC6jh X-Received: by 2002:a05:6a20:8154:b0:19c:a54e:fd4c with SMTP id u20-20020a056a20815400b0019ca54efd4cmr5480175pza.61.1708182213942; Sat, 17 Feb 2024 07:03:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708182213; cv=pass; d=google.com; s=arc-20160816; b=l7zexkwKU5B3v+AfWDBdciYaAj8rrHXTOWbB+YhDgJecfVWolw5U87sHWtHJ+jrNU1 e/SUMoc6sortcXN6ua63QWLepVBtfKBESKC6gj4YHNfSlEAvD1w+WdTQVj9JBgUo63sJ 8xEgPfceQ81CnZ/+536ihdwZujVgj7C4boeU1bXJ1SEL6mZKPA/G/86Kz82gTpXgf9xq +UCZodihlZHrLvorF5CXsUMcl5nPM8SxL1L1uarO8sul2C/AokZkLUFbAnFD4rCJICv1 WJHOZT4Ynn0uoTqFXRAvmpMtUjBiC9v5Tg7Fe8njtgwXtk20duDZGLNwfC9QrmO7yrDD iTkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=z69Rhf9uLG6lQp8geYioLuuBMWCGb7wvfX9FMct4Llw=; fh=pcX3nLBLzYPdmuawBHbOhWNtQQD3frRXqpw6hcDvZ+Y=; b=XiYHMn0C0GgjHRamMBNa3g9hnrXnr2A9xoKFSATty109xG23oSejH/ALE3CQgBm2kq lZAcgeQBwp54y3juLMYz4sNCgx7DrLUdQ3Wx46N++Pl4+tseZ/K3/CvTSE16pYyJbHAn 7K+StPpux4KJXpd+JU+x2zoszsOsogpNP1o5VkdMN38Cg3fcgSyogmbgVrL2I1NTuzWy obcwZgOaC/8eXIGrzjJAmGwJGdrVzElv+BC1ldW8jTVxy0aHAtKiCPRzVsGsoabd+Ubk WV8E6YnZXdbJ7X77eEp2U8c7gdui2W75sx3i9fpNaAlYMFsloLWQcpY211vzbod3/nXk Ij9w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sk6Bj7qn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69923-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69923-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m23-20020a637117000000b005df59056fd8si1253856pgc.517.2024.02.17.07.03.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 07:03:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69923-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sk6Bj7qn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69923-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69923-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9ACD9283092 for ; Sat, 17 Feb 2024 15:03:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B8B77CF1B; Sat, 17 Feb 2024 15:03:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Sk6Bj7qn" 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 6C6007C08E; Sat, 17 Feb 2024 15:03:03 +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=1708182183; cv=none; b=JU57P2otv88wpG0anqGD98QrMYy4L/dnPH8HFcT/QJH/X5sK2X4P31+JHOgz0C+zi6Jf4RASftAFDkYMpZcq1IhpdU4zTzdCyUu8MEtNHXTvnqPABHv/t494jykRq/dTVqJ738cIHHapHUmqP/dKUd+psHKGwaonXOX0K95VNAk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708182183; c=relaxed/simple; bh=RYGrgArfEQO1hz4ZDJrYc151D2jwcPj4HsJMgduGqdg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mYv9kfB8L01xHeU3zwudfIoqbxqUbp2tt1h1kS8CickFQ2XLX/eEe7VD27/sz39tRTujZNEy4HoaasQnBB8VBZD/ZsE/5nktswTLusHFt7iRWPlYd4D7prNcZnT+6UP57ltIJC4iSKDXMjFpsCKmgzFluzd+DOr6AH6onp8kgPc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Sk6Bj7qn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FF3FC43399; Sat, 17 Feb 2024 15:03:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708182183; bh=RYGrgArfEQO1hz4ZDJrYc151D2jwcPj4HsJMgduGqdg=; h=From:To:Cc:Subject:Date:From; b=Sk6Bj7qnkUtxpPu7r0OWOEKX33/NEitQ5TtRnYdKJx+5sZ2r+IdHyM4505BXrMdz7 GQebIt2mgAB3H+iuiVvivn25osbNIPGGdUUA6Sy7we/HmOoNHmvZ29aY/D1v/3OXKD P0bwBYQVv0Ddw4ZaTUT+gKpRcQrYUqIJMifT/Fi8HGaiNqwKjJbCouYHnoGUUkhJwI Bbf7tsUiicb0WSQafeUfOO4SvhcBn4jAy7CpR1tGSBqOarXQ+/gZF8xYjmsOgZNnzD AqUCkvJtcEa+vQ7aB1sdYH+ZhJa3h5ARzbrw4zE8XlUbS07GjIwzvSopeuJnp/v7Nw PeCQwYiphYhEw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rbMDW-000000001Vm-1iMa; Sat, 17 Feb 2024 16:03:02 +0100 From: Johan Hovold To: Bjorn Andersson , Andrzej Hajda , Neil Armstrong , Robert Foss , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Vinod Koul Cc: Jonas Karlman , Laurent Pinchart , Jernej Skrabec , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Rob Clark , Abhinav Kumar , Kuogee Hsieh , freedreno@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold Subject: [PATCH 0/6] soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free Date: Sat, 17 Feb 2024 16:02:22 +0100 Message-ID: <20240217150228.5788-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Starting with 6.8-rc1 the internal display sometimes fails to come up on machines like the Lenovo ThinkPad X13s and the logs indicate that this is due to a regression in the DRM subsystem [1]. This series fixes a race in the pmic_glink_altmode driver which was exposed / triggered by the transparent DRM bridges rework that went into 6.8-rc1 and that manifested itself as a bridge failing to attach and sometimes triggering a NULL-pointer dereference. The intermittent hard resets that have also been reported since 6.8-rc1 unfortunately still remains and suggests that we are dealing with two separate regressions. There is some indication that also the hard resets (e.g. due to register accesses to unclocked hardware) are also due to changes in the DRM subsystem as it happens around the time that the eDP panel and display controller would be initialised during boot (the runtime PM rework?). This remains to be verified, however. Included is also a fix for a related OF node reference leak in the aux-hpd driver found through inspection when reworking the driver. The use-after-free bug is triggered by a probe deferral and highlighted some further bugs in the involved drivers, which were registering child devices before deferring probe. This behaviour is not correct and can both trigger probe deferral loops and potentially also further issues with the DRM bridge implementation. This series can either go through the Qualcomm SoC tree (pmic_glink) or the DRM tree. The PHY patches do not depend on the rest of the series and could possibly be merged separately through the PHY tree. Whichever gets this to mainline the fastest. Johan [1] https://lore.kernel.org/lkml/ZctVmLK4zTwcpW3A@hovoldconsulting.com/ Johan Hovold (5): drm/bridge: aux-hpd: fix OF node leaks drm/bridge: aux-hpd: separate allocation and registration soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free phy: qcom-qmp-combo: fix drm bridge registration phy: qcom-qmp-combo: fix type-c switch registration Rob Clark (1): soc: qcom: pmic_glink: Fix boot when QRTR=m drivers/gpu/drm/bridge/aux-hpd-bridge.c | 70 ++++++++++++++++++----- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 16 +++--- drivers/soc/qcom/pmic_glink.c | 21 +++---- drivers/soc/qcom/pmic_glink_altmode.c | 16 +++++- include/drm/bridge/aux-bridge.h | 15 +++++ 5 files changed, 102 insertions(+), 36 deletions(-) -- 2.43.0