Message ID | 20231120202837.396760-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 io7csp198721vqb; Mon, 20 Nov 2023 12:29:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxuazydPUrQAYbF+fYG+SHdaJkBZ4T+VXJHJ0iHgJkEvp4yy6n/BoiIRT3A6qD2S7kgYlN X-Received: by 2002:a05:6a00:6c8f:b0:690:3b59:cc7b with SMTP id jc15-20020a056a006c8f00b006903b59cc7bmr9458532pfb.32.1700512150339; Mon, 20 Nov 2023 12:29:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700512150; cv=none; d=google.com; s=arc-20160816; b=RvxSYGmv9SGPtnL0SuuVNnazF81EaylyuzGsYwkFQA3sAVTe+GxcBlBHLkRMp51MeB lvnKE/tsTrsz9HRnQru+lTv2964xHg7E3HbUybjdNK/ylWzBz+HCIiHJHfwJvXryrRCL 9u4LZrLbtCMgadcrTO9Z5J05g4JrLUZBxFNF0GSTOFBMsHOc0UG0mI58nL/jNvJD3JF/ cXJD9qgh1Uvowcyj/NuEeiQbePBpOcrkxAS1cEulUfAJM/OP6qV+4MWqycXXJ4SIP397 Y9qmlg1/8ZLG7H5BVEr5PsmEtMq2TPwaDc6Js5cQTy2JUQeOQIi02NFfemMJjNCTfcP4 V+pA== 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=Hja1MQss1Gr+UnRtsMlNn4zuJhGTC9iFvbiWNu8UfhM=; fh=TvWjZoqja2JadgDJEvKA1fuBi4k/dCJvs1hv5tV8aA8=; b=lC7W7aVpQXC+MZZ1hYz30wW0OAieIdarF17Fi2sPlsBE/nJzuRptDN0Sj/r4Pf5NVl TP5YJtfsIbk8AGtI2xJMxhd/0azNSNtqM5ZXOns0A03VrZzEs8ox0iHiVKXJLQydElGK LsUDjj6AItBm34YNQAxdDMTwKvdY+mgVkabUnJLUJduJOzFmdGzblQ10tYrQVWUsEdMc qYKwCtSoWyLFiliXxrUiBCFvh3iUmAbqsYQA+FG+QLxBxGIPY+N+u8K7y+nrmFIdfrBg igOGtvZ6zrI9EiVhNjhWSSUj/91GSWDWkfCPPenWOdLTAH3t/5KkUoHmPxh1D/qLf097 KhGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=k3n50MQV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id y10-20020a056a00190a00b006c3077a340dsi8863188pfi.285.2023.11.20.12.29.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 12:29:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=k3n50MQV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id C6496808682B; Mon, 20 Nov 2023 12:29:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230188AbjKTU2u (ORCPT <rfc822;heyuhang3455@gmail.com> + 27 others); Mon, 20 Nov 2023 15:28:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjKTU2s (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 20 Nov 2023 15:28:48 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66F4EC3 for <linux-kernel@vger.kernel.org>; Mon, 20 Nov 2023 12:28:45 -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 518FF66071D4; Mon, 20 Nov 2023 20:28:41 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1700512123; bh=gCwZgV8zJpLMsi8EPwsQoJVBIyq0juJd2X+ekA2F1+c=; h=From:To:Cc:Subject:Date:From; b=k3n50MQVYemXDQ0xWa4l3ho2D1Rr1/II7hG+Mr9k6DjxufxpvNbu3Jw5PdYW30po7 WxZHls2gEskNN9O7Qd9Iee1qJomMXTpRzebEaohbQa+xnOrtdJIbbUMBuorWwCJrgU 38PcqzeJjnGYVMttzXfA5X2hBA/KtL4YPRX0mN9SP6TWLujUK+k8XuyOvuFpKgC73p JItG09o7yRrL2mYHXhJCzeKqn3q52whMXhQb99ktIu0mOav1dFmhBm7HnuftMjjuOU AlCNpMHAPDKecVjzImr7btHiHQZtBeTe15yIplqN5dYq++dqqjU3utHgWUd7G4rl19 HdLZiMdPFgPSQ== 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>, Markus Schneider-Pargmann <msp@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] drm/mediatek: dp: Add phy_mtk_dp module as pre-dependency Date: Mon, 20 Nov 2023 15:28:16 -0500 Message-ID: <20231120202837.396760-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=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 12:29:07 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783116228400065134 X-GMAIL-MSGID: 1783116228400065134 |
Series |
drm/mediatek: dp: Add phy_mtk_dp module as pre-dependency
|
|
Commit Message
Nícolas F. R. A. Prado
Nov. 20, 2023, 8:28 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.
Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
drivers/gpu/drm/mediatek/mtk_dp.c | 1 +
1 file changed, 1 insertion(+)
Comments
Il 20/11/23 21:28, Nícolas F. R. A. Prado ha scritto: > 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. > You forgot a Suggested-by here :-P > Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> It's fine anyway; being the best solution that we can use: Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > > --- > > 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");
On Tue, Nov 21, 2023 at 11:59:14AM +0100, AngeloGioacchino Del Regno wrote: > Il 20/11/23 21:28, Nícolas F. R. A. Prado ha scritto: > > 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. > > > > You forgot a Suggested-by here :-P Oops, sorry, I forgot that tag existed. Will send a v2 with it added :). > > > Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") > > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> > > It's fine anyway; being the best solution that we can use: > > Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > > > > > --- > > > > 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"); >
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");