[{"id":1765356,"web_url":"http://patchwork.ozlabs.org/comment/1765356/","msgid":"<20170908132932.rfz4hxab4tgntioo@flea.lan>","list_archive_url":null,"date":"2017-09-08T13:29:32","subject":"Re: [PATCH 1/8] ARM: dts: sun6i: Fix endpoint IDs in second display\n\tpipeline","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"Hi,\n\nOn Fri, Sep 08, 2017 at 03:50:09PM +0800, Chen-Yu Tsai wrote:\n> When the second display pipeline device nodes for the A31/A31s were\n> added, it was not known that the TCONs could (through either DRCs)\n> select either backend as their input. Thus in the endpoints connecting\n> these components together, the endpoint IDs were set to 0, while in\n> fact they should have been set to 1.\n> \n> Fixes: 9a26882a7378 (\"ARM: dts: sun6i: Add second display pipeline device\n> \t\t      nodes\")\n> Signed-off-by: Chen-Yu Tsai <wens@csie.org>\n\nShould we CC stable on this one?\n\nThanks!\nMaxime","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=\"VhIlRNnm\"; 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 3xpdV037Ydz9s4s\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 23:30:00 +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 1dqJM5-0000Ff-J0; Fri, 08 Sep 2017 13:29:57 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dqJM1-0000Bm-Pm for linux-arm-kernel@lists.infradead.org;\n\tFri, 08 Sep 2017 13:29:55 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 7CEE620968; Fri,  8 Sep 2017 15:29:31 +0200 (CEST)","from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr\n\t[90.63.216.87])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 4DFE820947;\n\tFri,  8 Sep 2017 15:29:31 +0200 (CEST)"],"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:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=N0iKdK6a9wyGJZiADPHuCz8GkAr4kLLIWFILi4MJN/s=;\n\tb=VhIlRNnmR2u+XrZ7W67iDcAO6\n\tPhLaiNxpVUqHF3HD7OkIfDvPWqLQTK2IkUaFSem2g/xjSZhUCUzBEJTwiZua+8n3WjjqeQXKtGSUt\n\tzE/JDTVFJE7FgmSC3ym3OSQFIaa9tf/DYo/c6hiJ2TuEZPripHpi/bQUgbJz4AzR0m6vHqwCeQdV7\n\tm2XM6ZbcVhXsvLXcb33wFnLzcQSj75GonCLuf23oyzsnff7+o2Pg/Fx8WRdewi1UvsV0EV6A7nwut\n\t5LOfYBIkFixPPmspBmFXCiQqflUXP5KM5gpGHuVKppHbhl8qu8dTP7UCq0az3+jLGTWhWZB4wbJ9x\n\t2WxTZoopQ==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Date":"Fri, 8 Sep 2017 15:29:32 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Chen-Yu Tsai <wens@csie.org>","Subject":"Re: [PATCH 1/8] ARM: dts: sun6i: Fix endpoint IDs in second display\n\tpipeline","Message-ID":"<20170908132932.rfz4hxab4tgntioo@flea.lan>","References":"<20170908075016.18657-1-wens@csie.org>\n\t<20170908075016.18657-2-wens@csie.org>","MIME-Version":"1.0","In-Reply-To":"<20170908075016.18657-2-wens@csie.org>","User-Agent":"NeoMutt/20170714 (1.8.3)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170908_062954_022400_50BAC9DF ","X-CRM114-Status":"GOOD (  12.05  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\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":"David Airlie <airlied@linux.ie>, devicetree@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============2246748104057077717==\"","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":1765368,"web_url":"http://patchwork.ozlabs.org/comment/1765368/","msgid":"<CAGb2v64S9uifdR3H2OSzQP1GBWg0vW3B4_dA7yAOkhC7r15Tug@mail.gmail.com>","list_archive_url":null,"date":"2017-09-08T13:38:23","subject":"Re: [PATCH 1/8] ARM: dts: sun6i: Fix endpoint IDs in second display\n\tpipeline","submitter":{"id":47154,"url":"http://patchwork.ozlabs.org/api/people/47154/","name":"Chen-Yu Tsai","email":"wens@csie.org"},"content":"On Fri, Sep 8, 2017 at 9:29 PM, Maxime Ripard\n<maxime.ripard@free-electrons.com> wrote:\n> Hi,\n>\n> On Fri, Sep 08, 2017 at 03:50:09PM +0800, Chen-Yu Tsai wrote:\n>> When the second display pipeline device nodes for the A31/A31s were\n>> added, it was not known that the TCONs could (through either DRCs)\n>> select either backend as their input. Thus in the endpoints connecting\n>> these components together, the endpoint IDs were set to 0, while in\n>> fact they should have been set to 1.\n>>\n>> Fixes: 9a26882a7378 (\"ARM: dts: sun6i: Add second display pipeline device\n>>                     nodes\")\n>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>\n>\n> Should we CC stable on this one?\n\nIt wouldn't matter for old kernels, but I suppose we should get it right\neverywhere, so we should probably CC stable. Also I forgot to mention\nthat this patch should go in -fixes, while the rest can go in -next.\n\nThanks\nChenYu","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=\"Hsc5iHUm\"; 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 3xpdhs4lgFz9s83\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 23:39:25 +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 1dqJVC-0006AK-C9; Fri, 08 Sep 2017 13:39:22 +0000","from smtp.csie.ntu.edu.tw ([140.112.30.61])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dqJV9-00066N-08 for linux-arm-kernel@lists.infradead.org;\n\tFri, 08 Sep 2017 13:39:20 +0000","from mail-wm0-f51.google.com (mail-wm0-f51.google.com\n\t[74.125.82.51])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits))\n\t(No client certificate requested) (Authenticated sender: b93043)\n\tby smtp.csie.ntu.edu.tw (Postfix) with ESMTPSA id 3E445203B0\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tFri,  8 Sep 2017 21:38:47 +0800 (CST)","by mail-wm0-f51.google.com with SMTP id f199so5117405wme.0\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tFri, 08 Sep 2017 06:38:47 -0700 (PDT)","by 10.223.196.226 with HTTP; Fri, 8 Sep 2017 06:38: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: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=CrghFl0Vw0Ji5pZRsMVEBja0S9DyiYYMU9/uWYEi5ec=;\n\tb=Hsc5iHUmRcvbuK\n\tuF7Wrz+Ya2j5kJCW4RzI2XBeHR8r9f6b2vDD+l17urkrB9Uc+hGalh5buL56CId6XDKlpiwMNxrFo\n\tCu/OmHXcQ6wY8IKmXSQFAV+jfjuOoYzcCiKHTSWfUTh/deXhBF6wLZfQoLr9ysEQb3sMyuLmLgRTe\n\t+o4zaav3sVkcX2MT826Iuj1cvSlqD8wPMYUxomnq476XxJv8gDsHXX5DppPPr2oqeytCeX0E8fFAx\n\taXJfky0M8C53dZ9J6qhMDY/dQtrHbUO5TrXJaqDZ5LdbZ+fGf3FlH2TvqytppDURVzsWW4EIEaRKO\n\tNFVRdIvwywRZzoA4Edqw==;","X-Gm-Message-State":"AHPjjUgzgLM9Jak6wHnGbs1JeRtXbGImRCOYyQrm3M5X2vxLXLmE3/D9\n\tYsuLGii1OLmZwsm6qxWXiqT0enb0bjIlvLldk00=","X-Google-Smtp-Source":"AOwi7QCX5T/tTLj7+VhiMTz09/7az2zPHKhSSruhxY5ww4KkFhRlZXPpYA0fZmeEkWGjWWcwlFwR/6uqddMxLzgXDqQ=","X-Received":"by 10.28.59.215 with SMTP id i206mr1707495wma.116.1504877923840; \n\tFri, 08 Sep 2017 06:38:43 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170908132932.rfz4hxab4tgntioo@flea.lan>","References":"<20170908075016.18657-1-wens@csie.org>\n\t<20170908075016.18657-2-wens@csie.org>\n\t<20170908132932.rfz4hxab4tgntioo@flea.lan>","From":"Chen-Yu Tsai <wens@csie.org>","Date":"Fri, 8 Sep 2017 21:38:23 +0800","X-Gmail-Original-Message-ID":"<CAGb2v64S9uifdR3H2OSzQP1GBWg0vW3B4_dA7yAOkhC7r15Tug@mail.gmail.com>","Message-ID":"<CAGb2v64S9uifdR3H2OSzQP1GBWg0vW3B4_dA7yAOkhC7r15Tug@mail.gmail.com>","Subject":"Re: [PATCH 1/8] ARM: dts: sun6i: Fix endpoint IDs in second display\n\tpipeline","To":"Maxime Ripard <maxime.ripard@free-electrons.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170908_063919_181630_94F7AB08 ","X-CRM114-Status":"GOOD (  10.72  )","X-Spam-Score":"-3.7 (---)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-3.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\n\tmedium trust [140.112.30.61 listed in list.dnswl.org]\n\t0.5 RCVD_IN_SORBS_SPAM     RBL: SORBS: sender is a spam source\n\t[74.125.82.51 listed in dnsbl.sorbs.net]\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":"David Airlie <airlied@linux.ie>, devicetree <devicetree@vger.kernel.org>,\n\tChen-Yu Tsai <wens@csie.org>,\n\tlinux-arm-kernel <linux-arm-kernel@lists.infradead.org>,\n\tdri-devel <dri-devel@lists.freedesktop.org>","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":1765813,"web_url":"http://patchwork.ozlabs.org/comment/1765813/","msgid":"<20170909154140.wmuh46kxamumyspz@flea.lan>","list_archive_url":null,"date":"2017-09-09T15:41:40","subject":"Re: [PATCH 0/8] drm/sun4i: Make both display pipeline work together","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"Hi,\n\nOn Fri, Sep 08, 2017 at 03:50:08PM +0800, Chen-Yu Tsai wrote:\n> Hi everyone,\n> \n> Previously I added support for two display pipelines for the sun4i-drm\n> driver. At the time we did not have support for downstream encoders to\n> actually test the second pipeline, nor having both pipelines active at\n> the same time.\n> \n> With HDMI encoder support now merged and support for it on sun6i in\n> progress, we are now able to test both pipelines being active at the\n> same time, with LCD output from one and HDMI from the other. Testing\n> has revealed some more issues, such as component probing order. Also,\n> we found out that muxing between the display backend and TCON was\n> possible, and required for the second pipeline to work as intended.\n> Last, the number of CRTCs provided to drm_vblank_init needs to be\n> increased for vblanks to work properly.\n> \n> This patch series does a few things:\n> \n>   - Fix endpoint IDs so they conform to what the DT binding stipulates.\n> \n>   - Change the order the individual components are queued up.\n> \n>   - Fix how the TCON gets its ID when the backend-TCON mux is present.\n> \n>   - Support the input mux in the TCON (which selects which backend to\n>     use on the A31/A31s).\n> \n>   - Fix the drm_vblank_init call and pass the correct number of crtcs.\n> \n>   - Add the cross pipeline connections between the DRCs and TCONs on\n>     the A31, conforming to the DT binding and what the hardware is\n>     capable of.\n> \n> More details are available in each individual commit. Please have a look.\n\nI've applied all the commits, with:\npatch 1 in our arm-soc fixes branch\npatch 2-7 in drm-misc-next\npatch 8 in sunxi/dt-for-4.15.\n\nI have a minor comment on one patch that can be fixed in a followup\npatch, so please have a look at my other mail.\n\nThanks for this great work,\nMaxime","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=\"iQ0q3tcR\"; 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 3xqJNV4qzCz9sRY\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSun, 10 Sep 2017 01:42:34 +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 1dqhtw-0000Ud-0h; Sat, 09 Sep 2017 15:42:32 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dqhtU-0000NW-IY for linux-arm-kernel@lists.infradead.org;\n\tSat, 09 Sep 2017 15:42:08 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 966CB20A1C; Sat,  9 Sep 2017 17:41:40 +0200 (CEST)","from localhost (LFbn-TOU-1-209-191.w86-201.abo.wanadoo.fr\n\t[86.201.56.191])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 6F3BD20910;\n\tSat,  9 Sep 2017 17:41:40 +0200 (CEST)"],"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:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=Id3hqNq1yvgkoGeOC8QZjwOpDdOP0hjqLyoRkK8Tsec=;\n\tb=iQ0q3tcRet906sWUr6rdP+GNY\n\thIf2GEBer4tQ0XCHYm+3wol8SyoDjyzti83sLHkSRJhkvYjJmqW3Bj0irYV2iisbddXSLvffqFLRf\n\tFYmnXmC0FNLZHWCIV7viUBkae9HQGrqCvqJj+xJKdjQXn704Px3nB3D9xj/JluQgy4sLC8zCx21un\n\tVp9u+dOUqrWw30x6HFk8I6Ac/4Fc6Z49IJqumWKv+FxiVERGf3MYKzif34ZRW0g5uRjoMXVvI0YC8\n\tIanRR8onI4FPQBcqxFexgV8QoSYqd4I9PhvJ/1S6UfOa8Ot2B149nh05VpzevTQZNBtlV2egm7QPE\n\t8TYG51gng==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT\n\tshortcircuit=ham autolearn=disabled version=3.4.0","Date":"Sat, 9 Sep 2017 17:41:40 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Chen-Yu Tsai <wens@csie.org>","Subject":"Re: [PATCH 0/8] drm/sun4i: Make both display pipeline work together","Message-ID":"<20170909154140.wmuh46kxamumyspz@flea.lan>","References":"<20170908075016.18657-1-wens@csie.org>","MIME-Version":"1.0","In-Reply-To":"<20170908075016.18657-1-wens@csie.org>","User-Agent":"NeoMutt/20170714 (1.8.3)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170909_084204_929059_CC7D5AFE ","X-CRM114-Status":"GOOD (  20.08  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\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":"David Airlie <airlied@linux.ie>, devicetree@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============7454226763559867437==\"","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":1765815,"web_url":"http://patchwork.ozlabs.org/comment/1765815/","msgid":"<20170909154257.wgwybldpmpr6snsc@flea.lan>","list_archive_url":null,"date":"2017-09-09T15:42:57","subject":"Re: [PATCH 4/8] drm/sun4i: tcon: get TCON ID and matching engine\n\twith remote endpoint ID","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"Hi,\n\nOn Fri, Sep 08, 2017 at 03:50:12PM +0800, Chen-Yu Tsai wrote:\n> The device tree binding for sun4i-drm says:\n> \n>     For all connections between components up to the TCONs in the display\n>     pipeline, when there are multiple components of the same type at the\n>     same depth, the local endpoint ID must be the same as the remote\n>     component's index. For example, if the remote endpoint is Frontend 1,\n>     then the local endpoint ID must be 1.\n> \n> We should be able to get the TCON's ID directly from any of the remote\n> endpoints from its input port. With the ID, we can then go through the\n> list of registered engines and find a matching one by ID.\n> \n> However the A31 device tree is incorrect. We assumed that there were no\n> cross pipeline connections between the backends and TCONs. As a result,\n> in all the endpoints between the backends and TCONs of the second\n> display pipeline, the endpoint IDs were incorrectly set to 0, when in\n> fact they should've been set to 1.\n> \n> To maintain compatibility with this incorrect device tree, we first\n> check if the TCON's input port has 1 or many endpoints. If there are\n> more than 1, then it is likely a fixed version, and we can proceed\n> with the new method. If there is only 1 endpoint, then it is possibly\n> an incorrect version, or it could be the SoC only has one pipeline.\n> In either case we fall back to using the old method of traversing\n> the input connections to find a matching engine, and then get its\n> ID.\n> \n> Signed-off-by: Chen-Yu Tsai <wens@csie.org>\n> ---\n>  drivers/gpu/drm/sun4i/sun4i_tcon.c | 121 ++++++++++++++++++++++++++++++++++++-\n>  1 file changed, 118 insertions(+), 3 deletions(-)\n> \n> diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c\n> index 065654dbfb2c..33c20d2f9fb1 100644\n> --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c\n> +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c\n> @@ -463,8 +463,9 @@ static int sun4i_tcon_init_regmap(struct device *dev,\n>   * function in fact searches the corresponding engine, and the ID is\n>   * requested via the get_id function of the engine.\n>   */\n> -static struct sunxi_engine *sun4i_tcon_find_engine(struct sun4i_drv *drv,\n> -\t\t\t\t\t\t   struct device_node *node)\n> +static struct sunxi_engine *\n> +sun4i_tcon_find_engine_traverse(struct sun4i_drv *drv,\n> +\t\t\t\tstruct device_node *node)\n>  {\n>  \tstruct device_node *port, *ep, *remote;\n>  \tstruct sunxi_engine *engine;\n> @@ -502,7 +503,7 @@ static struct sunxi_engine *sun4i_tcon_find_engine(struct sun4i_drv *drv,\n>  \t\t}\n>  \n>  \t\t/* keep looking through upstream ports */\n> -\t\tengine = sun4i_tcon_find_engine(drv, remote);\n> +\t\tengine = sun4i_tcon_find_engine_traverse(drv, remote);\n>  \t\tif (!IS_ERR(engine)) {\n>  \t\t\tof_node_put(remote);\n>  \t\t\tof_node_put(port);\n> @@ -513,6 +514,120 @@ static struct sunxi_engine *sun4i_tcon_find_engine(struct sun4i_drv *drv,\n>  \treturn ERR_PTR(-EINVAL);\n>  }\n>  \n> +/*\n> + * The device tree binding says that the remote endpoint ID of any\n> + * connection between components, up to and including the TCON, of\n> + * the display pipeline should be equal to the actual ID of the local\n> + * component. Thus we can look at any one of the input connections of\n> + * the TCONs, and use that connection's remote endpoint ID as our own.\n> + *\n> + * Since the user of this function already finds the input port,\n> + * the port is passed in directly without further checks.\n> + */\n> +static int sun4i_tcon_of_get_id_from_port(struct device_node *port)\n> +{\n> +\tstruct device_node *ep;\n> +\tint ret = -EINVAL;\n> +\n> +\t/* try finding an upstream endpoint */\n> +\tfor_each_available_child_of_node(port, ep) {\n> +\t\tstruct device_node *remote;\n> +\t\tu32 reg;\n> +\n> +\t\tremote = of_graph_get_remote_endpoint(ep);\n> +\t\tif (!remote)\n> +\t\t\tcontinue;\n> +\n> +\t\tret = of_property_read_u32(remote, \"reg\", &reg);\n> +\t\tif (ret)\n> +\t\t\tcontinue;\n> +\n> +\t\tret = reg;\n> +\t}\n> +\n> +\treturn ret;\n> +}\n> +\n> +/*\n> + * Once we know the TCON's id, we can look through the list of\n> + * engines to find a matching one. We assume all engines have\n> + * been probed and added to the list.\n> + */\n> +static struct sunxi_engine *sun4i_tcon_get_engine_by_id(struct sun4i_drv *drv,\n> +\t\t\t\t\t\t\tint id)\n> +{\n> +\tstruct sunxi_engine *engine;\n> +\n> +\tlist_for_each_entry(engine, &drv->engine_list, list)\n> +\t\tif (engine->id == id)\n> +\t\t\treturn engine;\n> +\n> +\treturn ERR_PTR(-EINVAL);\n> +}\n> +\n> +/*\n> + * On SoCs with the old display pipeline design (Display Engine 1.0),\n> + * we assumed the TCON was always tied to just one backend. However\n> + * this proved not to be the case. On the A31, the TCON can select\n> + * either backend as its source. On the A20 (and likely on the A10),\n> + * the backend can choose which TCON to output to.\n> + *\n> + * The device tree binding says that the remote endpoint ID of any\n> + * connection between components, up to and including the TCON, of\n> + * the display pipeline should be equal to the actual ID of the local\n> + * component. Thus we should be able to look at any one of the input\n> + * connections of the TCONs, and use that connection's remote endpoint\n> + * ID as our own.\n> + *\n> + * However  the connections between the backend and TCON were assumed\n> + * to be always singular, and their endpoit IDs were all incorrectly\n> + * set to 0. This means for these old device trees, we cannot just look\n> + * up the remote endpoint ID of a TCON input endpoint. TCON1 would be\n> + * incorrectly identified as TCON0.\n> + *\n> + * This function first checks if the TCON node has 2 input endpoints.\n> + * If so, then the device tree is a corrected version, and it will use\n> + * sun4i_tcon_of_get_id() and sun4i_tcon_get_engine_by_id() from above\n> + * to fetch the ID and engine directly. If not, then it is likely an\n> + * old device trees, where the endpoint IDs were incorrect, but did not\n> + * have endpoint connections between the backend and TCON across\n> + * different display pipelines. It will fall back to the old method of\n> + * traversing the  of_graph to try and find a matching engine by device\n> + * node.\n> + *\n> + * In the case of single display pipeline device trees, either method\n> + * works.\n> + */\n> +static struct sunxi_engine *sun4i_tcon_find_engine(struct sun4i_drv *drv,\n> +\t\t\t\t\t\t   struct device_node *node)\n> +{\n> +\tstruct device_node *port;\n> +\tstruct sunxi_engine *engine;\n> +\n> +\tport = of_graph_get_port_by_id(node, 0);\n> +\tif (!port)\n> +\t\treturn ERR_PTR(-EINVAL);\n> +\n> +\t/*\n> +\t * Is this a corrected device tree with cross pipeline\n> +\t * connections between the backend and TCON?\n> +\t */\n> +\tif (of_get_child_count(port) > 1) {\n> +\t\t/* Get our ID directly from an upstream endpoint */\n> +\t\tint id = sun4i_tcon_of_get_id_from_port(port);\n> +\n> +\t\t/* Get our engine by matching our ID */\n> +\t\tengine = sun4i_tcon_get_engine_by_id(drv, id);\n> +\n> +\t\tof_node_put(port);\n> +\t\treturn engine;\n> +\t}\n> +\n> +\t/* Fallback to old method by traversing input endpoints */\n> +\tof_node_put(port);\n> +\treturn sun4i_tcon_find_engine_traverse(drv, node);\n\nIn the old DT case, I'd like to have a warning displayed in the log\nsaying that the DT is too old and we won't be able to support the\ndual-pipeline properly, so that the users can at least know that they\nshould update.\n\nCan you add it in a follow-up?\n\nThanks!","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=\"CRIxG+2P\"; 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 3xqJQ970rbz9sRY\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSun, 10 Sep 2017 01:44:01 +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 1dqhvK-00013J-Iz; Sat, 09 Sep 2017 15:43:58 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dqhul-0000uG-Hv for linux-arm-kernel@lists.infradead.org;\n\tSat, 09 Sep 2017 15:43:35 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid D1EB420A1C; Sat,  9 Sep 2017 17:42:57 +0200 (CEST)","from localhost (LFbn-TOU-1-209-191.w86-201.abo.wanadoo.fr\n\t[86.201.56.191])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id A3AFE20910;\n\tSat,  9 Sep 2017 17:42:57 +0200 (CEST)"],"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:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=ZlLdh103zdB4mdCPmK2IYAoNdqM+KPUE36FmDsVRvtg=;\n\tb=CRIxG+2PyuAdUatoNexnAzUaf\n\tBZg7W6ii/0b+l0CzUsQHnprTVQN9f1lF/waojBzn4buD2XMtnYnLF4fjkQERKzIkFBwSKRgiE8Tyd\n\tMzqfXhPQrZISYjr19REGhYag7H1vdtj8GWHKckMWTgYN1HsMFbz3TksrbDs58Hln5+1928/EBwusO\n\tuSM56I1cWPpPhZkfCL28fdgeCzPpH7NYTPx/HBXGW8ZYQWXiP377rKfS6c7OEFz7zdZqqOPiWnHw8\n\t3PEg2x8Un/u+h/hEjl8mc2aUZG5NogI2nvVDsdaVdeh5vdhi0v2t37uaNwIiBjQ/PVeuvcUiBwUaf\n\tudYWG9j+A==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Date":"Sat, 9 Sep 2017 17:42:57 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Chen-Yu Tsai <wens@csie.org>","Subject":"Re: [PATCH 4/8] drm/sun4i: tcon: get TCON ID and matching engine\n\twith remote endpoint ID","Message-ID":"<20170909154257.wgwybldpmpr6snsc@flea.lan>","References":"<20170908075016.18657-1-wens@csie.org>\n\t<20170908075016.18657-5-wens@csie.org>","MIME-Version":"1.0","In-Reply-To":"<20170908075016.18657-5-wens@csie.org>","User-Agent":"NeoMutt/20170714 (1.8.3)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170909_084324_187978_EBEE8F3C ","X-CRM114-Status":"GOOD (  35.39  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\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":"David Airlie <airlied@linux.ie>, devicetree@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============1107126127327056621==\"","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"}}]