[{"id":1771104,"web_url":"http://patchwork.ozlabs.org/comment/1771104/","msgid":"<20170919144621.eledmglqgn7nf7zp@rob-hp-laptop>","list_archive_url":null,"date":"2017-09-19T14:46:21","subject":"Re: [PATCH 1/3] dt-bindings: Add document for rockchip RGB output\n\tinterface","submitter":{"id":62529,"url":"http://patchwork.ozlabs.org/api/people/62529/","name":"Rob Herring (Arm)","email":"robh@kernel.org"},"content":"On Thu, Sep 14, 2017 at 11:43:18AM +0800, Sandy Huang wrote:\n> This path add support rv1108 rgb output interface driver.\n> \n> Signed-off-by: Sandy Huang <hjc@rock-chips.com>\n> ---\n>  .../bindings/display/rockchip/rockchip-rgb.txt     | 80 ++++++++++++++++++++++\n>  1 file changed, 80 insertions(+)\n>  create mode 100644 Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n> \n> diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt b/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n> new file mode 100644\n> index 0000000..4164512\n> --- /dev/null\n> +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n> @@ -0,0 +1,80 @@\n> +Rockchip RV1108 RGB interface\n> +================================\n> +\n> +Required properties:\n> +- compatible: matching the soc type:\n> +\t- \"rockchip,rv1108-rgb\";\n> +\n> +Optional properties:\n> +- pinctrl-names: must contain a \"lcdc\" entry.\n> +- pinctrl-0: pin control group to be used for this interface.\n> +\n> +Required nodes:\n> +- rockchip,rgb-mode: should be \"p888\", \"p666\", \"p565\", \"s888\", \"s888-dummy\"\n\nThis should be a standard property. Any device with a parallel interface \nis going to need something like this.\n\n> +\t- p888: output r8-g8-b8 at each dclk cycle for per-pixel\n> +\t- p666: output r6-g6-b6 at each dclk cycle for per-pixel\n> +\t- p565: output r5-g6-b5 at each dclk cycle for per-pixel\n> +\t- s888: output r8-g8-b8 in three dclk cycle for per-pixel\n> +\t- s888-dmmy: output r8-g8-b8-dummy in four dclk cycle for per-pixel\n> +\n> +The rgb has two video ports described by:\n> +\tDocumentation/devicetree/bindings/media/video-interfaces.txt\n> +Their connections are modeled using the OF graph bindings specified in\n> +\tDocumentation/devicetree/bindings/graph.txt.\n> +\n> +- video port 0 for the VOP input, the remote endpoint maybe vopb/vopl/vop\n> +- video port 1 for either a panel or subsequent encoder\n> +\n> +the panel described by:\n> +\tDocumentation/devicetree/bindings/display/panel/simple-panel.txt\n> +Panel other required properties:\n> +- ports for remote rgb output.\n> +\n> +Example:\n> +\n> +panel: panel {\n> +\tcompatible = \"auo,b101ean01\";\n> +\tenable-gpios = <&gpio7 21 GPIO_ACTIVE_HIGH>;\n> +\n> +\tports {\n> +\t\tpanel_in_rgb: endpoint {\n> +\t\t\tremote-endpoint = <&rgb_out_panel>;\n> +\t\t};\n> +\t};\n> +};\n> +\n> +For Rockchip RV1108:\n> +\n> +\trgb: rgb {\n> +\t\tcompatible = \"rockchip,rv1108-rgb\";\n> +\t\tpinctrl-names = \"lcdc\";\n> +\t\tpinctrl-0 = <&lcdc_ctl>;\n> +\t\trockchip,rgb-mode = \"p888\";\n> +\n> +\t\tports {\n> +\t\t\t#address-cells = <1>;\n> +\t\t\t#size-cells = <0>;\n> +\n> +\t\t\trgb_in: port@0 {\n> +\t\t\t\treg = <0>;\n> +\t\t\t\t#address-cells = <1>;\n> +\t\t\t\t#size-cells = <0>;\n> +\n> +\t\t\t\trgb_in_vop: endpoint@0 {\n> +\t\t\t\t\treg = <0>;\n\nDon't need reg for a single endpoint.\n\n> +\t\t\t\t\tremote-endpoint = <&vop_out_rgb>;\n> +\t\t\t\t};\n> +\t\t\t};\n> +\n> +\t\t\trgb_out: port@1 {\n> +\t\t\t\treg = <1>;\n> +\t\t\t\t#address-cells = <1>;\n> +\t\t\t\t#size-cells = <0>;\n> +\n> +\t\t\t\trgb_out_panel: endpoint@0 {\n> +\t\t\t\t\treg = <0>;\n\nditto.\n\n> +\t\t\t\t\tremote-endpoint = <&panel_in_rgb>;\n> +\t\t\t\t};\n> +\t\t\t};\n> +\t\t};\n> +\t};\n> -- \n> 2.7.4\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"txRVTfGY\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxQgg18yPz9sBZ\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 00:46:55 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duJnX-0002un-GG; Tue, 19 Sep 2017 14:46:51 +0000","from mail-io0-f193.google.com ([209.85.223.193])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duJnS-0002pZ-AS; Tue, 19 Sep 2017 14:46:48 +0000","by mail-io0-f193.google.com with SMTP id g32so5087751ioj.1;\n\tTue, 19 Sep 2017 07:46:24 -0700 (PDT)","from localhost (rrcs-67-78-118-34.sw.biz.rr.com. [67.78.118.34])\n\tby smtp.gmail.com with ESMTPSA id\n\t68sm338554otr.72.2017.09.19.07.46.22\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 19 Sep 2017 07:46:23 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=RCUN855lIMDeXH7PLVpvD3prDqMQc6olO4f80GBaCuA=;\n\tb=txRVTfGYJ/QdWV\n\tynpDwvGcPN+zYYirJDiPYg/AajSDZ1DbC/gMD/636nPNBShOyg9krNkvx7qBBYLSZxz9NlMWjfqUD\n\tWGeU9Zwh4+wnZJXsPHCsI2qsX29PJ0xGZodBnu1s6+KI1vLG/lpOYISOWxRMyzWrFAHzBCkpZk9Ae\n\tPKC0Ch9fvWGXYEdGgIibfXRFx3x8fE3D8PfjO8DDCJtuenYCJ6jpww/nRHI5ELyBjQW7VlJwfxlEm\n\tyyQzxjvmPdVBl6FEoX22OwKhxLJvzGfe9sXrzvl0TyGZG9lZDC3fvJ+N8PpGLq7Awo5/Cp3/8StZd\n\tjizzettydY7FjWEwSEmg==;","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=phjJ+Q0TJNiSp0RMkZVugRS1kLbQwRuKu9LksotFaek=;\n\tb=rTTFtRWKuff1mYZxrCftJThs1vH39u4fGTH4rOydfk7v0eK5G8P14VgutAsJirO1yc\n\t3uKWnoe//BFkYTeNkfTpF/QIIwfrYj/rYoRohybEkGaG4q3NpV6A2nm+7tst5nTVjg6e\n\ti6Cmw/Swp1Qh8lsFSlZoGvWNCG0oup2Bu2lctxlOvaF4MpkM9Rkh7noul2TpN4WbRvXX\n\tTdn1Fd+GDzO8/W/WfVqjsuxsIHc+3y8Yqx9/+vAqqbDWSfvHHSMgYI+VCO12DwjeJcwA\n\tUKAm45mlz6kRM06z7OI8FYg/gxeIeXe7GDj8WCqAWek4VqKK8ZG1jj+aFklG2vHsLh7V\n\tV2tA==","X-Gm-Message-State":"AHPjjUj53ELHzYDqzKDpcahimUXsdYu8n53+bGu0jn3aQdz8Cl13CK9S\n\tF9dBk+lHHWfZK4rf9VMSLQ==","X-Google-Smtp-Source":"AOwi7QAE+l89I4HlvRjK3kZW8PnEn2c295uxNJOHEDJyhMcAIJ2uuqLo9znb0i890nWveFRe8UNqqg==","X-Received":"by 10.202.80.145 with SMTP id e139mr1693169oib.80.1505832383895; \n\tTue, 19 Sep 2017 07:46:23 -0700 (PDT)","Date":"Tue, 19 Sep 2017 09:46:21 -0500","From":"Rob Herring <robh@kernel.org>","To":"Sandy Huang <hjc@rock-chips.com>","Subject":"Re: [PATCH 1/3] dt-bindings: Add document for rockchip RGB output\n\tinterface","Message-ID":"<20170919144621.eledmglqgn7nf7zp@rob-hp-laptop>","References":"<1505360594-196508-1-git-send-email-hjc@rock-chips.com>\n\t<1505360600-196567-1-git-send-email-hjc@rock-chips.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<1505360600-196567-1-git-send-email-hjc@rock-chips.com>","User-Agent":"NeoMutt/20170113 (1.7.2)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170919_074646_429128_62592402 ","X-CRM114-Status":"GOOD (  14.20  )","X-Spam-Score":"-3.8 (---)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-3.8 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t0.5 RCVD_IN_SORBS_SPAM     RBL: SORBS: sender is a spam source\n\t[209.85.223.193 listed in dnsbl.sorbs.net]\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [209.85.223.193 listed in list.dnswl.org]\n\t-2.8 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)\n\t[209.85.223.193 listed in wl.mailspike.net]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends\n\tin digit (robherring2[at]gmail.com)\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (robherring2[at]gmail.com)\n\t0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level\n\tmail domains are different\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and\n\tEnvelopeFrom freemail headers are different","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, devicetree@vger.kernel.org,\n\tHeiko Stuebner <heiko@sntech.de>, David Airlie <airlied@linux.ie>,\n\tlinux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tlinux-rockchip@lists.infradead.org,\n\tlinux-arm-kernel@lists.infradead.org, Mark Yao <mark.yao@rock-chips.com>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1771446,"web_url":"http://patchwork.ozlabs.org/comment/1771446/","msgid":"<20170919230243.eh2algukl7bn7cr3@art_vandelay>","list_archive_url":null,"date":"2017-09-19T23:02:43","subject":"Re: [PATCH 2/3] drm/rockchip: Add support for Rockchip Soc RGB\n\toutput interface","submitter":{"id":64593,"url":"http://patchwork.ozlabs.org/api/people/64593/","name":"Sean Paul","email":"seanpaul@chromium.org"},"content":"On Thu, Sep 14, 2017 at 11:43:23AM +0800, Sandy Huang wrote:\n> Like rockchip rv1108 crtc can directly output parallel and serial\n> RGB data to panel or conversion chip, so we add this driver to\n> probe encoder and connector.\n> \n> Signed-off-by: Sandy Huang <hjc@rock-chips.com>\n> ---\n>  drivers/gpu/drm/rockchip/Kconfig            |   9 +\n>  drivers/gpu/drm/rockchip/Makefile           |   1 +\n>  drivers/gpu/drm/rockchip/rockchip_drm_drv.c |   2 +\n>  drivers/gpu/drm/rockchip/rockchip_drm_drv.h |   1 +\n>  drivers/gpu/drm/rockchip/rockchip_rgb.c     | 327 ++++++++++++++++++++++++++++\n>  5 files changed, 340 insertions(+)\n>  create mode 100644 drivers/gpu/drm/rockchip/rockchip_rgb.c\n> \n> diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig\n> index 0c31f0a..ff1c781 100644\n> --- a/drivers/gpu/drm/rockchip/Kconfig\n> +++ b/drivers/gpu/drm/rockchip/Kconfig\n> @@ -8,6 +8,7 @@ config DRM_ROCKCHIP\n>  \tselect DRM_ANALOGIX_DP if ROCKCHIP_ANALOGIX_DP\n>  \tselect DRM_DW_HDMI if ROCKCHIP_DW_HDMI\n>  \tselect DRM_MIPI_DSI if ROCKCHIP_DW_MIPI_DSI\n> +\tselect DRM_RGB if ROCKCHIP_RGB\n>  \tselect SND_SOC_HDMI_CODEC if ROCKCHIP_CDN_DP && SND_SOC\n>  \thelp\n>  \t  Choose this option if you have a Rockchip soc chipset.\n> @@ -65,4 +66,12 @@ config ROCKCHIP_LVDS\n>  \t  Rockchip rk3288 SoC has LVDS TX Controller can be used, and it\n>  \t  support LVDS, rgb, dual LVDS output mode. say Y to enable its\n>  \t  driver.\n> +\n> +config ROCKCHIP_RGB\n> +\tbool \"Rockchip RGB support\"\n> +\thelp\n> +\t  Choose this option to enable support for Rockchip RGB output.\n> +\t  Like Rockchip rv1108 SoC CRTC can directly output parallel and\n\nThe wording here is a little awkward. Perhaps change to:\n\nSome Rockchip CRTCs, like rv1108, can directly output parallel and\n...\n\n> +\t  serial RGB format to panel or connect to a conversion chip.\n> +\t  say Y to enable its driver.\n>  endif\n> diff --git a/drivers/gpu/drm/rockchip/Makefile b/drivers/gpu/drm/rockchip/Makefile\n> index a881d2c..f32a17f 100644\n> --- a/drivers/gpu/drm/rockchip/Makefile\n> +++ b/drivers/gpu/drm/rockchip/Makefile\n> @@ -13,5 +13,6 @@ rockchipdrm-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o\n>  rockchipdrm-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o\n>  rockchipdrm-$(CONFIG_ROCKCHIP_INNO_HDMI) += inno_hdmi.o\n>  rockchipdrm-$(CONFIG_ROCKCHIP_LVDS) += rockchip_lvds.o\n> +rockchipdrm-$(CONFIG_ROCKCHIP_RGB) += rockchip_rgb.o\n>  \n>  obj-$(CONFIG_DRM_ROCKCHIP) += rockchipdrm.o\n> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c\n> index 082c251..36e602a 100644\n> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c\n> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c\n> @@ -449,6 +449,8 @@ static int __init rockchip_drm_init(void)\n>  \t\t\t\tCONFIG_ROCKCHIP_LVDS);\n>  \tADD_ROCKCHIP_SUB_DRIVER(rockchip_dp_driver,\n>  \t\t\t\tCONFIG_ROCKCHIP_ANALOGIX_DP);\n> +\tADD_ROCKCHIP_SUB_DRIVER(rockchip_rgb_driver,\n> +\t\t\t\tCONFIG_ROCKCHIP_RGB);\n>  \tADD_ROCKCHIP_SUB_DRIVER(cdn_dp_driver, CONFIG_ROCKCHIP_CDN_DP);\n>  \tADD_ROCKCHIP_SUB_DRIVER(dw_hdmi_rockchip_pltfm_driver,\n>  \t\t\t\tCONFIG_ROCKCHIP_DW_HDMI);\n> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h\n> index 498dfbc..6b0ec7e 100644\n> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h\n> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h\n> @@ -70,5 +70,6 @@ extern struct platform_driver dw_mipi_dsi_driver;\n>  extern struct platform_driver inno_hdmi_driver;\n>  extern struct platform_driver rockchip_dp_driver;\n>  extern struct platform_driver rockchip_lvds_driver;\n> +extern struct platform_driver rockchip_rgb_driver;\n>  extern struct platform_driver vop_platform_driver;\n>  #endif /* _ROCKCHIP_DRM_DRV_H_ */\n> diff --git a/drivers/gpu/drm/rockchip/rockchip_rgb.c b/drivers/gpu/drm/rockchip/rockchip_rgb.c\n> new file mode 100644\n> index 0000000..0f0e6b464\n> --- /dev/null\n> +++ b/drivers/gpu/drm/rockchip/rockchip_rgb.c\n> @@ -0,0 +1,327 @@\n> +/*\n> + * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd\n> + * Author:\n> + *      Sandy Huang <hjc@rock-chips.com>\n> + *\n> + * This software is licensed under the terms of the GNU General Public\n> + * License version 2, as published by the Free Software Foundation, and\n> + * may be copied, distributed, and modified under those terms.\n> + *\n> + * This program is distributed in the hope that it will be useful,\n> + * but WITHOUT ANY WARRANTY; without even the implied warranty of\n> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n> + * GNU General Public License for more details.\n> + */\n> +\n> +#include <drm/drmP.h>\n> +#include <drm/drm_atomic_helper.h>\n> +#include <drm/drm_crtc_helper.h>\n> +#include <drm/drm_dp_helper.h>\n> +#include <drm/drm_panel.h>\n> +#include <drm/drm_of.h>\n> +\n> +#include <linux/component.h>\n> +#include <linux/of_graph.h>\n> +\n> +#include \"rockchip_drm_drv.h\"\n> +#include \"rockchip_drm_vop.h\"\n> +\n> +#define connector_to_rgb(c) container_of(c, struct rockchip_rgb, connector)\n> +#define encoder_to_rgb(c) container_of(c, struct rockchip_rgb, encoder)\n> +\n> +struct rockchip_rgb {\n> +\tstruct device *dev;\n> +\tstruct drm_device *drm_dev;\n> +\tstruct drm_panel *panel;\n> +\tstruct drm_bridge *bridge;\n> +\tstruct drm_connector connector;\n> +\tstruct drm_encoder encoder;\n> +\tstruct dev_pin_info *pins;\n> +\tint output_mode;\n> +};\n> +\n> +static inline int name_to_output_mode(const char *s)\n> +{\n> +\tif (strncmp(s, \"p888\", 4) == 0)\n> +\t\treturn ROCKCHIP_OUT_MODE_P888;\n> +\telse if (strncmp(s, \"p666\", 4) == 0)\n> +\t\treturn ROCKCHIP_OUT_MODE_P666;\n> +\telse if (strncmp(s, \"p565\", 4) == 0)\n> +\t\treturn ROCKCHIP_OUT_MODE_P565;\n> +\telse if (strncmp(s, \"s888\", 4) == 0)\n> +\t\treturn ROCKCHIP_OUT_MODE_S888;\n> +\telse if (strncmp(s, \"s888_dummy\", 10) == 0)\n> +\t\treturn ROCKCHIP_OUT_MODE_S888_DUMMY;\n\nInstead of hardcoding the string lengths, try:\n\n        static const struct {\n                const char *name;\n                int format;\n        } formats[] = {\n                { \"p888\", ROCKCHIP_OUT_MODE_P888 },\n                { \"p666\", ROCKCHIP_OUT_MODE_P666 },\n                { \"p565\", ROCKCHIP_OUT_MODE_P565 },\n                { \"s888\", ROCKCHIP_OUT_MODE_S888 },\n                { \"s888_dummy\", ROCKCHIP_OUT_MODE_S888_DUMMY }\n        };\n        int i;\n\n        for (i = 0; i < ARRAY_SIZE(formats); i++)\n                if (!strncmp(s, formats[i].name, strlen(formats[i].name)))\n                        return formats[i].format;\n\nYes, strlen isn't as performant, but this code only runs once and it's safer.\n\n> +\n> +\treturn -EINVAL;\n> +}\n> +\n> +static const struct drm_connector_funcs rockchip_rgb_connector_funcs = {\n> +\t.fill_modes = drm_helper_probe_single_connector_modes,\n> +\t.destroy = drm_connector_cleanup,\n> +\t.reset = drm_atomic_helper_connector_reset,\n> +\t.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,\n> +\t.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,\n> +};\n> +\n> +static int rockchip_rgb_connector_get_modes(struct drm_connector *connector)\n> +{\n> +\tstruct rockchip_rgb *rgb = connector_to_rgb(connector);\n> +\tstruct drm_panel *panel = rgb->panel;\n> +\n> +\treturn drm_panel_get_modes(panel);\n> +}\n> +\n> +static const\n> +struct drm_connector_helper_funcs rockchip_rgb_connector_helper_funcs = {\n> +\t.get_modes = rockchip_rgb_connector_get_modes,\n> +};\n> +\n> +static void rockchip_rgb_encoder_enable(struct drm_encoder *encoder)\n> +{\n> +\tstruct rockchip_rgb *rgb = encoder_to_rgb(encoder);\n> +\n> +\tdrm_panel_prepare(rgb->panel);\n> +\t/* iomux to LCD data/sync mode */\n> +\tif (rgb->pins && !IS_ERR(rgb->pins->default_state))\n> +\t\tpinctrl_select_state(rgb->pins->p, rgb->pins->default_state);\n> +\n> +\tdrm_panel_enable(rgb->panel);\n> +}\n> +\n> +static void rockchip_rgb_encoder_disable(struct drm_encoder *encoder)\n> +{\n> +\tstruct rockchip_rgb *rgb = encoder_to_rgb(encoder);\n> +\n> +\tdrm_panel_disable(rgb->panel);\n> +\tdrm_panel_unprepare(rgb->panel);\n> +}\n> +\n> +static int\n> +rockchip_rgb_encoder_atomic_check(struct drm_encoder *encoder,\n> +\t\t\t\t   struct drm_crtc_state *crtc_state,\n> +\t\t\t\t   struct drm_connector_state *conn_state)\n> +{\n> +\tstruct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc_state);\n> +\tstruct rockchip_rgb *rgb = encoder_to_rgb(encoder);\n> +\n> +\ts->output_mode = rgb->output_mode;\n> +\ts->output_type = DRM_MODE_CONNECTOR_LVDS;\n> +\n> +\treturn 0;\n> +}\n> +\n> +static const\n> +struct drm_encoder_helper_funcs rockchip_rgb_encoder_helper_funcs = {\n> +\t.enable = rockchip_rgb_encoder_enable,\n> +\t.disable = rockchip_rgb_encoder_disable,\n> +\t.atomic_check = rockchip_rgb_encoder_atomic_check,\n> +};\n> +\n> +static const struct drm_encoder_funcs rockchip_rgb_encoder_funcs = {\n> +\t.destroy = drm_encoder_cleanup,\n> +};\n> +\n> +static const struct of_device_id rockchip_rgb_dt_ids[] = {\n> +\t{\n> +\t\t.compatible = \"rockchip,rv1108-rgb\",\n> +\t},\n> +\t{}\n> +};\n> +MODULE_DEVICE_TABLE(of, rockchip_rgb_dt_ids);\n> +\n> +static int rockchip_rgb_bind(struct device *dev, struct device *master,\n> +\t\t\t     void *data)\n> +{\n> +\tstruct rockchip_rgb *rgb = dev_get_drvdata(dev);\n> +\tstruct drm_device *drm_dev = data;\n> +\tstruct drm_encoder *encoder;\n> +\tstruct drm_connector *connector;\n> +\tstruct device_node *remote = NULL;\n> +\tstruct device_node  *port, *endpoint;\n> +\tu32 endpoint_id;\n> +\tconst char *name;\n> +\tint ret;\n> +\n> +\trgb->drm_dev = drm_dev;\n> +\tport = of_graph_get_port_by_id(dev->of_node, 1);\n> +\tif (!port) {\n> +\t\tDRM_DEV_ERROR(dev,\n> +\t\t\t      \"can't found port point, please init rgb panel port!\\n\");\n> +\t\treturn -EINVAL;\n> +\t}\n> +\tfor_each_child_of_node(port, endpoint) {\n> +\t\tof_property_read_u32(endpoint, \"reg\", &endpoint_id);\n> +\t\tret = drm_of_find_panel_or_bridge(dev->of_node, 1, endpoint_id,\n> +\t\t\t\t\t\t  &rgb->panel, &rgb->bridge);\n> +\t\tif (!ret)\n> +\t\t\tbreak;\n> +\t}\n> +\tif (ret) {\n> +\t\tDRM_DEV_ERROR(dev, \"failed to find panel and bridge node\\n\");\n> +\t\tret  = -EPROBE_DEFER;\n> +\t\tgoto err_put_port;\n> +\t}\n> +\tif (rgb->panel)\n> +\t\tremote = rgb->panel->dev->of_node;\n> +\telse\n> +\t\tremote = rgb->bridge->of_node;\n> +\tif (of_property_read_string(dev->of_node, \"rockchip,rgb-mode\", &name))\n> +\t\t/* default set it as output mode P888 */\n> +\t\trgb->output_mode = ROCKCHIP_OUT_MODE_P888;\n> +\telse\n> +\t\trgb->output_mode = name_to_output_mode(name);\n> +\tif (rgb->output_mode < 0) {\n> +\t\tDRM_DEV_ERROR(dev, \"invalid rockchip,rgb-mode [%s]\\n\", name);\n> +\t\tret = rgb->output_mode;\n> +\t\tgoto err_put_remote;\n> +\t}\n> +\n> +\tencoder = &rgb->encoder;\n> +\tencoder->possible_crtcs = drm_of_find_possible_crtcs(drm_dev,\n> +\t\t\t\t\t\t\t     dev->of_node);\n> +\n> +\tret = drm_encoder_init(drm_dev, encoder, &rockchip_rgb_encoder_funcs,\n> +\t\t\t       DRM_MODE_ENCODER_NONE, NULL);\n> +\tif (ret < 0) {\n> +\t\tDRM_DEV_ERROR(drm_dev->dev,\n> +\t\t\t      \"failed to initialize encoder: %d\\n\", ret);\n> +\t\tgoto err_put_remote;\n> +\t}\n> +\n> +\tdrm_encoder_helper_add(encoder, &rockchip_rgb_encoder_helper_funcs);\n> +\n> +\tif (rgb->panel) {\n> +\t\tconnector = &rgb->connector;\n> +\t\tconnector->dpms = DRM_MODE_DPMS_OFF;\n> +\t\tret = drm_connector_init(drm_dev, connector,\n> +\t\t\t\t\t &rockchip_rgb_connector_funcs,\n> +\t\t\t\t\t DRM_MODE_CONNECTOR_Unknown);\n> +\t\tif (ret < 0) {\n> +\t\t\tDRM_DEV_ERROR(drm_dev->dev,\n> +\t\t\t\t      \"failed to initialize connector: %d\\n\",\n> +\t\t\t\t      ret);\n> +\t\t\tgoto err_free_encoder;\n> +\t\t}\n> +\n> +\t\tdrm_connector_helper_add(connector,\n> +\t\t\t\t\t &rockchip_rgb_connector_helper_funcs);\n> +\n> +\t\tret = drm_mode_connector_attach_encoder(connector, encoder);\n> +\t\tif (ret < 0) {\n> +\t\t\tDRM_DEV_ERROR(drm_dev->dev,\n> +\t\t\t\t      \"failed to attach encoder: %d\\n\", ret);\n> +\t\t\tgoto err_free_connector;\n> +\t\t}\n> +\n> +\t\tret = drm_panel_attach(rgb->panel, connector);\n> +\t\tif (ret < 0) {\n> +\t\t\tDRM_DEV_ERROR(drm_dev->dev,\n> +\t\t\t\t      \"failed to attach panel: %d\\n\", ret);\n> +\t\t\tgoto err_free_connector;\n> +\t\t}\n> +\t} else {\n> +\t\trgb->bridge->encoder = encoder;\n> +\t\tret = drm_bridge_attach(encoder, rgb->bridge, NULL);\n> +\t\tif (ret) {\n> +\t\t\tDRM_DEV_ERROR(drm_dev->dev,\n> +\t\t\t\t      \"failed to attach bridge: %d\\n\", ret);\n> +\t\t\tgoto err_free_encoder;\n> +\t\t}\n> +\t\tencoder->bridge = rgb->bridge;\n> +\t}\n> +\n> +\tof_node_put(remote);\n> +\tof_node_put(port);\n> +\n> +\treturn 0;\n> +\n> +err_free_connector:\n> +\tdrm_connector_cleanup(connector);\n> +err_free_encoder:\n> +\tdrm_encoder_cleanup(encoder);\n> +err_put_remote:\n> +\tof_node_put(remote);\n> +err_put_port:\n> +\tof_node_put(port);\n> +\n> +\treturn ret;\n> +}\n> +\n> +static void rockchip_rgb_unbind(struct device *dev, struct device *master,\n> +\t\t\t\tvoid *data)\n> +{\n> +\tstruct rockchip_rgb *rgb = dev_get_drvdata(dev);\n> +\n> +\trockchip_rgb_encoder_disable(&rgb->encoder);\n> +\tif (rgb->panel)\n> +\t\tdrm_panel_detach(rgb->panel);\n> +\tdrm_connector_cleanup(&rgb->connector);\n> +\tdrm_encoder_cleanup(&rgb->encoder);\n> +}\n> +\n> +static const struct component_ops rockchip_rgb_component_ops = {\n> +\t.bind = rockchip_rgb_bind,\n> +\t.unbind = rockchip_rgb_unbind,\n> +};\n> +\n> +static int rockchip_rgb_probe(struct platform_device *pdev)\n> +{\n> +\tstruct device *dev = &pdev->dev;\n> +\tstruct rockchip_rgb *rgb;\n> +\tconst struct of_device_id *match;\n> +\tint ret;\n> +\n> +\tif (!dev->of_node)\n> +\t\treturn -ENODEV;\n> +\n> +\trgb = devm_kzalloc(&pdev->dev, sizeof(*rgb), GFP_KERNEL);\n> +\tif (!rgb)\n> +\t\treturn -ENOMEM;\n> +\n> +\trgb->dev = dev;\n> +\tmatch = of_match_node(rockchip_rgb_dt_ids, dev->of_node);\n> +\tif (!match)\n> +\t\treturn -ENODEV;\n> +\n> +\trgb->pins = devm_kzalloc(rgb->dev, sizeof(*rgb->pins), GFP_KERNEL);\n> +\tif (!rgb->pins)\n> +\t\treturn -ENOMEM;\n\nCan you please log errors for all of these failing conditions?\n\n> +\trgb->pins->p = devm_pinctrl_get(rgb->dev);\n> +\tif (IS_ERR(rgb->pins->p)) {\n> +\t\tDRM_DEV_ERROR(dev, \"no pinctrl handle\\n\");\n> +\t\tdevm_kfree(rgb->dev, rgb->pins);\n> +\t\trgb->pins = NULL;\n> +\t} else {\n> +\t\trgb->pins->default_state =\n> +\t\t\tpinctrl_lookup_state(rgb->pins->p, \"lcdc\");\n> +\t\tif (IS_ERR(rgb->pins->default_state)) {\n> +\t\t\tDRM_DEV_ERROR(dev, \"no default pinctrl state\\n\");\n> +\t\t\tdevm_kfree(rgb->dev, rgb->pins);\n> +\t\t\trgb->pins = NULL;\n> +\t\t}\n> +\t}\n> +\n> +\tdev_set_drvdata(dev, rgb);\n> +\tret = component_add(&pdev->dev, &rockchip_rgb_component_ops);\n> +\tif (ret < 0)\n> +\t\tDRM_DEV_ERROR(dev, \"failed to add component\\n\");\n> +\n> +\treturn ret;\n> +}\n> +\n> +static int rockchip_rgb_remove(struct platform_device *pdev)\n> +{\n> +\tcomponent_del(&pdev->dev, &rockchip_rgb_component_ops);\n> +\n> +\treturn 0;\n> +}\n> +\n> +struct platform_driver rockchip_rgb_driver = {\n> +\t.probe = rockchip_rgb_probe,\n> +\t.remove = rockchip_rgb_remove,\n> +\t.driver = {\n> +\t\t   .name = \"rockchip-rgb\",\n> +\t\t   .of_match_table = of_match_ptr(rockchip_rgb_dt_ids),\n> +\t},\n> +};\n> -- \n> 2.7.4\n> \n> \n> _______________________________________________\n> dri-devel mailing list\n> dri-devel@lists.freedesktop.org\n> https://lists.freedesktop.org/mailman/listinfo/dri-devel","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"hmaN7wbv\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"A57e5Min\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxdhQ2Pq0z9sPr\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 09:03:18 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duRXt-0000qO-Gu; Tue, 19 Sep 2017 23:03:13 +0000","from mail-pf0-x231.google.com ([2607:f8b0:400e:c00::231])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duRXl-0000jd-NN for linux-arm-kernel@lists.infradead.org;\n\tTue, 19 Sep 2017 23:03:09 +0000","by mail-pf0-x231.google.com with SMTP id g65so564119pfe.13\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tTue, 19 Sep 2017 16:02:45 -0700 (PDT)","from localhost ([2620:0:1000:137c:cb6:d14f:6a2b:fb2a])\n\tby smtp.gmail.com with ESMTPSA id\n\tu31sm4365333pgn.70.2017.09.19.16.02.43\n\t(version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tTue, 19 Sep 2017 16:02:44 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=1JpFlueSCVRJTfUkRMck+t1hLxZWVqepLtCrDfnkmck=;\n\tb=hmaN7wbvAGj9in\n\taqAh4iYYzTlcQE97wZ8YJsshXmkVAym4BM5Tsx1W+6JeYMsgp17SXUqt0qBAESZzClSfY7Im1rUeU\n\t0ZABmUFtCGJ+8OrlOMlVwWp+N7n0Jx8RrkrQzZHDbVvAZUqBRzcImFnSY6nJa1dpuVxUIh2fJLnPT\n\tzE2p9BxuNwJBpsaVeE8vs8oI/AWFLeKXEsgpzfouBZxaYVTv6YhWDmBj9LJqgxNI3S3angvE34nbt\n\t6YELLMYXnkHrUeRV8zzv/OuQmvC6DevG3kT6O9N3ZZ4OneW28ncLuSDgFVhX3KZHSogRUUVcOSwRg\n\tUhNMVL0MQFccbzv6pKQA==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=KD28NyqcYwMAoDPPRYmVqragao/Pm36/eljib4FRewU=;\n\tb=A57e5Minvdo/eDML1kqePgqRXSU5WqUcZMPXvMjfci2N6HwXpU3L1TxF/GAZjzgYcF\n\tZxVAYTGdV9BbMhPxRRVFA2CaZFM1P8HLLeL0KIKXwzmxDJlDXpcnTHamwiyAXaZFbDTw\n\tk+R6wem6FUuVTiF4Zjt3Gb6TFAGIjmo6WAros="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=KD28NyqcYwMAoDPPRYmVqragao/Pm36/eljib4FRewU=;\n\tb=V+0JsIGc+MsRZRKmGbatVtWJ/wuRJR9N5EK0CxqOyNjWaYdg5zDS2+q0ka/BjFZi6z\n\t4DUAiDcmNGNZ41ogVr7aqPAKE1/AB5Wz5ROTnasZRQ7HrO0UNRms8rO9THrl+xqrM80d\n\tqXftOfQe1OL9/yTdoU5O3AxyqMDVILeIhsbS/j4QuRVM8Nrb70FWADU3GzsliwT38wOv\n\tA+5G6YMoj6WkVNNI1QSyOOTry3XboUCRnpXV4ubOcbeSc6xjWe3B5qUnpYyXMJoCo7x8\n\t7+iLyiWdvBeGwFN7fhIRGOfOvbUMsZqaweY265gYn88mYe1xewtu+VzETu09Y8VWEk6r\n\t6heA==","X-Gm-Message-State":"AHPjjUjaV42ik0oWiSBVWNL8Ni++fiN/Wo0QRQ+39WncysaEg0110yo2\n\t09ffeKFLLMFFHNbV8Vs0dNCnhw==","X-Google-Smtp-Source":"AOwi7QBlVWgtyHhoXi67qIuHs1I/op5W0ir9KH5O90+rBX4phtktv5ngCbL2iXtM7ptsLmqEo/2isA==","X-Received":"by 10.99.6.210 with SMTP id 201mr189065pgg.416.1505862164622;\n\tTue, 19 Sep 2017 16:02:44 -0700 (PDT)","Date":"Tue, 19 Sep 2017 16:02:43 -0700","From":"Sean Paul <seanpaul@chromium.org>","To":"Sandy Huang <hjc@rock-chips.com>","Subject":"Re: [PATCH 2/3] drm/rockchip: Add support for Rockchip Soc RGB\n\toutput interface","Message-ID":"<20170919230243.eh2algukl7bn7cr3@art_vandelay>","References":"<1505360594-196508-1-git-send-email-hjc@rock-chips.com>\n\t<1505360606-317-1-git-send-email-hjc@rock-chips.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<1505360606-317-1-git-send-email-hjc@rock-chips.com>","User-Agent":"NeoMutt/20170306-97-7656f1-dirty (1.8.0)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170919_160305_969011_75F164BC ","X-CRM114-Status":"GOOD (  24.65  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:400e:c00:0:0:0:231 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Heiko Stuebner <heiko@sntech.de>, David Airlie <airlied@linux.ie>,\n\tlinux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tlinux-rockchip@lists.infradead.org,\n\tlinux-arm-kernel@lists.infradead.org, Mark Yao <mark.yao@rock-chips.com>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1771447,"web_url":"http://patchwork.ozlabs.org/comment/1771447/","msgid":"<20170919230306.rcctwo5qnfjw26az@art_vandelay>","list_archive_url":null,"date":"2017-09-19T23:03:06","subject":"Re: [PATCH 3/3] drm/rockchip: vop: Add more RGB output interface\n\ttype","submitter":{"id":64593,"url":"http://patchwork.ozlabs.org/api/people/64593/","name":"Sean Paul","email":"seanpaul@chromium.org"},"content":"On Thu, Sep 14, 2017 at 11:43:28AM +0800, Sandy Huang wrote:\n> This patch add serial RGB output interface for rockchip vop, the\n> more info about serial RGB output interface described at the\n> following file:\n> \n> Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n> \n> Signed-off-by: Sandy Huang <hjc@rock-chips.com>\n\nReviewed-by: Sean Paul <seanpaul@chromium.org>\n\n> ---\n>  drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 ++\n>  1 file changed, 2 insertions(+)\n> \n> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\n> index 56bbd2e..59a01c3 100644\n> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\n> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h\n> @@ -209,6 +209,8 @@ struct vop_data {\n>  #define ROCKCHIP_OUT_MODE_P888\t0\n>  #define ROCKCHIP_OUT_MODE_P666\t1\n>  #define ROCKCHIP_OUT_MODE_P565\t2\n> +#define ROCKCHIP_OUT_MODE_S888\t8\n> +#define ROCKCHIP_OUT_MODE_S888_DUMMY\t12\n>  /* for use special outface */\n>  #define ROCKCHIP_OUT_MODE_AAAA\t15\n>  \n> -- \n> 2.7.4\n> \n> \n> _______________________________________________\n> dri-devel mailing list\n> dri-devel@lists.freedesktop.org\n> https://lists.freedesktop.org/mailman/listinfo/dri-devel","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"ftmFIUcp\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"oCP4tYBZ\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxdj73P5bz9sNw\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 09:03:55 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duRYU-0001HL-T2; Tue, 19 Sep 2017 23:03:50 +0000","from mail-pf0-x22c.google.com ([2607:f8b0:400e:c00::22c])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duRY8-0000pC-Hx for linux-arm-kernel@lists.infradead.org;\n\tTue, 19 Sep 2017 23:03:36 +0000","by mail-pf0-x22c.google.com with SMTP id r68so579228pfj.3\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tTue, 19 Sep 2017 16:03:08 -0700 (PDT)","from localhost ([2620:0:1000:137c:cb6:d14f:6a2b:fb2a])\n\tby smtp.gmail.com with ESMTPSA id\n\to17sm4823558pfa.22.2017.09.19.16.03.07\n\t(version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tTue, 19 Sep 2017 16:03:07 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=E0+mpxiRCpwKshm7Cvcx4xbomGm97+MzriZspUBLCkQ=;\n\tb=ftmFIUcpx5Jp1M\n\t6dwBp1Fz8zgYS4X+LeYxtJnZzLlz7SnsL8sAH80xsMA0IL7N74nzmTyXrQ5vXaq0WNaQNfZ1/dFTN\n\tmUesEbxg12HdQ889UGg43erRiNO7QL3kfrTc7MkbSArtiy9xBwOxRdBhC5gXT/LXCsKBXxOosKxJl\n\tYrqhuE9F/URSk7j+L28BWqlc36Y2pucqCkZZ3LkAhgrCbd/aAofdvpq91l07tTgK1yWzSyBeKZGZz\n\tML+ReB7zXBd+r9StaGEhP32l/D3MiFLswX7NIoGtNpNOAMpF8COY2fvwwguEF2gJoICBSF7a2Z51d\n\th3I4lTM6vD31b8TbPh/Q==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=iUfS2/zj7sJCZqOJwtFAyx4QzwR3wXkI2ykrEQFZGmE=;\n\tb=oCP4tYBZG2bFNjVa1qX2A6f37OwqyZOQTK6NJRp13vT40kXyGv3FUE8ZrmK1/NlrGG\n\tB2Wfzv/dqJNMkt1XNMf7J9KhCOXDAtwtF01dCl5J25SjuQf1skVzMblWkI5oNLJvogxn\n\tCfAVTjbrMfSfKj19PBgrIClyDvlGsnGOPghts="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=iUfS2/zj7sJCZqOJwtFAyx4QzwR3wXkI2ykrEQFZGmE=;\n\tb=fScIb7mxWm2YSSVm0OS2W4mQxH/EgMdsTgkR2PgIOqBBmoQUbYkwSprtz2NfMsx3VT\n\tP8EXx7oV5Ifuxop6hti4HVcIqHr7KFwQs310D/keXLoCg0ZmHPVXUB6YfB1G7WtmDoG0\n\tmvUi/U/3f0yXinWVMxlNaal8+ZXgCaVLZP6onDuL7IfRCw5O/gHgJ5Jv6et6JEnEKVOh\n\tMPH1ohzFrZrJ25QGFnJicY413aqbXAGdMYdhAdPF3+CSCy/vhWHGzGqzLLQeIWq/iN+C\n\tqc0lOBiLzzQZoRSC3xyzFWFfEihieUbjgpZPAs+Y6eoam5Cix5fw57fth4XcS4Hf5qco\n\tGS3A==","X-Gm-Message-State":"AHPjjUhj2ZzCnH5f6Mp1KrXBey0XVwkfPECGlgbjP2Jjiqm63sJQZcKw\n\tsFsROl9pBaNypf6WCnkimBGXng==","X-Google-Smtp-Source":"AOwi7QDOtnRIPpVvP+U/4rONYKKvZUrk9eJphFz8j1Nsl1RODbqIKSrJqjy2Q4bYXr3f57tXp8eW8g==","X-Received":"by 10.84.241.201 with SMTP id t9mr183014plm.154.1505862187943;\n\tTue, 19 Sep 2017 16:03:07 -0700 (PDT)","Date":"Tue, 19 Sep 2017 16:03:06 -0700","From":"Sean Paul <seanpaul@chromium.org>","To":"Sandy Huang <hjc@rock-chips.com>","Subject":"Re: [PATCH 3/3] drm/rockchip: vop: Add more RGB output interface\n\ttype","Message-ID":"<20170919230306.rcctwo5qnfjw26az@art_vandelay>","References":"<1505360594-196508-1-git-send-email-hjc@rock-chips.com>\n\t<1505360608-377-1-git-send-email-hjc@rock-chips.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<1505360608-377-1-git-send-email-hjc@rock-chips.com>","User-Agent":"NeoMutt/20170306-97-7656f1-dirty (1.8.0)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170919_160329_628311_DCC0BE12 ","X-CRM114-Status":"GOOD (  13.31  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:400e:c00:0:0:0:22c listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Heiko Stuebner <heiko@sntech.de>, David Airlie <airlied@linux.ie>,\n\tlinux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tlinux-rockchip@lists.infradead.org,\n\tlinux-arm-kernel@lists.infradead.org, Mark Yao <mark.yao@rock-chips.com>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1771497,"web_url":"http://patchwork.ozlabs.org/comment/1771497/","msgid":"<d631ff56-e3e6-688f-d9b6-a7101ce047d5@rock-chips.com>","list_archive_url":null,"date":"2017-09-20T01:51:30","subject":"Re: [PATCH 1/3] dt-bindings: Add document for rockchip RGB output\n\tinterface","submitter":{"id":72133,"url":"http://patchwork.ozlabs.org/api/people/72133/","name":"Huang Jiachai","email":"hjc@rock-chips.com"},"content":"Hi rob,\n     thanks for you review.\n\n在 2017/9/19 22:46, Rob Herring 写道:\n> On Thu, Sep 14, 2017 at 11:43:18AM +0800, Sandy Huang wrote:\n>> This path add support rv1108 rgb output interface driver.\n>>\n>> Signed-off-by: Sandy Huang <hjc@rock-chips.com>\n>> ---\n>>   .../bindings/display/rockchip/rockchip-rgb.txt     | 80 ++++++++++++++++++++++\n>>   1 file changed, 80 insertions(+)\n>>   create mode 100644 Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>>\n>> diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt b/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>> new file mode 100644\n>> index 0000000..4164512\n>> --- /dev/null\n>> +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>> @@ -0,0 +1,80 @@\n>> +Rockchip RV1108 RGB interface\n>> +================================\n>> +\n>> +Required properties:\n>> +- compatible: matching the soc type:\n>> +\t- \"rockchip,rv1108-rgb\";\n>> +\n>> +Optional properties:\n>> +- pinctrl-names: must contain a \"lcdc\" entry.\n>> +- pinctrl-0: pin control group to be used for this interface.\n>> +\n>> +Required nodes:\n>> +- rockchip,rgb-mode: should be \"p888\", \"p666\", \"p565\", \"s888\", \"s888-dummy\"\n> \n> This should be a standard property. Any device with a parallel interface\n> is going to need something like this.\n> \nso, i need to move this property to panel? or just rename \nrockchip,rgb-mode to rgb-mode?\n\n>> +\t- p888: output r8-g8-b8 at each dclk cycle for per-pixel\n>> +\t- p666: output r6-g6-b6 at each dclk cycle for per-pixel\n>> +\t- p565: output r5-g6-b5 at each dclk cycle for per-pixel\n>> +\t- s888: output r8-g8-b8 in three dclk cycle for per-pixel\n>> +\t- s888-dmmy: output r8-g8-b8-dummy in four dclk cycle for per-pixel\n>> +\n>> +The rgb has two video ports described by:\n>> +\tDocumentation/devicetree/bindings/media/video-interfaces.txt\n>> +Their connections are modeled using the OF graph bindings specified in\n>> +\tDocumentation/devicetree/bindings/graph.txt.\n>> +\n>> +- video port 0 for the VOP input, the remote endpoint maybe vopb/vopl/vop\n>> +- video port 1 for either a panel or subsequent encoder\n>> +\n>> +the panel described by:\n>> +\tDocumentation/devicetree/bindings/display/panel/simple-panel.txt\n>> +Panel other required properties:\n>> +- ports for remote rgb output.\n>> +\n>> +Example:\n>> +\n>> +panel: panel {\n>> +\tcompatible = \"auo,b101ean01\";\n>> +\tenable-gpios = <&gpio7 21 GPIO_ACTIVE_HIGH>;\n>> +\n>> +\tports {\n>> +\t\tpanel_in_rgb: endpoint {\n>> +\t\t\tremote-endpoint = <&rgb_out_panel>;\n>> +\t\t};\n>> +\t};\n>> +};\n>> +\n>> +For Rockchip RV1108:\n>> +\n>> +\trgb: rgb {\n>> +\t\tcompatible = \"rockchip,rv1108-rgb\";\n>> +\t\tpinctrl-names = \"lcdc\";\n>> +\t\tpinctrl-0 = <&lcdc_ctl>;\n>> +\t\trockchip,rgb-mode = \"p888\";\n>> +\n>> +\t\tports {\n>> +\t\t\t#address-cells = <1>;\n>> +\t\t\t#size-cells = <0>;\n>> +\n>> +\t\t\trgb_in: port@0 {\n>> +\t\t\t\treg = <0>;\n>> +\t\t\t\t#address-cells = <1>;\n>> +\t\t\t\t#size-cells = <0>;\n>> +\n>> +\t\t\t\trgb_in_vop: endpoint@0 {\n>> +\t\t\t\t\treg = <0>;\n> \n> Don't need reg for a single endpoint.\n> \nok, this will be deleted at next version.\n>> +\t\t\t\t\tremote-endpoint = <&vop_out_rgb>;\n>> +\t\t\t\t};\n>> +\t\t\t};\n>> +\n>> +\t\t\trgb_out: port@1 {\n>> +\t\t\t\treg = <1>;\n>> +\t\t\t\t#address-cells = <1>;\n>> +\t\t\t\t#size-cells = <0>;\n>> +\n>> +\t\t\t\trgb_out_panel: endpoint@0 {\n>> +\t\t\t\t\treg = <0>;\n> \n> ditto.\n> \nok, this will be deleted at next version.\n>> +\t\t\t\t\tremote-endpoint = <&panel_in_rgb>;\n>> +\t\t\t\t};\n>> +\t\t\t};\n>> +\t\t};\n>> +\t};\n>> -- \n>> 2.7.4\n>>\n>>\n> \n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"TYg3SxJz\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxjRW5vlBz9sPt\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 11:52:23 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duUBW-0007mK-6Q; Wed, 20 Sep 2017 01:52:18 +0000","from regular1.263xmail.com ([211.150.99.136])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duUBI-0007bi-Sz; Wed, 20 Sep 2017 01:52:15 +0000","from hjc?rock-chips.com (unknown [192.168.167.183])\n\tby regular1.263xmail.com (Postfix) with ESMTP id 2291983;\n\tWed, 20 Sep 2017 09:51:34 +0800 (CST)","from [172.16.10.72] (localhost [127.0.0.1])\n\tby smtp.263.net (Postfix) with ESMTPA id C317537E;\n\tWed, 20 Sep 2017 09:51:29 +0800 (CST)","from [172.16.10.72] (unknown [58.22.7.114])\n\tby smtp.263.net (Postfix) whith ESMTP id 13721I7YGX2;\n\tWed, 20 Sep 2017 09:51:32 +0800 (CST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:\n\tContent-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From:\n\tReferences:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=qK+VOVZaI+lMLBnCchxGazRciFQdkulTYrvmvPMf0Zo=;\n\tb=TYg3SxJz1FjfalhZC+eoQsLio\n\tQ5cV/rVtFeOBLx2lSxTtAcZ7+l1RiVao1+lQ4sGaQXGg8QUFnIU9w3bKB/ZJwToMjjbTXeaRBODPq\n\t9BY5Mg6TXgRSIj0l8qsOFjs67IX9cZ8LlJM6V8U55zn5H3jXNa/QrBnIABVU9Kopd6YOxdyqAwFRT\n\tyHyB/Kfc95wduxkbdy+u/vSeosPvHHZ6KbRlUCzKFyMq04sdh8ABg9mxKLswK70Zxj6VdHtvN97mR\n\tBUuttQQK4vV1uhkn114LAxU4zSCa25BXLN6nZX8HVgAxbNBU7yZDqWAzcyrjifxpui+HGzl0x3nz6\n\tfxl/ODISA==;","X-263anti-spam":"KSV:0;","X-MAIL-GRAY":"0","X-MAIL-DELIVERY":"1","X-KSVirus-check":"0","X-ABS-CHECKED":"4","X-RL-SENDER":"hjc@rock-chips.com","X-FST-TO":"sandy.huang@rock-chips.com","X-SENDER-IP":"58.22.7.114","X-LOGIN-NAME":"hjc@rock-chips.com","X-UNIQUE-TAG":"<cfbb4c939045f161b24d74a07b42bda8>","X-ATTACHMENT-NUM":"0","X-SENDER":"hjc@rock-chips.com","X-DNS-TYPE":"0","Subject":"Re: [PATCH 1/3] dt-bindings: Add document for rockchip RGB output\n\tinterface","To":"Rob Herring <robh@kernel.org>","References":"<1505360594-196508-1-git-send-email-hjc@rock-chips.com>\n\t<1505360600-196567-1-git-send-email-hjc@rock-chips.com>\n\t<20170919144621.eledmglqgn7nf7zp@rob-hp-laptop>","From":"Sandy Huang <hjc@rock-chips.com>","Message-ID":"<d631ff56-e3e6-688f-d9b6-a7101ce047d5@rock-chips.com>","Date":"Wed, 20 Sep 2017 09:51:30 +0800","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170919144621.eledmglqgn7nf7zp@rob-hp-laptop>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170919_185206_054790_A03B829C ","X-CRM114-Status":"GOOD (  10.88  )","X-Spam-Score":"0.6 (/)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (0.6 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [211.150.99.136 listed in list.dnswl.org]\n\t0.5 RCVD_IN_SORBS_SPAM     RBL: SORBS: sender is a spam source\n\t[58.22.7.114 listed in dnsbl.sorbs.net]\n\t1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server\n\t-2.8 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)\n\t[211.150.99.136 listed in wl.mailspike.net]\n\t3.3 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS\n\t[58.22.7.114 listed in zen.spamhaus.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, devicetree@vger.kernel.org,\n\tHeiko Stuebner <heiko@sntech.de>, David Airlie <airlied@linux.ie>,\n\tlinux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tlinux-rockchip@lists.infradead.org,\n\tlinux-arm-kernel@lists.infradead.org, Mark Yao <mark.yao@rock-chips.com>","Content-Transfer-Encoding":"base64","Content-Type":"text/plain; charset=\"gbk\"; Format=\"flowed\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1771522,"web_url":"http://patchwork.ozlabs.org/comment/1771522/","msgid":"<6cd1ac0d-bc99-f8f3-15da-799f8623ce65@rock-chips.com>","list_archive_url":null,"date":"2017-09-20T02:57:29","subject":"Re: [PATCH 1/3] dt-bindings: Add document for rockchip RGB output\n\tinterface","submitter":{"id":72133,"url":"http://patchwork.ozlabs.org/api/people/72133/","name":"Huang Jiachai","email":"hjc@rock-chips.com"},"content":"在 2017/9/20 9:51, Sandy Huang 写道:\n> Hi rob,\n>      thanks for you review.\n> \n> 在 2017/9/19 22:46, Rob Herring 写道:\n>> On Thu, Sep 14, 2017 at 11:43:18AM +0800, Sandy Huang wrote:\n>>> This path add support rv1108 rgb output interface driver.\n>>>\n>>> Signed-off-by: Sandy Huang <hjc@rock-chips.com>\n>>> ---\n>>>   .../bindings/display/rockchip/rockchip-rgb.txt     | 80 \n>>> ++++++++++++++++++++++\n>>>   1 file changed, 80 insertions(+)\n>>>   create mode 100644 \n>>> Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>>>\n>>> diff --git \n>>> a/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt \n>>> b/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>>> new file mode 100644\n>>> index 0000000..4164512\n>>> --- /dev/null\n>>> +++ \n>>> b/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>>> @@ -0,0 +1,80 @@\n>>> +Rockchip RV1108 RGB interface\n>>> +================================\n>>> +\n>>> +Required properties:\n>>> +- compatible: matching the soc type:\n>>> +    - \"rockchip,rv1108-rgb\";\n>>> +\n>>> +Optional properties:\n>>> +- pinctrl-names: must contain a \"lcdc\" entry.\n>>> +- pinctrl-0: pin control group to be used for this interface.\n>>> +\n>>> +Required nodes:\n>>> +- rockchip,rgb-mode: should be \"p888\", \"p666\", \"p565\", \"s888\", \n>>> \"s888-dummy\"\n>>\n>> This should be a standard property. Any device with a parallel interface\n>> is going to need something like this.\n>>\n> so, i need to move this property to panel? or just rename \n> rockchip,rgb-mode to rgb-mode?\n> \n>>> +    - p888: output r8-g8-b8 at each dclk cycle for per-pixel\n>>> +    - p666: output r6-g6-b6 at each dclk cycle for per-pixel\n>>> +    - p565: output r5-g6-b5 at each dclk cycle for per-pixel\n>>> +    - s888: output r8-g8-b8 in three dclk cycle for per-pixel\n>>> +    - s888-dmmy: output r8-g8-b8-dummy in four dclk cycle for per-pixel\n>>> +\n>>> +The rgb has two video ports described by:\n>>> +    Documentation/devicetree/bindings/media/video-interfaces.txt\n>>> +Their connections are modeled using the OF graph bindings specified in\n>>> +    Documentation/devicetree/bindings/graph.txt.\n>>> +\n>>> +- video port 0 for the VOP input, the remote endpoint maybe \n>>> vopb/vopl/vop\n>>> +- video port 1 for either a panel or subsequent encoder\n>>> +\n>>> +the panel described by:\n>>> +    Documentation/devicetree/bindings/display/panel/simple-panel.txt\n>>> +Panel other required properties:\n>>> +- ports for remote rgb output.\n>>> +\n>>> +Example:\n>>> +\n>>> +panel: panel {\n>>> +    compatible = \"auo,b101ean01\";\n>>> +    enable-gpios = <&gpio7 21 GPIO_ACTIVE_HIGH>;\n>>> +\n>>> +    ports {\n>>> +        panel_in_rgb: endpoint {\n>>> +            remote-endpoint = <&rgb_out_panel>;\n>>> +        };\n>>> +    };\n>>> +};\n>>> +\n>>> +For Rockchip RV1108:\n>>> +\n>>> +    rgb: rgb {\n>>> +        compatible = \"rockchip,rv1108-rgb\";\n>>> +        pinctrl-names = \"lcdc\";\n>>> +        pinctrl-0 = <&lcdc_ctl>;\n>>> +        rockchip,rgb-mode = \"p888\";\n>>> +\n>>> +        ports {\n>>> +            #address-cells = <1>;\n>>> +            #size-cells = <0>;\n>>> +\n>>> +            rgb_in: port@0 {\n>>> +                reg = <0>;\n>>> +                #address-cells = <1>;\n>>> +                #size-cells = <0>;\n>>> +\n>>> +                rgb_in_vop: endpoint@0 {\n>>> +                    reg = <0>;\n>>\n>> Don't need reg for a single endpoint.\n>>\n> ok, this will be deleted at next version.\n>>> +                    remote-endpoint = <&vop_out_rgb>;\n>>> +                };\n>>> +            };\n>>> +\n>>> +            rgb_out: port@1 {\n>>> +                reg = <1>;\n>>> +                #address-cells = <1>;\n>>> +                #size-cells = <0>;\n>>> +\n>>> +                rgb_out_panel: endpoint@0 {\n>>> +                    reg = <0>;\n>>\n>> ditto.\n>>\n> ok, this will be deleted at next version.\nsorry,this can't be deleted, because rgb output remote endpoint maybe \npanel or convert chip, the dts node maybe like this:\n\npanel: panel {\n\tstatus = \"disabled\";\n\tports {\n\t\tpanel_in_rgb: endpoint {\n\t\t\tremote-endpoint =  <&rgb_out_panel>;\n\t\t};\n\t};\n};\n\nbridge: bridge {\n\tstatus = \"okay\";\n\tports {\n\t\tbridge_in_rgb: endpoint {\n\t\t\tremote-endpoint =  <&rgb_out_bridge>;\n\t\t};\n\t};\n};\n\nrgb_out: port@1 {\n\treg = <1>;\n\t#address-cells = <1>;\n\t#size-cells = <0>;\n\trgb_out_panel: endpoint@0 {\n\t\t reg = <0>;\n\t\tremote-endpoint = <&panel_in_rgb>;\n\t};\n\trgb_out_bridge: endpoint@1 {\n\t\t reg = <1>;\n\t\tremote-endpoint = <&bridge_in_rgb>;\n\t};\n  };\n\nso rockchip_rgb_bind() @ rockchip_rgb.c use reg id to find the remote \nactived endpoint.\n\nfor_each_child_of_node(port, endpoint) {\n\tof_property_read_u32(endpoint, \"reg\", &endpoint_id);\n\tret = drm_of_find_panel_or_bridge(dev->of_node, 1, endpoint_id, \n&rgb->panel, &rgb->bridge);\n\tif (!ret)\n\t\tbreak;\n}\n\n>>> +                    remote-endpoint = <&panel_in_rgb>;\n>>> +                };\n>>> +            };\n>>> +        };\n>>> +    };\n>>> -- \n>>> 2.7.4\n>>>\n>>>\n>>\n>>\n>>\n> \n> \n> _______________________________________________\n> Linux-rockchip mailing list\n> Linux-rockchip@lists.infradead.org\n> http://lists.infradead.org/mailman/listinfo/linux-rockchip","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"JBzwNpfL\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxkvp5PzBz9s82\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 12:58:19 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duVDK-00073X-02; Wed, 20 Sep 2017 02:58:14 +0000","from regular1.263xmail.com ([211.150.99.140])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duVDD-0006sL-4Z; Wed, 20 Sep 2017 02:58:10 +0000","from hjc?rock-chips.com (unknown [192.168.167.243])\n\tby regular1.263xmail.com (Postfix) with ESMTP id F28B64BA2;\n\tWed, 20 Sep 2017 10:57:37 +0800 (CST)","from [172.16.10.72] (localhost [127.0.0.1])\n\tby smtp.263.net (Postfix) with ESMTPA id 271223CB;\n\tWed, 20 Sep 2017 10:57:28 +0800 (CST)","from [172.16.10.72] (unknown [58.22.7.114])\n\tby smtp.263.net (Postfix) whith ESMTP id 28351RVLT7P;\n\tWed, 20 Sep 2017 10:57:36 +0800 (CST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:\n\tContent-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References:\n\tTo:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=v57rF0BUVPo84HH3WUfyKqHDB2p9Zx+amQxjdhHL3yA=;\n\tb=JBzwNpfLmZEaOzzZxhPQulZat\n\tWk8/bRNJB3DSAtzuMYLPw9oBdiAQBwb6pONjmjMCeRd6mhhj9PHrt4QVW7mpD6odmoniEAeXF7Z7K\n\tQ7KW5V6s0qWgQ3NXSIXYdxQTiGYX4lcAfpoQXMqb2kpyB3QInzzGtQvNt2iUznVzpq6ELAAamrh7E\n\tIyZ7N0FU9LGV3FpeOvvmfdEQI83344Y1frU4psPx57p/mvv3JtnpIFAzmGuCxq8J87wMPbgwNKGD+\n\tKOpjztSpplDknzlstoMhb97Ha2ArZNGkO5B7wRDsIOZ24Sa8TnAP2wj2lYe2C49U/WZ+MlwWLzZSH\n\tSryENMyDQ==;","X-263anti-spam":"KSV:0;","X-MAIL-GRAY":"0","X-MAIL-DELIVERY":"1","X-KSVirus-check":"0","X-ABS-CHECKED":"4","X-RL-SENDER":"hjc@rock-chips.com","X-FST-TO":"sandy.huang@rock-chips.com","X-SENDER-IP":"58.22.7.114","X-LOGIN-NAME":"hjc@rock-chips.com","X-UNIQUE-TAG":"<43072b398eded7d626b2c883542633c5>","X-ATTACHMENT-NUM":"0","X-SENDER":"hjc@rock-chips.com","X-DNS-TYPE":"0","Subject":"Re: [PATCH 1/3] dt-bindings: Add document for rockchip RGB output\n\tinterface","From":"Sandy Huang <hjc@rock-chips.com>","To":"Rob Herring <robh@kernel.org>","References":"<1505360594-196508-1-git-send-email-hjc@rock-chips.com>\n\t<1505360600-196567-1-git-send-email-hjc@rock-chips.com>\n\t<20170919144621.eledmglqgn7nf7zp@rob-hp-laptop>\n\t<d631ff56-e3e6-688f-d9b6-a7101ce047d5@rock-chips.com>","Message-ID":"<6cd1ac0d-bc99-f8f3-15da-799f8623ce65@rock-chips.com>","Date":"Wed, 20 Sep 2017 10:57:29 +0800","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<d631ff56-e3e6-688f-d9b6-a7101ce047d5@rock-chips.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170919_195807_867915_880D5259 ","X-CRM114-Status":"GOOD (  12.50  )","X-Spam-Score":"3.4 (+++)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (3.4 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [211.150.99.140 listed in list.dnswl.org]\n\t3.3 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS\n\t[58.22.7.114 listed in zen.spamhaus.org]\n\t0.5 RCVD_IN_SORBS_SPAM     RBL: SORBS: sender is a spam source\n\t[58.22.7.114 listed in dnsbl.sorbs.net]\n\t1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server\n\t-0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)\n\t[211.150.99.140 listed in wl.mailspike.net]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, devicetree@vger.kernel.org,\n\tHeiko Stuebner <heiko@sntech.de>, David Airlie <airlied@linux.ie>,\n\tlinux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tlinux-rockchip@lists.infradead.org,\n\tlinux-arm-kernel@lists.infradead.org, Mark Yao <mark.yao@rock-chips.com>","Content-Transfer-Encoding":"base64","Content-Type":"text/plain; charset=\"utf-8\"; Format=\"flowed\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1771524,"web_url":"http://patchwork.ozlabs.org/comment/1771524/","msgid":"<93be3e6d-e0e1-87f2-e742-f08440a12659@rock-chips.com>","list_archive_url":null,"date":"2017-09-20T03:03:39","subject":"Re: [PATCH 2/3] drm/rockchip: Add support for Rockchip Soc RGB\n\toutput interface","submitter":{"id":72133,"url":"http://patchwork.ozlabs.org/api/people/72133/","name":"Huang Jiachai","email":"hjc@rock-chips.com"},"content":"Hi sean,\n     Thanks for your review.\n\n在 2017/9/20 7:02, Sean Paul 写道:\n> On Thu, Sep 14, 2017 at 11:43:23AM +0800, Sandy Huang wrote:\n>> Like rockchip rv1108 crtc can directly output parallel and serial\n>> RGB data to panel or conversion chip, so we add this driver to\n>> probe encoder and connector.\n>>\n>> Signed-off-by: Sandy Huang <hjc@rock-chips.com>\n>> ---\n>>   drivers/gpu/drm/rockchip/Kconfig            |   9 +\n>>   drivers/gpu/drm/rockchip/Makefile           |   1 +\n>>   drivers/gpu/drm/rockchip/rockchip_drm_drv.c |   2 +\n>>   drivers/gpu/drm/rockchip/rockchip_drm_drv.h |   1 +\n>>   drivers/gpu/drm/rockchip/rockchip_rgb.c     | 327 ++++++++++++++++++++++++++++\n>>   5 files changed, 340 insertions(+)\n>>   create mode 100644 drivers/gpu/drm/rockchip/rockchip_rgb.c\n>>\n>> diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig\n>> index 0c31f0a..ff1c781 100644\n>> --- a/drivers/gpu/drm/rockchip/Kconfig\n>> +++ b/drivers/gpu/drm/rockchip/Kconfig\n>> @@ -8,6 +8,7 @@ config DRM_ROCKCHIP\n>>   \tselect DRM_ANALOGIX_DP if ROCKCHIP_ANALOGIX_DP\n>>   \tselect DRM_DW_HDMI if ROCKCHIP_DW_HDMI\n>>   \tselect DRM_MIPI_DSI if ROCKCHIP_DW_MIPI_DSI\n>> +\tselect DRM_RGB if ROCKCHIP_RGB\n>>   \tselect SND_SOC_HDMI_CODEC if ROCKCHIP_CDN_DP && SND_SOC\n>>   \thelp\n>>   \t  Choose this option if you have a Rockchip soc chipset.\n>> @@ -65,4 +66,12 @@ config ROCKCHIP_LVDS\n>>   \t  Rockchip rk3288 SoC has LVDS TX Controller can be used, and it\n>>   \t  support LVDS, rgb, dual LVDS output mode. say Y to enable its\n>>   \t  driver.\n>> +\n>> +config ROCKCHIP_RGB\n>> +\tbool \"Rockchip RGB support\"\n>> +\thelp\n>> +\t  Choose this option to enable support for Rockchip RGB output.\n>> +\t  Like Rockchip rv1108 SoC CRTC can directly output parallel and\n> \n> The wording here is a little awkward. Perhaps change to:\n> \n> Some Rockchip CRTCs, like rv1108, can directly output parallel and\n> ...\n> \nok, i will update at next version.\n\n>> +\t  serial RGB format to panel or connect to a conversion chip.\n>> +\t  say Y to enable its driver.\n>>   endif\n>> diff --git a/drivers/gpu/drm/rockchip/Makefile b/drivers/gpu/drm/rockchip/Makefile\n>> index a881d2c..f32a17f 100644\n>> --- a/drivers/gpu/drm/rockchip/Makefile\n>> +++ b/drivers/gpu/drm/rockchip/Makefile\n>> @@ -13,5 +13,6 @@ rockchipdrm-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o\n>>   rockchipdrm-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o\n>>   rockchipdrm-$(CONFIG_ROCKCHIP_INNO_HDMI) += inno_hdmi.o\n>>   rockchipdrm-$(CONFIG_ROCKCHIP_LVDS) += rockchip_lvds.o\n>> +rockchipdrm-$(CONFIG_ROCKCHIP_RGB) += rockchip_rgb.o\n>>   \n>>   obj-$(CONFIG_DRM_ROCKCHIP) += rockchipdrm.o\n>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c\n>> index 082c251..36e602a 100644\n>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c\n>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c\n>> @@ -449,6 +449,8 @@ static int __init rockchip_drm_init(void)\n>>   \t\t\t\tCONFIG_ROCKCHIP_LVDS);\n>>   \tADD_ROCKCHIP_SUB_DRIVER(rockchip_dp_driver,\n>>   \t\t\t\tCONFIG_ROCKCHIP_ANALOGIX_DP);\n>> +\tADD_ROCKCHIP_SUB_DRIVER(rockchip_rgb_driver,\n>> +\t\t\t\tCONFIG_ROCKCHIP_RGB);\n>>   \tADD_ROCKCHIP_SUB_DRIVER(cdn_dp_driver, CONFIG_ROCKCHIP_CDN_DP);\n>>   \tADD_ROCKCHIP_SUB_DRIVER(dw_hdmi_rockchip_pltfm_driver,\n>>   \t\t\t\tCONFIG_ROCKCHIP_DW_HDMI);\n>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h\n>> index 498dfbc..6b0ec7e 100644\n>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h\n>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h\n>> @@ -70,5 +70,6 @@ extern struct platform_driver dw_mipi_dsi_driver;\n>>   extern struct platform_driver inno_hdmi_driver;\n>>   extern struct platform_driver rockchip_dp_driver;\n>>   extern struct platform_driver rockchip_lvds_driver;\n>> +extern struct platform_driver rockchip_rgb_driver;\n>>   extern struct platform_driver vop_platform_driver;\n>>   #endif /* _ROCKCHIP_DRM_DRV_H_ */\n>> diff --git a/drivers/gpu/drm/rockchip/rockchip_rgb.c b/drivers/gpu/drm/rockchip/rockchip_rgb.c\n>> new file mode 100644\n>> index 0000000..0f0e6b464\n>> --- /dev/null\n>> +++ b/drivers/gpu/drm/rockchip/rockchip_rgb.c\n>> @@ -0,0 +1,327 @@\n>> +/*\n>> + * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd\n>> + * Author:\n>> + *      Sandy Huang <hjc@rock-chips.com>\n>> + *\n>> + * This software is licensed under the terms of the GNU General Public\n>> + * License version 2, as published by the Free Software Foundation, and\n>> + * may be copied, distributed, and modified under those terms.\n>> + *\n>> + * This program is distributed in the hope that it will be useful,\n>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of\n>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n>> + * GNU General Public License for more details.\n>> + */\n>> +\n>> +#include <drm/drmP.h>\n>> +#include <drm/drm_atomic_helper.h>\n>> +#include <drm/drm_crtc_helper.h>\n>> +#include <drm/drm_dp_helper.h>\n>> +#include <drm/drm_panel.h>\n>> +#include <drm/drm_of.h>\n>> +\n>> +#include <linux/component.h>\n>> +#include <linux/of_graph.h>\n>> +\n>> +#include \"rockchip_drm_drv.h\"\n>> +#include \"rockchip_drm_vop.h\"\n>> +\n>> +#define connector_to_rgb(c) container_of(c, struct rockchip_rgb, connector)\n>> +#define encoder_to_rgb(c) container_of(c, struct rockchip_rgb, encoder)\n>> +\n>> +struct rockchip_rgb {\n>> +\tstruct device *dev;\n>> +\tstruct drm_device *drm_dev;\n>> +\tstruct drm_panel *panel;\n>> +\tstruct drm_bridge *bridge;\n>> +\tstruct drm_connector connector;\n>> +\tstruct drm_encoder encoder;\n>> +\tstruct dev_pin_info *pins;\n>> +\tint output_mode;\n>> +};\n>> +\n>> +static inline int name_to_output_mode(const char *s)\n>> +{\n>> +\tif (strncmp(s, \"p888\", 4) == 0)\n>> +\t\treturn ROCKCHIP_OUT_MODE_P888;\n>> +\telse if (strncmp(s, \"p666\", 4) == 0)\n>> +\t\treturn ROCKCHIP_OUT_MODE_P666;\n>> +\telse if (strncmp(s, \"p565\", 4) == 0)\n>> +\t\treturn ROCKCHIP_OUT_MODE_P565;\n>> +\telse if (strncmp(s, \"s888\", 4) == 0)\n>> +\t\treturn ROCKCHIP_OUT_MODE_S888;\n>> +\telse if (strncmp(s, \"s888_dummy\", 10) == 0)\n>> +\t\treturn ROCKCHIP_OUT_MODE_S888_DUMMY;\n> \n> Instead of hardcoding the string lengths, try:\n> \n>          static const struct {\n>                  const char *name;\n>                  int format;\n>          } formats[] = {\n>                  { \"p888\", ROCKCHIP_OUT_MODE_P888 },\n>                  { \"p666\", ROCKCHIP_OUT_MODE_P666 },\n>                  { \"p565\", ROCKCHIP_OUT_MODE_P565 },\n>                  { \"s888\", ROCKCHIP_OUT_MODE_S888 },\n>                  { \"s888_dummy\", ROCKCHIP_OUT_MODE_S888_DUMMY }\n>          };\n>          int i;\n> \n>          for (i = 0; i < ARRAY_SIZE(formats); i++)\n>                  if (!strncmp(s, formats[i].name, strlen(formats[i].name)))\n>                          return formats[i].format;\n> \n> Yes, strlen isn't as performant, but this code only runs once and it's safer.\n> \nok, i will update at next version.\n>> +\n>> +\treturn -EINVAL;\n>> +}\n>> +\n>> +static const struct drm_connector_funcs rockchip_rgb_connector_funcs = {\n>> +\t.fill_modes = drm_helper_probe_single_connector_modes,\n>> +\t.destroy = drm_connector_cleanup,\n>> +\t.reset = drm_atomic_helper_connector_reset,\n>> +\t.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,\n>> +\t.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,\n>> +};\n>> +\n>> +static int rockchip_rgb_connector_get_modes(struct drm_connector *connector)\n>> +{\n>> +\tstruct rockchip_rgb *rgb = connector_to_rgb(connector);\n>> +\tstruct drm_panel *panel = rgb->panel;\n>> +\n>> +\treturn drm_panel_get_modes(panel);\n>> +}\n>> +\n>> +static const\n>> +struct drm_connector_helper_funcs rockchip_rgb_connector_helper_funcs = {\n>> +\t.get_modes = rockchip_rgb_connector_get_modes,\n>> +};\n>> +\n>> +static void rockchip_rgb_encoder_enable(struct drm_encoder *encoder)\n>> +{\n>> +\tstruct rockchip_rgb *rgb = encoder_to_rgb(encoder);\n>> +\n>> +\tdrm_panel_prepare(rgb->panel);\n>> +\t/* iomux to LCD data/sync mode */\n>> +\tif (rgb->pins && !IS_ERR(rgb->pins->default_state))\n>> +\t\tpinctrl_select_state(rgb->pins->p, rgb->pins->default_state);\n>> +\n>> +\tdrm_panel_enable(rgb->panel);\n>> +}\n>> +\n>> +static void rockchip_rgb_encoder_disable(struct drm_encoder *encoder)\n>> +{\n>> +\tstruct rockchip_rgb *rgb = encoder_to_rgb(encoder);\n>> +\n>> +\tdrm_panel_disable(rgb->panel);\n>> +\tdrm_panel_unprepare(rgb->panel);\n>> +}\n>> +\n>> +static int\n>> +rockchip_rgb_encoder_atomic_check(struct drm_encoder *encoder,\n>> +\t\t\t\t   struct drm_crtc_state *crtc_state,\n>> +\t\t\t\t   struct drm_connector_state *conn_state)\n>> +{\n>> +\tstruct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc_state);\n>> +\tstruct rockchip_rgb *rgb = encoder_to_rgb(encoder);\n>> +\n>> +\ts->output_mode = rgb->output_mode;\n>> +\ts->output_type = DRM_MODE_CONNECTOR_LVDS;\n>> +\n>> +\treturn 0;\n>> +}\n>> +\n>> +static const\n>> +struct drm_encoder_helper_funcs rockchip_rgb_encoder_helper_funcs = {\n>> +\t.enable = rockchip_rgb_encoder_enable,\n>> +\t.disable = rockchip_rgb_encoder_disable,\n>> +\t.atomic_check = rockchip_rgb_encoder_atomic_check,\n>> +};\n>> +\n>> +static const struct drm_encoder_funcs rockchip_rgb_encoder_funcs = {\n>> +\t.destroy = drm_encoder_cleanup,\n>> +};\n>> +\n>> +static const struct of_device_id rockchip_rgb_dt_ids[] = {\n>> +\t{\n>> +\t\t.compatible = \"rockchip,rv1108-rgb\",\n>> +\t},\n>> +\t{}\n>> +};\n>> +MODULE_DEVICE_TABLE(of, rockchip_rgb_dt_ids);\n>> +\n>> +static int rockchip_rgb_bind(struct device *dev, struct device *master,\n>> +\t\t\t     void *data)\n>> +{\n>> +\tstruct rockchip_rgb *rgb = dev_get_drvdata(dev);\n>> +\tstruct drm_device *drm_dev = data;\n>> +\tstruct drm_encoder *encoder;\n>> +\tstruct drm_connector *connector;\n>> +\tstruct device_node *remote = NULL;\n>> +\tstruct device_node  *port, *endpoint;\n>> +\tu32 endpoint_id;\n>> +\tconst char *name;\n>> +\tint ret;\n>> +\n>> +\trgb->drm_dev = drm_dev;\n>> +\tport = of_graph_get_port_by_id(dev->of_node, 1);\n>> +\tif (!port) {\n>> +\t\tDRM_DEV_ERROR(dev,\n>> +\t\t\t      \"can't found port point, please init rgb panel port!\\n\");\n>> +\t\treturn -EINVAL;\n>> +\t}\n>> +\tfor_each_child_of_node(port, endpoint) {\n>> +\t\tof_property_read_u32(endpoint, \"reg\", &endpoint_id);\n>> +\t\tret = drm_of_find_panel_or_bridge(dev->of_node, 1, endpoint_id,\n>> +\t\t\t\t\t\t  &rgb->panel, &rgb->bridge);\n>> +\t\tif (!ret)\n>> +\t\t\tbreak;\n>> +\t}\n>> +\tif (ret) {\n>> +\t\tDRM_DEV_ERROR(dev, \"failed to find panel and bridge node\\n\");\n>> +\t\tret  = -EPROBE_DEFER;\n>> +\t\tgoto err_put_port;\n>> +\t}\n>> +\tif (rgb->panel)\n>> +\t\tremote = rgb->panel->dev->of_node;\n>> +\telse\n>> +\t\tremote = rgb->bridge->of_node;\n>> +\tif (of_property_read_string(dev->of_node, \"rockchip,rgb-mode\", &name))\n>> +\t\t/* default set it as output mode P888 */\n>> +\t\trgb->output_mode = ROCKCHIP_OUT_MODE_P888;\n>> +\telse\n>> +\t\trgb->output_mode = name_to_output_mode(name);\n>> +\tif (rgb->output_mode < 0) {\n>> +\t\tDRM_DEV_ERROR(dev, \"invalid rockchip,rgb-mode [%s]\\n\", name);\n>> +\t\tret = rgb->output_mode;\n>> +\t\tgoto err_put_remote;\n>> +\t}\n>> +\n>> +\tencoder = &rgb->encoder;\n>> +\tencoder->possible_crtcs = drm_of_find_possible_crtcs(drm_dev,\n>> +\t\t\t\t\t\t\t     dev->of_node);\n>> +\n>> +\tret = drm_encoder_init(drm_dev, encoder, &rockchip_rgb_encoder_funcs,\n>> +\t\t\t       DRM_MODE_ENCODER_NONE, NULL);\n>> +\tif (ret < 0) {\n>> +\t\tDRM_DEV_ERROR(drm_dev->dev,\n>> +\t\t\t      \"failed to initialize encoder: %d\\n\", ret);\n>> +\t\tgoto err_put_remote;\n>> +\t}\n>> +\n>> +\tdrm_encoder_helper_add(encoder, &rockchip_rgb_encoder_helper_funcs);\n>> +\n>> +\tif (rgb->panel) {\n>> +\t\tconnector = &rgb->connector;\n>> +\t\tconnector->dpms = DRM_MODE_DPMS_OFF;\n>> +\t\tret = drm_connector_init(drm_dev, connector,\n>> +\t\t\t\t\t &rockchip_rgb_connector_funcs,\n>> +\t\t\t\t\t DRM_MODE_CONNECTOR_Unknown);\n>> +\t\tif (ret < 0) {\n>> +\t\t\tDRM_DEV_ERROR(drm_dev->dev,\n>> +\t\t\t\t      \"failed to initialize connector: %d\\n\",\n>> +\t\t\t\t      ret);\n>> +\t\t\tgoto err_free_encoder;\n>> +\t\t}\n>> +\n>> +\t\tdrm_connector_helper_add(connector,\n>> +\t\t\t\t\t &rockchip_rgb_connector_helper_funcs);\n>> +\n>> +\t\tret = drm_mode_connector_attach_encoder(connector, encoder);\n>> +\t\tif (ret < 0) {\n>> +\t\t\tDRM_DEV_ERROR(drm_dev->dev,\n>> +\t\t\t\t      \"failed to attach encoder: %d\\n\", ret);\n>> +\t\t\tgoto err_free_connector;\n>> +\t\t}\n>> +\n>> +\t\tret = drm_panel_attach(rgb->panel, connector);\n>> +\t\tif (ret < 0) {\n>> +\t\t\tDRM_DEV_ERROR(drm_dev->dev,\n>> +\t\t\t\t      \"failed to attach panel: %d\\n\", ret);\n>> +\t\t\tgoto err_free_connector;\n>> +\t\t}\n>> +\t} else {\n>> +\t\trgb->bridge->encoder = encoder;\n>> +\t\tret = drm_bridge_attach(encoder, rgb->bridge, NULL);\n>> +\t\tif (ret) {\n>> +\t\t\tDRM_DEV_ERROR(drm_dev->dev,\n>> +\t\t\t\t      \"failed to attach bridge: %d\\n\", ret);\n>> +\t\t\tgoto err_free_encoder;\n>> +\t\t}\n>> +\t\tencoder->bridge = rgb->bridge;\n>> +\t}\n>> +\n>> +\tof_node_put(remote);\n>> +\tof_node_put(port);\n>> +\n>> +\treturn 0;\n>> +\n>> +err_free_connector:\n>> +\tdrm_connector_cleanup(connector);\n>> +err_free_encoder:\n>> +\tdrm_encoder_cleanup(encoder);\n>> +err_put_remote:\n>> +\tof_node_put(remote);\n>> +err_put_port:\n>> +\tof_node_put(port);\n>> +\n>> +\treturn ret;\n>> +}\n>> +\n>> +static void rockchip_rgb_unbind(struct device *dev, struct device *master,\n>> +\t\t\t\tvoid *data)\n>> +{\n>> +\tstruct rockchip_rgb *rgb = dev_get_drvdata(dev);\n>> +\n>> +\trockchip_rgb_encoder_disable(&rgb->encoder);\n>> +\tif (rgb->panel)\n>> +\t\tdrm_panel_detach(rgb->panel);\n>> +\tdrm_connector_cleanup(&rgb->connector);\n>> +\tdrm_encoder_cleanup(&rgb->encoder);\n>> +}\n>> +\n>> +static const struct component_ops rockchip_rgb_component_ops = {\n>> +\t.bind = rockchip_rgb_bind,\n>> +\t.unbind = rockchip_rgb_unbind,\n>> +};\n>> +\n>> +static int rockchip_rgb_probe(struct platform_device *pdev)\n>> +{\n>> +\tstruct device *dev = &pdev->dev;\n>> +\tstruct rockchip_rgb *rgb;\n>> +\tconst struct of_device_id *match;\n>> +\tint ret;\n>> +\n>> +\tif (!dev->of_node)\n>> +\t\treturn -ENODEV;\n>> +\n>> +\trgb = devm_kzalloc(&pdev->dev, sizeof(*rgb), GFP_KERNEL);\n>> +\tif (!rgb)\n>> +\t\treturn -ENOMEM;\n>> +\n>> +\trgb->dev = dev;\n>> +\tmatch = of_match_node(rockchip_rgb_dt_ids, dev->of_node);\n>> +\tif (!match)\n>> +\t\treturn -ENODEV;\n>> +\n>> +\trgb->pins = devm_kzalloc(rgb->dev, sizeof(*rgb->pins), GFP_KERNEL);\n>> +\tif (!rgb->pins)\n>> +\t\treturn -ENOMEM;\n> \n> Can you please log errors for all of these failing conditions?\n> \nok, i will add error log for this return, except the devm_kzalloc error.\n\n>> +\trgb->pins->p = devm_pinctrl_get(rgb->dev);\n>> +\tif (IS_ERR(rgb->pins->p)) {\n>> +\t\tDRM_DEV_ERROR(dev, \"no pinctrl handle\\n\");\n>> +\t\tdevm_kfree(rgb->dev, rgb->pins);\n>> +\t\trgb->pins = NULL;\n>> +\t} else {\n>> +\t\trgb->pins->default_state =\n>> +\t\t\tpinctrl_lookup_state(rgb->pins->p, \"lcdc\");\n>> +\t\tif (IS_ERR(rgb->pins->default_state)) {\n>> +\t\t\tDRM_DEV_ERROR(dev, \"no default pinctrl state\\n\");\n>> +\t\t\tdevm_kfree(rgb->dev, rgb->pins);\n>> +\t\t\trgb->pins = NULL;\n>> +\t\t}\n>> +\t}\n>> +\n>> +\tdev_set_drvdata(dev, rgb);\n>> +\tret = component_add(&pdev->dev, &rockchip_rgb_component_ops);\n>> +\tif (ret < 0)\n>> +\t\tDRM_DEV_ERROR(dev, \"failed to add component\\n\");\n>> +\n>> +\treturn ret;\n>> +}\n>> +\n>> +static int rockchip_rgb_remove(struct platform_device *pdev)\n>> +{\n>> +\tcomponent_del(&pdev->dev, &rockchip_rgb_component_ops);\n>> +\n>> +\treturn 0;\n>> +}\n>> +\n>> +struct platform_driver rockchip_rgb_driver = {\n>> +\t.probe = rockchip_rgb_probe,\n>> +\t.remove = rockchip_rgb_remove,\n>> +\t.driver = {\n>> +\t\t   .name = \"rockchip-rgb\",\n>> +\t\t   .of_match_table = of_match_ptr(rockchip_rgb_dt_ids),\n>> +\t},\n>> +};\n>> -- \n>> 2.7.4\n>>\n>>\n>> _______________________________________________\n>> dri-devel mailing list\n>> dri-devel@lists.freedesktop.org\n>> https://lists.freedesktop.org/mailman/listinfo/dri-devel\n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"mLo8K7/J\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxl2X4Tgtz9s82\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 13:04:20 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duVJA-0001fJ-Fv; Wed, 20 Sep 2017 03:04:16 +0000","from regular1.263xmail.com ([211.150.99.140])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duVJ1-0001VM-DA; Wed, 20 Sep 2017 03:04:13 +0000","from hjc?rock-chips.com (unknown [192.168.167.175])\n\tby regular1.263xmail.com (Postfix) with ESMTP id 9E1204A7C;\n\tWed, 20 Sep 2017 11:03:42 +0800 (CST)","from [172.16.10.72] (localhost [127.0.0.1])\n\tby smtp.263.net (Postfix) with ESMTPA id B696B3B0;\n\tWed, 20 Sep 2017 11:03:38 +0800 (CST)","from [172.16.10.72] (unknown [58.22.7.114])\n\tby smtp.263.net (Postfix) whith ESMTP id 16165YUNU2J;\n\tWed, 20 Sep 2017 11:03:40 +0800 (CST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:\n\tContent-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From:\n\tReferences:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=Qmwa5DdX8Ed1YL9qAfEnsEkGp0aE1bqeWWk6cV2xGac=;\n\tb=mLo8K7/JwzK4YcJ5KY46C37bl\n\t9xNJNSEZT5jqWSYNPCqkJKdAkHL1adLDbXUjYa8k6pLq65GAo1R8sR9v0opPgaWP/KwwdLXzXRIm1\n\teap7FECxqCbjRaWFoHXCtNSvKkFcjM4lm0dCbbaFUsQyXHItuPlzpWQ4K4YmSOARhDgzmnZeYHeMY\n\tdebJkoBkM4I2QEZpmEwWJihC6FFHoQAJe/454b+mDP41Iz3l5lpbEY7GKmAXMXyA7KGVez5zGXFmI\n\te4vOGyfdm9uf4qxhQCP/SzD4QKDuejMVksVg0j0J1dxAQD3Q9z6q4Fp73EjGbNompAzjulV9Wyr5N\n\tZ0tQh5vZA==;","X-263anti-spam":"KSV:0;","X-MAIL-GRAY":"0","X-MAIL-DELIVERY":"1","X-KSVirus-check":"0","X-ABS-CHECKED":"4","X-RL-SENDER":"hjc@rock-chips.com","X-FST-TO":"sandy.huang@rock-chips.com","X-SENDER-IP":"58.22.7.114","X-LOGIN-NAME":"hjc@rock-chips.com","X-UNIQUE-TAG":"<a071df0c57a01db3ceb8f2ec77ad7b44>","X-ATTACHMENT-NUM":"0","X-SENDER":"hjc@rock-chips.com","X-DNS-TYPE":"0","Subject":"Re: [PATCH 2/3] drm/rockchip: Add support for Rockchip Soc RGB\n\toutput interface","To":"Sean Paul <seanpaul@chromium.org>","References":"<1505360594-196508-1-git-send-email-hjc@rock-chips.com>\n\t<1505360606-317-1-git-send-email-hjc@rock-chips.com>\n\t<20170919230243.eh2algukl7bn7cr3@art_vandelay>","From":"Sandy Huang <hjc@rock-chips.com>","Message-ID":"<93be3e6d-e0e1-87f2-e742-f08440a12659@rock-chips.com>","Date":"Wed, 20 Sep 2017 11:03:39 +0800","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170919230243.eh2algukl7bn7cr3@art_vandelay>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170919_200408_540884_5F792009 ","X-CRM114-Status":"GOOD (  17.53  )","X-Spam-Score":"3.4 (+++)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (3.4 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [211.150.99.140 listed in list.dnswl.org]\n\t1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server\n\t[58.22.7.114 listed in dnsbl.sorbs.net]\n\t0.5 RCVD_IN_SORBS_SPAM     RBL: SORBS: sender is a spam source\n\t3.3 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS\n\t[58.22.7.114 listed in zen.spamhaus.org]\n\t-0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)\n\t[211.150.99.140 listed in wl.mailspike.net]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Heiko Stuebner <heiko@sntech.de>, David Airlie <airlied@linux.ie>,\n\tlinux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tlinux-rockchip@lists.infradead.org,\n\tlinux-arm-kernel@lists.infradead.org, Mark Yao <mark.yao@rock-chips.com>","Content-Transfer-Encoding":"base64","Content-Type":"text/plain; charset=\"gbk\"; Format=\"flowed\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1773188,"web_url":"http://patchwork.ozlabs.org/comment/1773188/","msgid":"<CAL_JsqK7kR5QuBCCgGkOTfw041_k4qsUsNdm0cft=C3UWTfxoQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-21T19:40:45","subject":"Re: [PATCH 1/3] dt-bindings: Add document for rockchip RGB output\n\tinterface","submitter":{"id":62529,"url":"http://patchwork.ozlabs.org/api/people/62529/","name":"Rob Herring (Arm)","email":"robh@kernel.org"},"content":"On Tue, Sep 19, 2017 at 9:57 PM, Sandy Huang <hjc@rock-chips.com> wrote:\n>\n>\n> 在 2017/9/20 9:51, Sandy Huang 写道:\n>>\n>> Hi rob,\n>>      thanks for you review.\n>>\n>> 在 2017/9/19 22:46, Rob Herring 写道:\n>>>\n>>> On Thu, Sep 14, 2017 at 11:43:18AM +0800, Sandy Huang wrote:\n>>>>\n>>>> This path add support rv1108 rgb output interface driver.\n>>>>\n>>>> Signed-off-by: Sandy Huang <hjc@rock-chips.com>\n>>>> ---\n>>>>   .../bindings/display/rockchip/rockchip-rgb.txt     | 80\n>>>> ++++++++++++++++++++++\n>>>>   1 file changed, 80 insertions(+)\n>>>>   create mode 100644\n>>>> Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>>>>\n>>>> diff --git\n>>>> a/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>>>> b/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>>>> new file mode 100644\n>>>> index 0000000..4164512\n>>>> --- /dev/null\n>>>> +++\n>>>> b/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>>>> @@ -0,0 +1,80 @@\n>>>> +Rockchip RV1108 RGB interface\n>>>> +================================\n>>>> +\n>>>> +Required properties:\n>>>> +- compatible: matching the soc type:\n>>>> +    - \"rockchip,rv1108-rgb\";\n>>>> +\n>>>> +Optional properties:\n>>>> +- pinctrl-names: must contain a \"lcdc\" entry.\n>>>> +- pinctrl-0: pin control group to be used for this interface.\n>>>> +\n>>>> +Required nodes:\n>>>> +- rockchip,rgb-mode: should be \"p888\", \"p666\", \"p565\", \"s888\",\n>>>> \"s888-dummy\"\n>>>\n>>>\n>>> This should be a standard property. Any device with a parallel interface\n>>> is going to need something like this.\n>>>\n>> so, i need to move this property to panel? or just rename\n>> rockchip,rgb-mode to rgb-mode?\n>>\n>>>> +    - p888: output r8-g8-b8 at each dclk cycle for per-pixel\n>>>> +    - p666: output r6-g6-b6 at each dclk cycle for per-pixel\n>>>> +    - p565: output r5-g6-b5 at each dclk cycle for per-pixel\n>>>> +    - s888: output r8-g8-b8 in three dclk cycle for per-pixel\n>>>> +    - s888-dmmy: output r8-g8-b8-dummy in four dclk cycle for per-pixel\n>>>> +\n>>>> +The rgb has two video ports described by:\n>>>> +    Documentation/devicetree/bindings/media/video-interfaces.txt\n>>>> +Their connections are modeled using the OF graph bindings specified in\n>>>> +    Documentation/devicetree/bindings/graph.txt.\n>>>> +\n>>>> +- video port 0 for the VOP input, the remote endpoint maybe\n>>>> vopb/vopl/vop\n>>>> +- video port 1 for either a panel or subsequent encoder\n>>>> +\n>>>> +the panel described by:\n>>>> +    Documentation/devicetree/bindings/display/panel/simple-panel.txt\n>>>> +Panel other required properties:\n>>>> +- ports for remote rgb output.\n>>>> +\n>>>> +Example:\n>>>> +\n>>>> +panel: panel {\n>>>> +    compatible = \"auo,b101ean01\";\n>>>> +    enable-gpios = <&gpio7 21 GPIO_ACTIVE_HIGH>;\n>>>> +\n>>>> +    ports {\n>>>> +        panel_in_rgb: endpoint {\n>>>> +            remote-endpoint = <&rgb_out_panel>;\n>>>> +        };\n>>>> +    };\n>>>> +};\n>>>> +\n>>>> +For Rockchip RV1108:\n>>>> +\n>>>> +    rgb: rgb {\n>>>> +        compatible = \"rockchip,rv1108-rgb\";\n>>>> +        pinctrl-names = \"lcdc\";\n>>>> +        pinctrl-0 = <&lcdc_ctl>;\n>>>> +        rockchip,rgb-mode = \"p888\";\n>>>> +\n>>>> +        ports {\n>>>> +            #address-cells = <1>;\n>>>> +            #size-cells = <0>;\n>>>> +\n>>>> +            rgb_in: port@0 {\n>>>> +                reg = <0>;\n>>>> +                #address-cells = <1>;\n>>>> +                #size-cells = <0>;\n>>>> +\n>>>> +                rgb_in_vop: endpoint@0 {\n>>>> +                    reg = <0>;\n>>>\n>>>\n>>> Don't need reg for a single endpoint.\n>>>\n>> ok, this will be deleted at next version.\n>>>>\n>>>> +                    remote-endpoint = <&vop_out_rgb>;\n>>>> +                };\n>>>> +            };\n>>>> +\n>>>> +            rgb_out: port@1 {\n>>>> +                reg = <1>;\n>>>> +                #address-cells = <1>;\n>>>> +                #size-cells = <0>;\n>>>> +\n>>>> +                rgb_out_panel: endpoint@0 {\n>>>> +                    reg = <0>;\n>>>\n>>>\n>>> ditto.\n>>>\n>> ok, this will be deleted at next version.\n>\n> sorry,this can't be deleted, because rgb output remote endpoint maybe panel\n> or convert chip, the dts node maybe like this:\n>\n> panel: panel {\n>         status = \"disabled\";\n>         ports {\n>                 panel_in_rgb: endpoint {\n>                         remote-endpoint =  <&rgb_out_panel>;\n>                 };\n>         };\n> };\n>\n> bridge: bridge {\n>         status = \"okay\";\n>         ports {\n>                 bridge_in_rgb: endpoint {\n>                         remote-endpoint =  <&rgb_out_bridge>;\n>                 };\n>         };\n> };\n>\n> rgb_out: port@1 {\n>         reg = <1>;\n>         #address-cells = <1>;\n>         #size-cells = <0>;\n>         rgb_out_panel: endpoint@0 {\n>                  reg = <0>;\n>                 remote-endpoint = <&panel_in_rgb>;\n>         };\n>         rgb_out_bridge: endpoint@1 {\n>                  reg = <1>;\n>                 remote-endpoint = <&bridge_in_rgb>;\n>         };\n>  };\n>\n> so rockchip_rgb_bind() @ rockchip_rgb.c use reg id to find the remote\n> actived endpoint.\n>\n> for_each_child_of_node(port, endpoint) {\n>         of_property_read_u32(endpoint, \"reg\", &endpoint_id);\n\nLack of reg property here should imply 0 for endpoint_id.\n\n>         ret = drm_of_find_panel_or_bridge(dev->of_node, 1, endpoint_id,\n> &rgb->panel, &rgb->bridge);\n>         if (!ret)\n>                 break;\n> }\n>\n>>>> +                    remote-endpoint = <&panel_in_rgb>;\n>>>> +                };\n>>>> +            };\n>>>> +        };\n>>>> +    };\n>>>> --\n>>>> 2.7.4\n>>>>\n>>>>\n>>>\n>>>\n>>>\n>>\n>>\n>> _______________________________________________\n>> Linux-rockchip mailing list\n>> Linux-rockchip@lists.infradead.org\n>> http://lists.infradead.org/mailman/listinfo/linux-rockchip\n>\n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"T763noEN\"; dkim-atps=neutral","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=robh@kernel.org"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xytJ14krzz9tXC\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 09:32:52 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dv7Lo-0004hP-FQ; Thu, 21 Sep 2017 19:41:32 +0000","from mail.kernel.org ([198.145.29.99])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dv7Lk-0004ci-Kw; Thu, 21 Sep 2017 19:41:30 +0000","from mail-qk0-f176.google.com (mail-qk0-f176.google.com\n\t[209.85.220.176])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id 07DC722A99;\n\tThu, 21 Sep 2017 19:41:07 +0000 (UTC)","by mail-qk0-f176.google.com with SMTP id o77so6844702qke.9;\n\tThu, 21 Sep 2017 12:41:07 -0700 (PDT)","by 10.12.209.75 with HTTP; Thu, 21 Sep 2017 12:40:45 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=olfwoYYZDJXRcxyC9ryBlBpDLJoRgQO3Cd879TAaJvI=;\n\tb=T763noENUV/lFj\n\tWuJObWyNtuL5zEMsgRDig+TB3FDwgO5TdPMexE7HxKp81TKCau8OPhepup0gQnCHctzLlkQOzhsDw\n\tlUKpuJ9w1g1QJFXSe0AUyZb7+jmK0yxaI3BJqniEyCYnyo9Ujn0K5YddrkHvML4VvweySJjNgIwWl\n\tQdguEpozCrNVxiRFvSQ6gBrzsSUZh7b67eiAMP3B51VwJxX1yHMmC57BngHqCv8UfMPuobwzcc54Y\n\tMnDyloAVrUx8I4x9jabJ80yF5VUoQdAcAtCK321di5NYjtU6DzQjI8qCSymKtCLOTT7cJXMn554d+\n\tBNIGAbta88BgsU2MK8IQ==;","DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org 07DC722A99","X-Gm-Message-State":"AHPjjUgFqknXaZT5kqE0IBQWXLUkJStnzExd1jmNsYg8eBfqeH2dvizJ\n\tBK8txPrrEpDRbqsHwKhRepzVBSFDuwcrYvcUJA==","X-Google-Smtp-Source":"AOwi7QDYULm+Y5e/nP1h/yzgBr4ILpITGggJ28q/UVGv32KxGI1zD8eUP+gTfVPCvGB2c403bhKEQOvv77Y5WZH4Xc0=","X-Received":"by 10.55.10.76 with SMTP id 73mr4474206qkk.205.1506022866107;\n\tThu, 21 Sep 2017 12:41:06 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<6cd1ac0d-bc99-f8f3-15da-799f8623ce65@rock-chips.com>","References":"<1505360594-196508-1-git-send-email-hjc@rock-chips.com>\n\t<1505360600-196567-1-git-send-email-hjc@rock-chips.com>\n\t<20170919144621.eledmglqgn7nf7zp@rob-hp-laptop>\n\t<d631ff56-e3e6-688f-d9b6-a7101ce047d5@rock-chips.com>\n\t<6cd1ac0d-bc99-f8f3-15da-799f8623ce65@rock-chips.com>","From":"Rob Herring <robh@kernel.org>","Date":"Thu, 21 Sep 2017 14:40:45 -0500","X-Gmail-Original-Message-ID":"<CAL_JsqK7kR5QuBCCgGkOTfw041_k4qsUsNdm0cft=C3UWTfxoQ@mail.gmail.com>","Message-ID":"<CAL_JsqK7kR5QuBCCgGkOTfw041_k4qsUsNdm0cft=C3UWTfxoQ@mail.gmail.com>","Subject":"Re: [PATCH 1/3] dt-bindings: Add document for rockchip RGB output\n\tinterface","To":"Sandy Huang <hjc@rock-chips.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170921_124128_817149_0D5E7E18 ","X-CRM114-Status":"GOOD (  15.52  )","X-Spam-Score":"-6.4 (------)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-6.4 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,\n\thigh trust [198.145.29.99 listed in list.dnswl.org]\n\t0.5 RCVD_IN_SORBS_SPAM     RBL: SORBS: sender is a spam source\n\t[209.85.220.176 listed in dnsbl.sorbs.net]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>,\n\t\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>,\n\tHeiko Stuebner <heiko@sntech.de>, David Airlie <airlied@linux.ie>,\n\t\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>,\n\tdri-devel <dri-devel@lists.freedesktop.org>,\n\t\"open list:ARM/Rockchip SoC...\" <linux-rockchip@lists.infradead.org>, \n\t\"linux-arm-kernel@lists.infradead.org\"\n\t<linux-arm-kernel@lists.infradead.org>, \n\tMark Yao <mark.yao@rock-chips.com>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1773232,"web_url":"http://patchwork.ozlabs.org/comment/1773232/","msgid":"<e70e572d-5b44-43dd-3b66-0cd6e71cbedc@rock-chips.com>","list_archive_url":null,"date":"2017-09-22T02:59:58","subject":"Re: [PATCH 1/3] dt-bindings: Add document for rockchip RGB output\n\tinterface","submitter":{"id":72133,"url":"http://patchwork.ozlabs.org/api/people/72133/","name":"Huang Jiachai","email":"hjc@rock-chips.com"},"content":"Hi rob,\n\n在 2017/9/22 3:40, Rob Herring 写道:\n> On Tue, Sep 19, 2017 at 9:57 PM, Sandy Huang <hjc@rock-chips.com> wrote:\n>>\n>>\n>> 在 2017/9/20 9:51, Sandy Huang 写道:\n>>>\n>>> Hi rob,\n>>>       thanks for you review.\n>>>\n>>> 在 2017/9/19 22:46, Rob Herring 写道:\n>>>>\n>>>> On Thu, Sep 14, 2017 at 11:43:18AM +0800, Sandy Huang wrote:\n>>>>>\n>>>>> This path add support rv1108 rgb output interface driver.\n>>>>>\n>>>>> Signed-off-by: Sandy Huang <hjc@rock-chips.com>\n>>>>> ---\n>>>>>    .../bindings/display/rockchip/rockchip-rgb.txt     | 80\n>>>>> ++++++++++++++++++++++\n>>>>>    1 file changed, 80 insertions(+)\n>>>>>    create mode 100644\n>>>>> Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>>>>>\n>>>>> diff --git\n>>>>> a/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>>>>> b/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>>>>> new file mode 100644\n>>>>> index 0000000..4164512\n>>>>> --- /dev/null\n>>>>> +++\n>>>>> b/Documentation/devicetree/bindings/display/rockchip/rockchip-rgb.txt\n>>>>> @@ -0,0 +1,80 @@\n>>>>> +Rockchip RV1108 RGB interface\n>>>>> +================================\n>>>>> +\n>>>>> +Required properties:\n>>>>> +- compatible: matching the soc type:\n>>>>> +    - \"rockchip,rv1108-rgb\";\n>>>>> +\n>>>>> +Optional properties:\n>>>>> +- pinctrl-names: must contain a \"lcdc\" entry.\n>>>>> +- pinctrl-0: pin control group to be used for this interface.\n>>>>> +\n>>>>> +Required nodes:\n>>>>> +- rockchip,rgb-mode: should be \"p888\", \"p666\", \"p565\", \"s888\",\n>>>>> \"s888-dummy\"\n>>>>\n>>>>\n>>>> This should be a standard property. Any device with a parallel interface\n>>>> is going to need something like this.\n>>>>\n>>> so, i need to move this property to panel? or just rename\n>>> rockchip,rgb-mode to rgb-mode?\n>>>\n>>>>> +    - p888: output r8-g8-b8 at each dclk cycle for per-pixel\n>>>>> +    - p666: output r6-g6-b6 at each dclk cycle for per-pixel\n>>>>> +    - p565: output r5-g6-b5 at each dclk cycle for per-pixel\n>>>>> +    - s888: output r8-g8-b8 in three dclk cycle for per-pixel\n>>>>> +    - s888-dmmy: output r8-g8-b8-dummy in four dclk cycle for per-pixel\n>>>>> +\n>>>>> +The rgb has two video ports described by:\n>>>>> +    Documentation/devicetree/bindings/media/video-interfaces.txt\n>>>>> +Their connections are modeled using the OF graph bindings specified in\n>>>>> +    Documentation/devicetree/bindings/graph.txt.\n>>>>> +\n>>>>> +- video port 0 for the VOP input, the remote endpoint maybe\n>>>>> vopb/vopl/vop\n>>>>> +- video port 1 for either a panel or subsequent encoder\n>>>>> +\n>>>>> +the panel described by:\n>>>>> +    Documentation/devicetree/bindings/display/panel/simple-panel.txt\n>>>>> +Panel other required properties:\n>>>>> +- ports for remote rgb output.\n>>>>> +\n>>>>> +Example:\n>>>>> +\n>>>>> +panel: panel {\n>>>>> +    compatible = \"auo,b101ean01\";\n>>>>> +    enable-gpios = <&gpio7 21 GPIO_ACTIVE_HIGH>;\n>>>>> +\n>>>>> +    ports {\n>>>>> +        panel_in_rgb: endpoint {\n>>>>> +            remote-endpoint = <&rgb_out_panel>;\n>>>>> +        };\n>>>>> +    };\n>>>>> +};\n>>>>> +\n>>>>> +For Rockchip RV1108:\n>>>>> +\n>>>>> +    rgb: rgb {\n>>>>> +        compatible = \"rockchip,rv1108-rgb\";\n>>>>> +        pinctrl-names = \"lcdc\";\n>>>>> +        pinctrl-0 = <&lcdc_ctl>;\n>>>>> +        rockchip,rgb-mode = \"p888\";\n>>>>> +\n>>>>> +        ports {\n>>>>> +            #address-cells = <1>;\n>>>>> +            #size-cells = <0>;\n>>>>> +\n>>>>> +            rgb_in: port@0 {\n>>>>> +                reg = <0>;\n>>>>> +                #address-cells = <1>;\n>>>>> +                #size-cells = <0>;\n>>>>> +\n>>>>> +                rgb_in_vop: endpoint@0 {\n>>>>> +                    reg = <0>;\n>>>>\n>>>>\n>>>> Don't need reg for a single endpoint.\n>>>>\n>>> ok, this will be deleted at next version.\n>>>>>\n>>>>> +                    remote-endpoint = <&vop_out_rgb>;\n>>>>> +                };\n>>>>> +            };\n>>>>> +\n>>>>> +            rgb_out: port@1 {\n>>>>> +                reg = <1>;\n>>>>> +                #address-cells = <1>;\n>>>>> +                #size-cells = <0>;\n>>>>> +\n>>>>> +                rgb_out_panel: endpoint@0 {\n>>>>> +                    reg = <0>;\n>>>>\n>>>>\n>>>> ditto.\n>>>>\n>>> ok, this will be deleted at next version.\n>>\n>> sorry,this can't be deleted, because rgb output remote endpoint maybe panel\n>> or convert chip, the dts node maybe like this:\n>>\n>> panel: panel {\n>>          status = \"disabled\";\n>>          ports {\n>>                  panel_in_rgb: endpoint {\n>>                          remote-endpoint =  <&rgb_out_panel>;\n>>                  };\n>>          };\n>> };\n>>\n>> bridge: bridge {\n>>          status = \"okay\";\n>>          ports {\n>>                  bridge_in_rgb: endpoint {\n>>                          remote-endpoint =  <&rgb_out_bridge>;\n>>                  };\n>>          };\n>> };\n>>\n>> rgb_out: port@1 {\n>>          reg = <1>;\n>>          #address-cells = <1>;\n>>          #size-cells = <0>;\n>>          rgb_out_panel: endpoint@0 {\n>>                   reg = <0>;\n>>                  remote-endpoint = <&panel_in_rgb>;\n>>          };\n>>          rgb_out_bridge: endpoint@1 {\n>>                   reg = <1>;\n>>                  remote-endpoint = <&bridge_in_rgb>;\n>>          };\n>>   };\n>>\n>> so rockchip_rgb_bind() @ rockchip_rgb.c use reg id to find the remote\n>> actived endpoint.\n>>\n>> for_each_child_of_node(port, endpoint) {\n>>          of_property_read_u32(endpoint, \"reg\", &endpoint_id);\n> \n> Lack of reg property here should imply 0 for endpoint_id.\n> \nok, i will delete this reg id and set the endpoint_id default value to 0 \nwhen lack of reg property at next version, thanks.\n>>          ret = drm_of_find_panel_or_bridge(dev->of_node, 1, endpoint_id,\n>> &rgb->panel, &rgb->bridge);\n>>          if (!ret)\n>>                  break;\n>> }\n>>\n>>>>> +                    remote-endpoint = <&panel_in_rgb>;\n>>>>> +                };\n>>>>> +            };\n>>>>> +        };\n>>>>> +    };\n>>>>> --\n>>>>> 2.7.4\n>>>>>\n>>>>>\n>>>>\n>>>>\n>>>>\n>>>\n>>>\n>>> _______________________________________________\n>>> Linux-rockchip mailing list\n>>> Linux-rockchip@lists.infradead.org\n>>> http://lists.infradead.org/mailman/listinfo/linux-rockchip\n>>\n>>\n> \n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"oH4SG5VY\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xyysn4GPXz9sRV\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 13:00:57 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dvECv-0006l9-Pl; Fri, 22 Sep 2017 03:00:49 +0000","from regular1.263xmail.com ([211.150.99.131])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dvECp-0006HQ-16; Fri, 22 Sep 2017 03:00:46 +0000","from hjc?rock-chips.com (unknown [192.168.167.87])\n\tby regular1.263xmail.com (Postfix) with ESMTP id D4AB66219;\n\tFri, 22 Sep 2017 10:59:59 +0800 (CST)","from [172.16.10.72] (localhost [127.0.0.1])\n\tby smtp.263.net (Postfix) with ESMTPA id 52E693D1;\n\tFri, 22 Sep 2017 10:59:56 +0800 (CST)","from [172.16.10.72] (unknown [58.22.7.114])\n\tby smtp.263.net (Postfix) whith ESMTP id 29105SWAHK4;\n\tFri, 22 Sep 2017 10:59:59 +0800 (CST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:\n\tContent-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From:\n\tReferences:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=+NdKXUmdtf2iZlpXGVp6Dp020CIAC7DkK/C6fFqrGUg=;\n\tb=oH4SG5VYoZj1r5oPpnJ3Tj6ol\n\tgKzqVNCXl/J3KU4kQ9xergNDpaEzAdDqDCGYHwLRWZ3ssgsusiID/8EUBcMj+9s7oZz0Y1p8zpE8u\n\tUnOsOZmBtL1p8b4DINg0KvkUxljMz0dqHqgzpxXaPMEpeLvyAPb+++td2y9OPGyTq3q3AhdOOLctz\n\tCA3lws+cuaOE2JO9uoL71avudnPaMuxSFYJDA2n+hHnh6dwYLH4e97/cS8NpBQynCqIVQO5n67CCD\n\tzE3aGjMmufTJc8rtkoIKtNJHzVA5cCkQDkOVTT+/NNMts4TSChWXrTm+arPXxcuoNHQxafjfiElzv\n\tXEtnrdJPg==;","X-263anti-spam":"KSV:0;","X-MAIL-GRAY":"0","X-MAIL-DELIVERY":"1","X-KSVirus-check":"0","X-ABS-CHECKED":"4","X-RL-SENDER":"hjc@rock-chips.com","X-FST-TO":"sandy.huang@rock-chips.com","X-SENDER-IP":"58.22.7.114","X-LOGIN-NAME":"hjc@rock-chips.com","X-UNIQUE-TAG":"<e5e95f2fabdc35215602474e3187b965>","X-ATTACHMENT-NUM":"0","X-SENDER":"hjc@rock-chips.com","X-DNS-TYPE":"0","Subject":"Re: [PATCH 1/3] dt-bindings: Add document for rockchip RGB output\n\tinterface","To":"Rob Herring <robh@kernel.org>","References":"<1505360594-196508-1-git-send-email-hjc@rock-chips.com>\n\t<1505360600-196567-1-git-send-email-hjc@rock-chips.com>\n\t<20170919144621.eledmglqgn7nf7zp@rob-hp-laptop>\n\t<d631ff56-e3e6-688f-d9b6-a7101ce047d5@rock-chips.com>\n\t<6cd1ac0d-bc99-f8f3-15da-799f8623ce65@rock-chips.com>\n\t<CAL_JsqK7kR5QuBCCgGkOTfw041_k4qsUsNdm0cft=C3UWTfxoQ@mail.gmail.com>","From":"Sandy Huang <hjc@rock-chips.com>","Message-ID":"<e70e572d-5b44-43dd-3b66-0cd6e71cbedc@rock-chips.com>","Date":"Fri, 22 Sep 2017 10:59:58 +0800","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<CAL_JsqK7kR5QuBCCgGkOTfw041_k4qsUsNdm0cft=C3UWTfxoQ@mail.gmail.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170921_200043_756334_CE32D3CD ","X-CRM114-Status":"GOOD (  11.16  )","X-Spam-Score":"-3.2 (---)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-3.2 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server\n\t[58.22.7.114 listed in dnsbl.sorbs.net]\n\t-2.8 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)\n\t[211.150.99.131 listed in wl.mailspike.net]\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [211.150.99.131 listed in list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>,\n\t\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>,\n\tHeiko Stuebner <heiko@sntech.de>, David Airlie <airlied@linux.ie>,\n\t\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>,\n\tdri-devel <dri-devel@lists.freedesktop.org>,\n\t\"open list:ARM/Rockchip SoC...\" <linux-rockchip@lists.infradead.org>, \n\t\"linux-arm-kernel@lists.infradead.org\"\n\t<linux-arm-kernel@lists.infradead.org>, \n\tMark Yao <mark.yao@rock-chips.com>","Content-Transfer-Encoding":"base64","Content-Type":"text/plain; charset=\"utf-8\"; Format=\"flowed\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}}]