From patchwork Tue Nov 24 17:19:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lukas F. Hartmann" X-Patchwork-Id: 11929433 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 777D3C63798 for ; Tue, 24 Nov 2020 17:23:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D635420644 for ; Tue, 24 Nov 2020 17:23:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZCKU/iBv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=mntre.com header.i=@mntre.com header.b="ThUchsg5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D635420644 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mntre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ti1KIqvE30ij8xWFdkrVpeFZk6s0tO1CD91oS1Jb2DE=; b=ZCKU/iBv8qCwLCjLm66lBdzTEK MmV0USHdQG1wKztwRQdR+hvt3eRMMHcPpMfa3uxu0LhpEKfaVV0KOuahqUrIQDmv5sYEVoeGldz5K t0NYehUQtpHqMu26sx9kAfoODGDq4/9AmVucq6q+qOOMosohWGMH704HTWCDn1j1Z+NXkxE2JouWy y37dAI/r3wzzh4CtGXDAQfGwdzPiNco6ZNNIm0NfeAE+NY7GGjMwMTSYb0ub0d2rLZ4SHue+L8Lln Dl2H7hnv9unhF0zRpEEb4YQxjNILORTaT5CjIR4RfbbDrrOXpU3oaky1HZSu+6b7aWrXeTIdVtfjj mhBluPBQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khc1Q-0001N0-U9; Tue, 24 Nov 2020 17:22:32 +0000 Received: from softboy.mntmn.com ([91.250.115.15]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khc1N-0001LW-Nf for linux-arm-kernel@lists.infradead.org; Tue, 24 Nov 2020 17:22:30 +0000 From: "Lukas F. Hartmann" DKIM-Filter: OpenDKIM Filter v2.11.0 softboy.mntmn.com E7CF4720718 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mntre.com; s=mntremail; t=1606238545; bh=zWxM/wxXWXl9FNzLuVjGFhUbHvK5lFkGbM6Pl961KgU=; h=From:To:Cc:Subject:Date:From; b=ThUchsg5n4mz41zZSdrdKILEWwpBeTFFZRTMU2wxLJJ6yg0mVZaE/ShjsOGRXa7Id xJAg4vICce5tROWr+djCh2n8zQUi1kv7gZXDCNMlXhZkK77tTPVXaVLYyzCLnr0dNB rh50WYbwhnoDS6jKR2mm/NbnGG9xelzvCiKNxtmrryCXPURU895JJCD+UT0oIqJD3y WS/5jfAd49DTRmY6LL5Ynrdaj+Ws1XTmlwXO+HKoMWY8herjaTVMbOJWW3x+UFZuPe lsBZ/BYJKMxESiVeSp9QcQK4t9FrCntv0SqmVpybji4EIYHWv5K+UTeTDOrdJCnJyO +a77IkpJn4DGA== To: lukas@mntre.com Subject: [RFC] dcss: fix attaching to sn56dsi86 bridge Date: Tue, 24 Nov 2020 18:19:57 +0100 Message-Id: <20201124171956.981307-1-lukas@mntre.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201124_122229_899567_A9C70CD3 X-CRM114-Status: GOOD ( 13.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pengutronix Kernel Team , Fabio Estevam , Daniel Vetter , David Airlie , Shawn Guo , agx@sigxcpu.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, NXP Linux Team , Philipp Zabel , Laurentiu Palcu , laurentiu.palcu@nxp.com, Sascha Hauer , linux-arm-kernel@lists.infradead.org, Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The sn56dsi86 DSI to eDP bridge driver does not support attaching without a drm connector. This patch makes the attachment work. Required for the display chain in MNT Reform 2.0 (DCSS->NWL DSI->SN56DSI86->EDP). Signed-off-by: Lukas F. Hartmann --- drivers/gpu/drm/imx/dcss/dcss-kms.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) -- 2.28.0 diff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.c b/drivers/gpu/drm/imx/dcss/dcss-kms.c index 135a62366..4967f828b 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-kms.c +++ b/drivers/gpu/drm/imx/dcss/dcss-kms.c @@ -82,6 +82,7 @@ static int dcss_kms_bridge_connector_init(struct dcss_kms_dev *kms) struct drm_crtc *crtc = (struct drm_crtc *)&kms->crtc; struct drm_panel *panel; struct drm_bridge *bridge; + struct drm_connector_list_iter iter; int ret; ret = drm_of_find_panel_or_bridge(ddev->dev->of_node, 0, 0, @@ -104,19 +105,19 @@ static int dcss_kms_bridge_connector_init(struct dcss_kms_dev *kms) return ret; } - ret = drm_bridge_attach(encoder, bridge, NULL, - DRM_BRIDGE_ATTACH_NO_CONNECTOR); + ret = drm_bridge_attach(encoder, bridge, NULL, 0); if (ret < 0) { dev_err(ddev->dev, "Unable to attach bridge %pOF\n", bridge->of_node); return ret; } - kms->connector = drm_bridge_connector_init(ddev, encoder); - if (IS_ERR(kms->connector)) { - dev_err(ddev->dev, "Unable to create bridge connector.\n"); - return PTR_ERR(kms->connector); - } + /* + * This hack to look up the connector is copied from mxsfb. + */ + drm_connector_list_iter_begin(ddev, &iter); + kms->connector = drm_connector_list_iter_next(&iter); + drm_connector_list_iter_end(&iter); drm_connector_attach_encoder(kms->connector, encoder);