Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12479643rwd; Fri, 23 Jun 2023 06:45:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6lDag/JFSDQVDSAeyWQ0x/4hn543QCBMuH3KJV/oT1RIL8zFstpLNfMikzmY+oudtxfGpl X-Received: by 2002:a17:903:22cc:b0:1b5:1c07:6670 with SMTP id y12-20020a17090322cc00b001b51c076670mr21664442plg.31.1687527951233; Fri, 23 Jun 2023 06:45:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687527951; cv=none; d=google.com; s=arc-20160816; b=SKdAYj/W8VtisRVDpsV5HWVTCs5TFMlpwLDlarwC8VfpxQbP8xfPKn9o6Ws+xwFgrK TcbB7Fme9WfmTjkm8/Y8CCwT9Iv02H4c/w4mjNW1CayFuNLL518hVWLYq8+kL1Wff5HG 09y94yVkzoiclA2myz23d19dirxtZWxVOL+7CYB8jtZcAbsy86HwgPMhXKMeSmu5Ojs0 flkPIJp97PaB1fgExAkr+I7duo1uIFE6bEbiFB89OQfBA4veVz/NEvtMWmHa+JcXYWhE +cIdFpXPGW0Vq8HRtaINDNd4+YkfWkuA8uH0FFmYxIYcVt49sk6AEd/IHHYwHi5dQMvs tssw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=y4c++m71ALtjqqyZhG5VqUgntrH4lgFJiF8RWGTBpVU=; b=GwhY95dYoiYdjKxtXHjoRDVzXrcGcy1uHhzB27Z0pO+Jc8B/qSZSG44b25nggG9AIl O8v1WsEGJUYOy8Fc7oTKa3FzGnEEDYh85SJzbPkdskaJFycZY003xt0LyAzOYXi13To5 BrEsP9Fh7zeZwhdbADN7l8XC6U7EpR0bFE2XtZ2xy14XUIFzLIxwffM6K3kmgbJB82WQ f2fgIn+JIQGmW9L0Noa5YrR+fdvj3gcV7Bgo0KS6H0OKJX6OsrX4ugVTaCoqOR/iPSZG HxmAdGNjG36MeKepIvy2oNsNkXfKFJXrS9Axj3v3UCIgek/MRaWTjCqK1Obja2fH9DbA pGyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=GLoJELng; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w15-20020a170902a70f00b001b1a2bf5275si8431414plq.74.2023.06.23.06.45.38; Fri, 23 Jun 2023 06:45:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=GLoJELng; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231567AbjFWN3a (ORCPT + 99 others); Fri, 23 Jun 2023 09:29:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231336AbjFWN33 (ORCPT ); Fri, 23 Jun 2023 09:29:29 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B02AF19AF for ; Fri, 23 Jun 2023 06:29:28 -0700 (PDT) Received: from notapiano (unknown [IPv6:2600:4041:5b1a:cd00:524d:e95d:1a9c:492a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) 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 38A836607135; Fri, 23 Jun 2023 14:29:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1687526966; bh=f25KcXi6OI+LncvpOIXHkVRpkniDYC2VeUuLYp3b3hU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GLoJELngos//bZbPLg0c9rK5fE1moLGbuBfaJuukcPv1OZHhXtJXzQnO0p0SuSOSF YflGSif3EVcWaJZPQ/Ss7JdCihtzPiVnNyq+OC26k7ddMYw7tZ/MUbSoetTk0UXqhi z+e892o09ky/Aokfifx2YsCjZetTknHB+KY/NQHuba0upMz6yD0oqxMFENcShbyNNj UchGt5ZzYuaboFhGI7oKokhZLWtUqkYXbOoQn6aUl3MWWSBvTi2iTX7LAkNT35qi7e Dv6a5IT46JGNvrCfhXDp5b0Hk/i5kngBTBrhUXKw8vNCSoKG7FWEah0ylUhmSVxIhc CWsdwwA/U3w5w== Date: Fri, 23 Jun 2023 09:29:21 -0400 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: AngeloGioacchino Del Regno Cc: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, wenst@chromium.org Subject: Re: [PATCH v3 9/9] drm/mediatek: dp: Add support for embedded DisplayPort aux-bus Message-ID: References: <20230404104800.301150-1-angelogioacchino.delregno@collabora.com> <20230404104800.301150-10-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230404104800.301150-10-angelogioacchino.delregno@collabora.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 04, 2023 at 12:48:00PM +0200, AngeloGioacchino Del Regno wrote: > For the eDP case we can support using aux-bus on MediaTek DP: this > gives us the possibility to declare our panel as generic "panel-edp" > which will automatically configure the timings and available modes > via the EDID that we read from it. > > To do this, move the panel parsing at the end of the probe function > so that the hardware is initialized beforehand and also initialize > the DPTX AUX block and power both on as, when we populate the > aux-bus, the panel driver will trigger an EDID read to perform > panel detection. > > Last but not least, since now the AUX transfers can happen in the > separated aux-bus, it was necessary to add an exclusion for the > cable_plugged_in check in `mtk_dp_aux_transfer()` and the easiest > way to do this is to simply ignore checking that when the bridge > type is eDP. > > Signed-off-by: AngeloGioacchino Del Regno > --- > drivers/gpu/drm/mediatek/mtk_dp.c | 61 ++++++++++++++++++++++++++----- > 1 file changed, 51 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c > index a67143c22024..8109f5b4392b 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dp.c > +++ b/drivers/gpu/drm/mediatek/mtk_dp.c [..] > @@ -2571,6 +2585,33 @@ static int mtk_dp_probe(struct platform_device *pdev) > mtk_dp->need_debounce = true; > timer_setup(&mtk_dp->debounce_timer, mtk_dp_debounce_timer, 0); > > + if (mtk_dp->bridge.type == DRM_MODE_CONNECTOR_eDP) { > + /* Initialize, reset and poweron the DPTX AUX block */ > + mtk_dp_initialize_aux_settings(mtk_dp); > + mtk_dp_power_enable(mtk_dp); > + > + /* Power on the panel to allow EDID read from aux-bus */ > + mtk_dp_aux_panel_poweron(mtk_dp, true); > + > + ret = devm_of_dp_aux_populate_bus(&mtk_dp->aux, NULL); This patch causes .../bin/aarch64-none-linux-gnu-ld: Unexpected GOT/PLT entries detected! .../bin/aarch64-none-linux-gnu-ld: Unexpected run-time procedure linkages detected! .../bin/aarch64-none-linux-gnu-ld: drivers/gpu/drm/mediatek/mtk_dp.o: in function `mtk_dp_probe': .../drivers/gpu/drm/mediatek/mtk_dp.c:2595: undefined reference to `devm_of_dp_aux_populate_bus' You need diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index b451dee64d34..76cab28e010c 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -26,6 +26,7 @@ config DRM_MEDIATEK_DP select PHY_MTK_DP select DRM_DISPLAY_HELPER select DRM_DISPLAY_DP_HELPER + select DRM_DP_AUX_BUS help DRM/KMS Display Port driver for MediaTek SoCs. Thanks, N?colas