Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2047389pxu; Tue, 24 Nov 2020 15:48:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxn9CICmZvt1+OUI+AKlIj7enT0g2gk7xwpbbNgQmYCw5u371pknI8qFNOf0kDuNBAogFo6 X-Received: by 2002:a50:bf4a:: with SMTP id g10mr1005526edk.288.1606261686076; Tue, 24 Nov 2020 15:48:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606261686; cv=none; d=google.com; s=arc-20160816; b=PVUwOUJjK/W/TTbnMHLvocS0Z1b99Bu+nssck8vfpvczB72uvx9F8o/zTMUeTHwd2k XFbSzKdhpehWUf+my5TnzXu2E3lWZ/olXQebQXLQONAhxnMYg/lC2vtArqmVug6LQk4v AUiIRv9qtpj1W0DdjUO4Y3i6viSO/RuriPA1HCslAFDsePnb33+uFYhmKD+pAaDGvH4c rUTedNCL00sevdQepIK5m2smB0i8d3xLUQ+dwmYWtgzAUcBxQgMz3AAxuZH74/rz9KH3 irEqs7FcDIRuJmVG9khXRpkeIdpn1IruYStrJDPXst2x6z/9WM4yAEnEufNokkia9CHe bn4Q== 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:dkim-signature:dkim-filter:from; bh=ZN3rthFqiJp6+WZGNJ4QrncJv8Cg/JXF0vA6wFtIY+I=; b=M4OnhNzSuxk+NptJsjO66YleAotW1yv+dSoS6t+A8g6izYOo+VucTCzBCDmwbOPjsN cgyqNWejdAV697Gh1sjnx8Vggss3R4eqprBjSmt4IYH9g84xIxrB/hUD8k98hB890uO3 yzNwhEcbzbfIeK/OXPiCK0xz7rIAQEkHX1GNj6U7MKCN1gy1tyolE/pSM5cm8LiFLA+d loUJlGI26RtbuKEdhZr7TW7uPid73Sm3smMLVIFGLUXJrkIfrBc4jpSesbpQxdq6LQp9 W7EIdKQc5yF1Y1dK3xVAWyL1R7Yr3SX/XgDqnZgRXaF1XZAxdRjT1ESNQOqYEevN0VPA 972Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mntre.com header.s=mntremail header.b=ThUchsg5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mntre.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 63si168908edn.339.2020.11.24.15.47.42; Tue, 24 Nov 2020 15:48:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mntre.com header.s=mntremail header.b=ThUchsg5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mntre.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390728AbgKXRW1 (ORCPT + 99 others); Tue, 24 Nov 2020 12:22:27 -0500 Received: from softboy.mntmn.com ([91.250.115.15]:59956 "EHLO softboy.mntmn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731584AbgKXRW1 (ORCPT ); Tue, 24 Nov 2020 12:22:27 -0500 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 Cc: agx@sigxcpu.org, laurentiu.palcu@nxp.com, Laurentiu Palcu , Lucas Stach , Philipp Zabel , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(-) 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); -- 2.28.0