Message ID | 20231121142938.460846-1-nfraprado@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp661960vqb; Tue, 21 Nov 2023 06:31:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4iARsnX3Lx8MwzBmtvNpMX8iFVxT/oz3naotnozItp8qwHRFQH4vJ0CFOi/zIi5QP17gI X-Received: by 2002:a05:6808:1b1f:b0:3b6:d108:1ff3 with SMTP id bx31-20020a0568081b1f00b003b6d1081ff3mr13570305oib.2.1700577064205; Tue, 21 Nov 2023 06:31:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700577064; cv=none; d=google.com; s=arc-20160816; b=07ZWzYVCo53COLbXXKb3GDKYsmkVImHnzs1Kp2DSMGI2q0zfFjpNTgIy8E2pdNpQ/E A2d6Vw8huPM56qeVratsgHWYd35c5nXfwN0JvUAzQ87SZhBRodVbaKUh0S1dEr3O0A3/ poj778YJb+PAEY6blGTDXF+ePkNReixewVwnB7fszk1TlMpD90RuBWa6MEQ80JQfAzu1 pcqPtKHYlkvk0OLKBtUE4/rxXNyF0+yRCRs31CEqSAcWhWKQblw/CoFw9Fn0bES9JX9D heuiVGOq9lp21vA+3Qqwx4vo6Cleb8kc60v3Rg7A9pgLiRGWtWnKyyvAdw/vDLMeNM/W K5SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WD+y8UpKx573VJEZ8+G7XE2AV/E+oVuJPz4arOuLc2w=; fh=ZkpS+2ARzpPJmrGjWfHBqz21a/Kk0PUxoJzNL9vfJkY=; b=fQ2gECqQoqBPexYbsAFmfZN9M4vL9DAdfY6onX+0auuHt6NqrgAeg8zEEGzx16sGov /ok4Gn3o6+nQOP7gxwnB1vc0mp5PlOMRBJesSLPYKPcNiBDrLi02ZV3TRgHM8VRLl36I r4qTWkweSeHTibc6LiMEwbD/7xfRIU8tAhswHAl29L4dUCItGa4no3Kh6d6ntUVJb8lS i0iMXljbCZP3KXXA9aqUXXrxIGV3NzyQm55+PDtcIibGXO66qEniK5HPNvcgisJpRx2B 3Tsy+eCVQbQ067rruPT+gJi50yLIpMtvnQ1BrplOklWdwpJBHgWim1rKR7+Msg1hRoDn H+Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=jvN8W1ew; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id j187-20020a638bc4000000b00578db6172fdsi10409589pge.325.2023.11.21.06.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 06:31:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=jvN8W1ew; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 20EBE812DBEE; Tue, 21 Nov 2023 06:30:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234288AbjKUO3x (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Tue, 21 Nov 2023 09:29:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231210AbjKUO3v (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 21 Nov 2023 09:29:51 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DAF694 for <linux-kernel@vger.kernel.org>; Tue, 21 Nov 2023 06:29:47 -0800 (PST) Received: from notapiano.myfiosgateway.com (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id A4BE76607314; Tue, 21 Nov 2023 14:29:42 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1700576986; bh=5REf8+1qSAKeSFYSM/vLqpdzS7hrFNmkWP0nRiEB5h8=; h=From:To:Cc:Subject:Date:From; b=jvN8W1ew3AdczFCVEQhQUsivssXtNz+fUumVKei73te07h7RAbtR3bCUWH2aGI09x YVb/yGlRLVFmkr+4Run+wZg+eY94dz3sMOan0Sl+kZhu8n0qkI3LJvNzRvsDvO7tAR 6aoPYDtsNQmyQW2UzFLPvv4D79sXAkhS7ZN6zNv3DcxY9l339xpKIBj13WaflXEMyH op0yemRLAV6wMggWkDoror+JQnuolnuinVRElXXSzgVb/GSdeFxFYiTNADeQAyOhTa PcIgguoRtgUzbFYikOiWTSoKWp9Aub9C0uBi0pMfla2rLLOxfMgMuR7Bf1PlwpoPmE u38NSnrci9mrQ== From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com> To: Chun-Kuang Hu <chunkuang.hu@kernel.org> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, kernel@collabora.com, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com>, Bo-Chen Chen <rex-bc.chen@mediatek.com>, CK Hu <ck.hu@mediatek.com>, Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>, Dmitry Osipenko <dmitry.osipenko@collabora.com>, Guillaume Ranquet <granquet@baylibre.com>, Matthias Brugger <matthias.bgg@gmail.com>, Philipp Zabel <p.zabel@pengutronix.de>, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2] drm/mediatek: dp: Add phy_mtk_dp module as pre-dependency Date: Tue, 21 Nov 2023 09:29:27 -0500 Message-ID: <20231121142938.460846-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.42.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 06:30:00 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783116228400065134 X-GMAIL-MSGID: 1783184295656312659 |
Series |
[v2] drm/mediatek: dp: Add phy_mtk_dp module as pre-dependency
|
|
Commit Message
Nícolas F. R. A. Prado
Nov. 21, 2023, 2:29 p.m. UTC
The mtk_dp driver registers a phy device which is handled by the phy_mtk_dp driver and assumes that the phy probe will complete synchronously, proceeding to make use of functionality exposed by that driver right away. This assumption however is false when the phy driver is built as a module, causing the mtk_dp driver to fail probe in this case. Add the phy_mtk_dp module as a pre-dependency to the mtk_dp module to ensure the phy module has been loaded before the dp, so that the phy probe happens synchrounously and the mtk_dp driver can probe successfully even with the phy driver built as a module. Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> --- Changes in v2: - Added missing Suggested-by tag drivers/gpu/drm/mediatek/mtk_dp.c | 1 + 1 file changed, 1 insertion(+)
Comments
On Tue, 21 Nov 2023 15:29, "Nícolas F. R. A. Prado" <nfraprado@collabora.com> wrote: >The mtk_dp driver registers a phy device which is handled by the >phy_mtk_dp driver and assumes that the phy probe will complete >synchronously, proceeding to make use of functionality exposed by that >driver right away. This assumption however is false when the phy driver >is built as a module, causing the mtk_dp driver to fail probe in this >case. > >Add the phy_mtk_dp module as a pre-dependency to the mtk_dp module to >ensure the phy module has been loaded before the dp, so that the phy >probe happens synchrounously and the mtk_dp driver can probe >successfully even with the phy driver built as a module. > >Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> >Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") >Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> >Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > >--- Reviewed-by: Guillaume Ranquet <granquet@baylibre.com> > >Changes in v2: >- Added missing Suggested-by tag > > drivers/gpu/drm/mediatek/mtk_dp.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c >index e4c16ba9902d..2136a596efa1 100644 >--- a/drivers/gpu/drm/mediatek/mtk_dp.c >+++ b/drivers/gpu/drm/mediatek/mtk_dp.c >@@ -2818,3 +2818,4 @@ MODULE_AUTHOR("Markus Schneider-Pargmann <msp@baylibre.com>"); > MODULE_AUTHOR("Bo-Chen Chen <rex-bc.chen@mediatek.com>"); > MODULE_DESCRIPTION("MediaTek DisplayPort Driver"); > MODULE_LICENSE("GPL"); >+MODULE_SOFTDEP("pre: phy_mtk_dp"); >-- >2.42.1 >
Hi, Nicolas: Nícolas F. R. A. Prado <nfraprado@collabora.com> 於 2023年11月21日 週二 下午10:29寫道: > > The mtk_dp driver registers a phy device which is handled by the > phy_mtk_dp driver and assumes that the phy probe will complete > synchronously, proceeding to make use of functionality exposed by that > driver right away. This assumption however is false when the phy driver > is built as a module, causing the mtk_dp driver to fail probe in this > case. > > Add the phy_mtk_dp module as a pre-dependency to the mtk_dp module to > ensure the phy module has been loaded before the dp, so that the phy > probe happens synchrounously and the mtk_dp driver can probe > successfully even with the phy driver built as a module. Applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next Regards, Chun-Kuang. > > Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> > Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > > --- > > Changes in v2: > - Added missing Suggested-by tag > > drivers/gpu/drm/mediatek/mtk_dp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c > index e4c16ba9902d..2136a596efa1 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dp.c > +++ b/drivers/gpu/drm/mediatek/mtk_dp.c > @@ -2818,3 +2818,4 @@ MODULE_AUTHOR("Markus Schneider-Pargmann <msp@baylibre.com>"); > MODULE_AUTHOR("Bo-Chen Chen <rex-bc.chen@mediatek.com>"); > MODULE_DESCRIPTION("MediaTek DisplayPort Driver"); > MODULE_LICENSE("GPL"); > +MODULE_SOFTDEP("pre: phy_mtk_dp"); > -- > 2.42.1 >
diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c index e4c16ba9902d..2136a596efa1 100644 --- a/drivers/gpu/drm/mediatek/mtk_dp.c +++ b/drivers/gpu/drm/mediatek/mtk_dp.c @@ -2818,3 +2818,4 @@ MODULE_AUTHOR("Markus Schneider-Pargmann <msp@baylibre.com>"); MODULE_AUTHOR("Bo-Chen Chen <rex-bc.chen@mediatek.com>"); MODULE_DESCRIPTION("MediaTek DisplayPort Driver"); MODULE_LICENSE("GPL"); +MODULE_SOFTDEP("pre: phy_mtk_dp");