Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6692802imm; Tue, 24 Jul 2018 01:05:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc81epiL/6PlLK1D5eh56C7sc7YzpxCyN4EkFAFYSSTJJTu+aJpLL3lSXDNSl2IC8P1cDUG X-Received: by 2002:a63:1262:: with SMTP id 34-v6mr15622155pgs.154.1532419557921; Tue, 24 Jul 2018 01:05:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532419557; cv=none; d=google.com; s=arc-20160816; b=aLvxyqjLXOTu/nkYmHcPLoWFVC6sf52bUAPuMyu/duyrJw+5v7G1MJlErVIhAd2uqc KW+LfYvO9/L8U+F15hadAYDn2zQlPJPNfTmUFWs+AdPQXMNMc8YQef1a0DCv3Coy/U41 HpSb2TW8XBIAvDWVATfMoUQ9meRG1AfYDdPF4bzDDSffGRXFCTTB1CMVeKrSt8RNE8Ts +DzGVV/zYVZ0IhsrqHsl3SqlxiiKpZFpKGIOMT55Iw7sxeI5YUFXLYZod8keaPn2bKb7 hSp2BNMWGOzP14N7iwtrnPRJSihWxUrQQF4hlHHfA0d+wK4NQQkmwY022rky4NQ+KU6/ 649g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type:message-id :content-transfer-encoding:in-reply-to:subject:cc:to:mime-version :user-agent:from:date:dkim-signature:dkim-filter :arc-authentication-results; bh=gS407P3bxPX5uUYVatzpqc6aIq+Hw3Ojs3ALfWzBniM=; b=U2U/+mUknucLyRQo+RYLMqdG5K5SGcpMi8wr9yv2oafKMzpIks2B+4pfGTEaGhirdH W9ss2LKX5gYKIAMdSM1bvfG4X5Q7V1J0tCLbAvbV5veB4mOSmEcU9CFRk7LAY5Aqtl2c IKGmlb7y+9U07RffGAuWnfDzymHJcs+Ju5GtDdahBtFEm0VJo9qlInok2/oeVlFJA67h VXPejxZ980i00L70RzqGILFuUIQP2v0DXulF0/Xw4jHEUzeRjlLQaaUXtaQoL2q0a0+t /vBZIkA/pXdMJes0FeKQmcknLWW8jx0x1avTAyaIR2R54U00bn/5fFj0Cg8RyxnSGXa+ t94w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=XkKBP1R7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si11784603pfa.219.2018.07.24.01.05.42; Tue, 24 Jul 2018 01:05:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=XkKBP1R7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388526AbeGXJJ7 (ORCPT + 99 others); Tue, 24 Jul 2018 05:09:59 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:10982 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388390AbeGXJJ6 (ORCPT ); Tue, 24 Jul 2018 05:09:58 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180724080442epoutp028eacf1382572c6d69629b4360752ca15~EP2Z9GHw20915009150epoutp02p for ; Tue, 24 Jul 2018 08:04:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180724080442epoutp028eacf1382572c6d69629b4360752ca15~EP2Z9GHw20915009150epoutp02p DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1532419482; bh=gS407P3bxPX5uUYVatzpqc6aIq+Hw3Ojs3ALfWzBniM=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=XkKBP1R7oUanDvyT9F9KbDu27hgjQ9xeXnp5khn/QZqyZs7e7DAR5mmLvJWIprsz0 eHMRhMlBAxQMxsWDuNJ1/TMAmsLquzMZNlb6BblC70k9ardIvL0WlxmSkDbcrMER7X ow1ujZSHbYxSPqifGXhnxXzKPIkqUF7l8qvJvmRw= Received: from epsmges1p3.samsung.com (unknown [182.195.40.158]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180724080439epcas1p28541866ecf89d0f5af7c2be46918772e~EP2Xcudc70399603996epcas1p28; Tue, 24 Jul 2018 08:04:39 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id AB.97.04176.79DD65B5; Tue, 24 Jul 2018 17:04:39 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p3.samsung.com (KnoxPortal) with ESMTPA id 20180724080439epcas1p3a19bce196acc4611327aa2a78a8e5060~EP2W7G7Vi0942109421epcas1p36; Tue, 24 Jul 2018 08:04:39 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20180724080439epsmtrp23fdcc04ddeb929291de8f42bddfaac17~EP2W4qUD53260632606epsmtrp2o; Tue, 24 Jul 2018 08:04:39 +0000 (GMT) X-AuditID: b6c32a37-6ddff70000001050-55-5b56dd971698 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 11.2C.03889.79DD65B5; Tue, 24 Jul 2018 17:04:39 +0900 (KST) Received: from [10.113.62.206] (unknown [10.113.62.206]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20180724080438epsmtip15306c16d0ec6fc34f38074310cea0491~EP2WibLI_2619726197epsmtip1n; Tue, 24 Jul 2018 08:04:38 +0000 (GMT) Date: Tue, 24 Jul 2018 17:04:39 +0900 From: Inki Dae User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Maciej Purski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org CC: David Airlie , Rob Herring , Mark Rutland , Thierry Reding , Kukjin Kim , Krzysztof Kozlowski , Archit Taneja , Andrzej Hajda , Laurent Pinchart , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Marek Szyprowski , Bartlomiej Zolnierkiewicz Subject: Re: [PATCH v3 2/9] drm/exynos: move connector creation to attach callback In-Reply-To: <1529396370-18761-3-git-send-email-m.purski@samsung.com> Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA3VTbWxTVRjOuZ/dYs2l2/CkS1i9ioElK/3Y2Jk6JAHNTSRKIiNKFbjpbtZp P25612abGJYSpewDaYSwD7ONZIaxTAZlYCnUxLHAxmZHM0Sd1JHAphNXkNLp4ky87R1xf/z3 nOc8z/O+5z3nqHBNiNaqqp01gtvJ21kqm7hwZb2h6Hh8p8Xw3V8GNHU6SqKW6CiGfP55Ep1t HSBR17DM3Uw9oNCvP8cI9Ond+ziamDhDo299v9PoUKCHRsG7t0g0Gf6cQq0TX2Ooe26KQF8O x2n0xfcxDH0cGaZR62dzFFoMdxKbc7n+zn7ATR5uwbiL7XGa6/C3kVyw7xDFfbVwh+Smm65h 3Lme/dzhwT7AJYNrtmfvagAv826rrdor6ASn1VVZ7awqZyt2vFaEWJ3NJdWUsxaj0aQ3Gkr1 JpNJby5770VTCatz8g6hn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mmq8emVZ1sHtu/PWD1uN99nMlj85J6j74tqxg9Pm+SC+CK4rJJSc3JLEst0rdL 4Mo493YFU8FXqYqO9z9ZGhifinYxcnJICJhILHjWztbFyMUhJLCbUWLtnDPMXYwcQAkJiS1b OSBMYYnDh4tByoUEXjNKXJ6hD2LzCmhJrPq0gRnEZhFQlWj+8o4NxGYDsieuuA9miwqESUz7 /ZwVol5Q4uTMJywgq0QELjFKbLj8hhXEYRa4xSLxv2cdC0iVsECIxJMtK1kgtp1nlJjVHA1i cwq4Ssxregc2iVlAXeLPvEvMELa8RPPW2cwTGAVnIVkyC0nZLCRlCxiZVzFKphYU56bnFhsW GOWllusVJ+YWl+al6yXn525iBMetltYOxhMn4g8xCnAwKvHwXvgWGi3EmlhWXJl7iFGCg1lJ hLd0dli0EG9KYmVValF+fFFpTmrxIUZpDhYlcV75/GORQgLpiSWp2ampBalFMFkmDk6pBkam ZTuqZWfW229pF+vpvLhaWGtJ8IYnvtyFj09uDDsl6dO5UVKSa1/1VUWm4HBN3ou+fcs/LNrV 3JYROOWf2rLexxkX9q6UfOP7Xfs5x52wK04M/SfFLc+muO81WzUl2dDpl/mrqQlvOh9Lbnu9 Xpw/wyj1bYCJS1ablK6sYPTO3rSPB0X+uSqxFGckGmoxFxUnAgAjgqW61wIAAA== Message-Id: <20180724080439epcas1p3a19bce196acc4611327aa2a78a8e5060~EP2W7G7Vi0942109421epcas1p36@epcas1p3.samsung.com> X-CMS-MailID: 20180724080439epcas1p3a19bce196acc4611327aa2a78a8e5060 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-ArchiveUser: EV CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180619081958eucas1p16911ee9962441735d929dc588e70ce70 References: <1529396370-18761-1-git-send-email-m.purski@samsung.com> <1529396370-18761-3-git-send-email-m.purski@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, 2018년 06월 19일 17:19에 Maciej Purski 이(가) 쓴 글: > The current implementation assumes that the only possible peripheral > device for DSIM is a panel. Using an output bridge child device > should also be possible. > > If an output bridge is available, don't create a new connector. > Instead, call drm_bridge_attach() and set encoder's bridge to NULL > in order to avoid an out bridge from being visible by the framework, as > the DSI bus needs control on enabling its child output bridge. > > Such sequence is required by Toshiba TC358764 bridge, which is a DSI > peripheral bridge device. Right, we should consider DSI to LVDS bridge. Thanks, Inki Dae > > Signed-off-by: Maciej Purski > --- > drivers/gpu/drm/exynos/exynos_drm_dsi.c | 38 ++++++++++++++++++++++----------- > 1 file changed, 25 insertions(+), 13 deletions(-) > > diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c > index 9599e6b..c0408c0 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c > @@ -255,6 +255,7 @@ struct exynos_dsi { > struct mipi_dsi_host dsi_host; > struct drm_connector connector; > struct drm_panel *panel; > + struct drm_bridge *out_bridge; > struct device *dev; > > void __iomem *reg_base; > @@ -1499,7 +1500,30 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, > struct mipi_dsi_device *device) > { > struct exynos_dsi *dsi = host_to_dsi(host); > - struct drm_device *drm = dsi->connector.dev; > + struct drm_encoder *encoder = &dsi->encoder; > + struct drm_device *drm = encoder->dev; > + struct drm_bridge *out_bridge; > + > + out_bridge = of_drm_find_bridge(device->dev.of_node); > + if (out_bridge) { > + drm_bridge_attach(encoder, out_bridge, NULL); > + dsi->out_bridge = out_bridge; > + encoder->bridge = NULL; > + } else { > + int ret = exynos_dsi_create_connector(encoder); > + > + if (ret) { > + DRM_ERROR("failed to create connector ret = %d\n", ret); > + drm_encoder_cleanup(encoder); > + return ret; > + } > + > + dsi->panel = of_drm_find_panel(device->dev.of_node); > + if (dsi->panel) { > + drm_panel_attach(dsi->panel, &dsi->connector); > + dsi->connector.status = connector_status_connected; > + } > + } > > /* > * This is a temporary solution and should be made by more generic way. > @@ -1518,11 +1542,6 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, > dsi->lanes = device->lanes; > dsi->format = device->format; > dsi->mode_flags = device->mode_flags; > - dsi->panel = of_drm_find_panel(device->dev.of_node); > - if (dsi->panel) { > - drm_panel_attach(dsi->panel, &dsi->connector); > - dsi->connector.status = connector_status_connected; > - } > exynos_drm_crtc_get_by_type(drm, EXYNOS_DISPLAY_TYPE_LCD)->i80_mode = > !(dsi->mode_flags & MIPI_DSI_MODE_VIDEO); > > @@ -1654,13 +1673,6 @@ static int exynos_dsi_bind(struct device *dev, struct device *master, > if (ret < 0) > return ret; > > - ret = exynos_dsi_create_connector(encoder); > - if (ret) { > - DRM_ERROR("failed to create connector ret = %d\n", ret); > - drm_encoder_cleanup(encoder); > - return ret; > - } > - > if (dsi->mic_bridge_node) { > mic_bridge = of_drm_find_bridge(dsi->mic_bridge_node); > if (mic_bridge) >