Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1675883pxa; Sun, 2 Aug 2020 16:50:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLAL9bTfoCrneBrsYXrotu3mY+clkIdgHeY/6PYb+oAMVxuATqyK6pV/1SXt26xJeNoEoC X-Received: by 2002:a17:907:7251:: with SMTP id ds17mr14131041ejc.289.1596412243855; Sun, 02 Aug 2020 16:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596412243; cv=none; d=google.com; s=arc-20160816; b=tiMdMkpk7TKx+e2Pd9L9XFbDg4FBEMzdv2dBTlt/mhb17VEHjkHGnHaeiQu1usM9qw 8BYTqaMBjao8f8W6kLfAUzggh0YSxwcrQf4Vw8UwE/zU11A4ymEY3ZdpOFul+QjB3WSx Q7sGLuqNHa949SNjmSbw1Nyggb0STurXMosmH5ajNgTX9lxQCNRBUnp2C5mA+jOMDGTf 3yWS/GG9dLwrOioDdngVKF5U07t1yjMOYl3wzhQ/O+ArfXuwhqiDxjQs3IssFgIRsQnL 1XQqiEoJxtsDZtzuvLLNvnNr5CHYSfv51WAuv9651y6j4RHUD18KThw9k09xtY3lf67s H6AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Jj1ZaJScto7OFe2WRsvz7Rh7FU3ydjcJBtZrh7i4KqA=; b=x94u9RK285tp1wtmmNPNX/BVGwkB0r0EzxBlooFJNmJEn4rNb9fVMuKs6ykcuy/PsW cWxFblCZdy1VK2lf0wwQF8PENmkxhhcWMJPvmvqHaLJDhI9FZmIeCVUI+Ao1GfcA2FMR Cn6Gqtr63YkpinI964JRnK436axmIdglwrgaN190wtYxrVBe/b79O3r8f7ZgiVrf7LPo GGCbCLWLt8FHXt/kkchZkU6bEQv7TH8r/jyjlRQrex7WXPBCSI4YRHfeIyoUsvFuoptG QZe3973NDe3kx3hZKA0GFGVegNTOLguO9yrn1yiR9keodn0heUM9xABuTkjorERuqMN6 IjJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CbX1Vq0d; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b10si9573406edy.92.2020.08.02.16.50.20; Sun, 02 Aug 2020 16:50:43 -0700 (PDT) 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=pass header.i=@kernel.org header.s=default header.b=CbX1Vq0d; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727059AbgHBXrR (ORCPT + 99 others); Sun, 2 Aug 2020 19:47:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:48802 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726797AbgHBXrR (ORCPT ); Sun, 2 Aug 2020 19:47:17 -0400 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9A5542070A for ; Sun, 2 Aug 2020 23:47:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596412035; bh=H6xs6d3dgK+96AhAZfXFX14NGYOEMH4Vnh+W+8vKrRM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CbX1Vq0dV9eP9b/mhUJB9UQPhoIxMhukuHjRemSl0NuMpm97ysyVwo9ADqqW9timx 9mocM9uwc9Z/Qvc+ARM2EPlv38tMZ04smxjp8dTNb6MZZP2tFDX9J9zPUS/qjka6hJ 1yKMsVdRm70L325t4/RXujKW+5NECg7lJWKq/MyU= Received: by mail-ej1-f46.google.com with SMTP id bo3so14163762ejb.11 for ; Sun, 02 Aug 2020 16:47:15 -0700 (PDT) X-Gm-Message-State: AOAM5328nSxBgigEaWCyXwgY/Ruv87Z69EvtgiGoLI/aNFuFZEuGVrk8 j7Fm53T+stpE/Op20IbYm9+aO1hYT70cQGdgmg== X-Received: by 2002:a17:906:60d5:: with SMTP id f21mr663711ejk.94.1596412034498; Sun, 02 Aug 2020 16:47:14 -0700 (PDT) MIME-Version: 1.0 References: <20200728111800.77641-1-frank-w@public-files.de> <20200728111800.77641-2-frank-w@public-files.de> In-Reply-To: From: Chun-Kuang Hu Date: Mon, 3 Aug 2020 07:47:01 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Re: [PATCH v2 1/5] drm/mediatek: config component output by device node port To: Frank Wunderlich Cc: Chun-Kuang Hu , Philipp Zabel , David Airlie , linux-kernel , DRI Development , "moderated list:ARM/Mediatek SoC support" , Daniel Vetter , Matthias Brugger , Bibby Hsieh , Linux ARM Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Frank: Frank Wunderlich =E6=96=BC 2020=E5=B9=B48=E6=9C= =882=E6=97=A5 =E9=80=B1=E6=97=A5 =E4=B8=8B=E5=8D=884:06=E5=AF=AB=E9=81=93= =EF=BC=9A > > > Gesendet: Sonntag, 02. August 2020 um 02:03 Uhr > > Von: "Chun-Kuang Hu" > > An: "Frank Wunderlich" > > Cc: "Chun-Kuang Hu" , "Philipp Zabel" , "David Airlie" , "linux-kernel" , "DRI Development" , "moderated list:ARM/Mediatek SoC support" , "Daniel Vetter" , "Matthias Brugger" , "Bibby Hsieh" , "Linux ARM" > > Betreff: Re: [PATCH v2 1/5] drm/mediatek: config component output by de= vice node port > > > + > > > + if (comp_type !=3D MTK_DSI && comp_type !=3D MTK_DPI)= { > > > + port =3D of_graph_get_port_by_id(node, 0); > > > + if (!port) > > > + continue; > > > + ep =3D of_get_child_by_name(port, "endpoint")= ; > > > + of_node_put(port); > > > + if (!ep) > > > + continue; > > > + remote =3D of_graph_get_remote_port_parent(ep= ); > > > + of_node_put(ep); > > > + if (!remote) > > > + continue; > > > + of_id =3D of_match_node(mtk_ddp_comp_dt_ids, = remote); > > > + if (!of_id) > > > + continue; > > > + comp_type =3D (enum mtk_ddp_comp_type)of_id->= data; > > > + for (i =3D 0; i < private->data->main_len - 1= ; i++) > > > + if (private->data->main_path[i] =3D= =3D comp_id) > > > + private->data->main_path[i + = 1] =3D > > > + mtk_ddp_comp_get_id(node, com= p_type); > > > + for (i =3D 0; i < private->data->ext_len - 1;= i++) > > > + if (private->data->ext_path[i] =3D=3D= comp_id) > > > + private->data->ext_path[i + 1= ] =3D > > > + mtk_ddp_comp_get_id(node, com= p_type); > > > + } > > > > The port property is not defined in binding document [1], so define it > > in binding document first. > > > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/= tree/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt?h= =3Dv5.8-rc7 > > hi, > would be the following enough for describing the ports? > > Port binding > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > some nodes like > > - connector (e.g. hdmi-connector) > - bls (mediatek,mt7623-disp-pwm) > - hdmix (mediatek,mt7623-hdmi) Now I just care about the bls to dpi. So in mediatek,disp.txt, you just need to add a Optional properties - port (input and output), and modify mediatek,dpi.txt for its input port. Regards, Chun-Kuang. > > can have port bindings to connect each other. Each port can have only 1 e= ndpoint > > more detail about ports/endpoints in ../../media/video-interfaces.txt > hdmi-connector is described here: ../connector/hdmi-connector.txt > > example: > > connector { > compatible =3D "hdmi-connector"; > > port { > hdmi_connector_in: endpoint { > remote-endpoint =3D <&hdmi0_out>; > }; > }; > }; > > > &bls { > status =3D "okay"; > > port { > bls_out: endpoint { > remote-endpoint =3D <&dpi0_in>; > }; > }; > }; > > &dpi0 { > status =3D "okay"; > > ports { > #address-cells =3D <1>; > #size-cells =3D <0>; > port@0 { > reg =3D <0>; > dpi0_out: endpoint { > remote-endpoint =3D <&hdmi0_in>; > }; > }; > > port@1 { > reg =3D <1>; > dpi0_in: endpoint { > remote-endpoint =3D <&bls_out>; > }; > }; > }; > }; > > &hdmi0 { > > ports { > #address-cells =3D <1>; > #size-cells =3D <0>; > port@0 { > reg =3D <0>; > hdmi0_in: endpoint { > remote-endpoint =3D <&dpi0_out>; > }; > }; > > port@1 { > reg =3D <1>; > hdmi0_out: endpoint { > remote-endpoint =3D <&hdmi_connector_in>; > }; > }; > }; > }; > > regards Frank