From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9DEAC433EF for ; Wed, 11 May 2022 14:58:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1400410E060; Wed, 11 May 2022 14:58:27 +0000 (UTC) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8099E10E086 for ; Wed, 11 May 2022 14:58:25 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20220511145823euoutp02916d9bbed55a6a0d25d6ac89d8e92e0e~uFOjYZjA82958729587euoutp02V for ; Wed, 11 May 2022 14:58:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20220511145823euoutp02916d9bbed55a6a0d25d6ac89d8e92e0e~uFOjYZjA82958729587euoutp02V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1652281103; bh=5ixAvrUuB7Dw/mQY5x1TA+cod0n3aQ95sTxuWXF+1m4=; h=Date:From:Subject:To:Cc:In-Reply-To:References:From; b=ZcsvEOAIDns2LFU5z3ADhDUxQYsTTDdgP8F9Cm5DOIv3U9WCzAH8gs/reIe2h59Qr Ynt9cDHQTlIS0slcwitRkwj0U+sdUzRr+3S3sHX6Iy+UXKrcew5dwarFZKU1A6BZWS rgAjcvM/MoW0b7BvKVrA8TcwGf4/8ka0cqP9tVpk= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20220511145823eucas1p10257e8fc46c594954c5c28e63a8f1f59~uFOi3TpVs2775727757eucas1p1b; Wed, 11 May 2022 14:58:23 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 06.BB.09887.E0FCB726; Wed, 11 May 2022 15:58:22 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20220511145822eucas1p24f9b352d1b3a5430ad65b63d314b70ba~uFOidn0hU0498204982eucas1p2s; Wed, 11 May 2022 14:58:22 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220511145822eusmtrp22a9ce2ee1466388a05088a5ed61eb7b3~uFOibwEJd0616106161eusmtrp2N; Wed, 11 May 2022 14:58:22 +0000 (GMT) X-AuditID: cbfec7f4-471ff7000000269f-f6-627bcf0e37bd Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id F7.C1.09522.E0FCB726; Wed, 11 May 2022 15:58:22 +0100 (BST) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220511145821eusmtip26c2a8a20426c83f41e71bfd1bc2886bc~uFOhgHGOo2411824118eusmtip25; Wed, 11 May 2022 14:58:21 +0000 (GMT) Message-ID: Date: Wed, 11 May 2022 16:58:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 From: Marek Szyprowski Subject: Re: [PATCH V2 0/3] DSI host and peripheral initialisation ordering To: Dave Stevenson , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , DRI Development Content-Language: en-US In-Reply-To: Content-Transfer-Encoding: 7bit X-Brightmail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Qea6G1vN/vvWgqWrVXW3N/O1/VS0 zXwQ8e2/9tr1wWYXdl/wuRSwUuqPiLnYU+2HN/o+TQvq4H/Mvvpxf9MHn4TPCdO2KjO47hOQ POvGXZnr9rK28j5L/Bu9sqti+7c/2LHpy4v7W/gOx0ROf2j56dOnPSWqCpdPMm17pdKzbn82 88sy5f/eytGHb+36e/k1V197+x1zI5M1u+XY/H68uXCOd41WSnT1LRYR9UVK2yQkvk3Td3xr dOuL442tt0N2VmsZJjzP5nrLWvFPuyVZoawoRnfZt7f1r5fl9m+NfvdCzWS7lNHB+7pBP91f bL05U3hZhM+/9qN/DwsJfRaS2H9UiaU4I9FQi7moOBEA63cpCLADAAA= X-CMS-MailID: 20220511145822eucas1p24f9b352d1b3a5430ad65b63d314b70ba X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20220405114402eucas1p1d139ce6825a481d1318f013cf27a5fe7 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220405114402eucas1p1d139ce6825a481d1318f013cf27a5fe7 References: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Jagan Teki , Neil Armstrong , Jonas Karlman , Douglas Anderson , Jernej Skrabec , Dmitry Baryshkov , Robert Foss , Andrzej Hajda , Andrzej Hajda , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Dave, On 05.04.2022 13:43, Dave Stevenson wrote: > On Fri, 18 Mar 2022 at 12:25, Dave Stevenson > wrote: >> On Fri, 4 Mar 2022 at 15:18, Dave Stevenson >> wrote: >>> Hi All >> A gentle ping on this series. Any comments on the approach? >> Thanks. > I realise the merge window has just closed and therefore folks have > been busy, but no responses on this after a month? > > Do I give up and submit a patch to document that DSI is broken and no one cares? Thanks for pointing this patchset in the 'drm: bridge: Add Samsung MIPI DSIM bridge' thread, otherwise I would miss it since I'm not involved much in the DRM development. This resolves most of the issues in the Exynos DSI and its recent conversion to the drm bridge framework. I've added the needed prepare_upstream_first flags to the panels and everything works fine without the bridge chain order hacks. Feel free to add: Tested-by: Marek Szyprowski The only remaining thing to resolve is the moment of enabling DSI host. The proper sequence is: 1. host power on, 2. device power on, 3. host init, 4. device init, 5. video enable. #1 is done in dsi's pre_enable, #2 is done in panel's prepare. #3 was so far done in the first host transfer call, which usually happens in panel's prepare, then the #4 happens. Then video enable is done in the enable callbacks. Jagan wants to move it to the dsi host pre_enable() to let it work with DSI bridges controlled over different interfaces (https://lore.kernel.org/all/20220504114021.33265-6-jagan@amarulasolutions.com/ ). This however fails on Exynos with DSI panels, because when dsi's pre_enable is called, the dsi device is not yet powered. I've discussed this with Andrzej Hajda and we came to the conclusion that this can be resolved by adding the init() callback to the struct mipi_dsi_host_ops. Then DSI client (next bridge or panel) would call it after powering self on, but before sending any DSI commands in its pre_enable/prepare functions. I've prepared a prototype of such solution. This approach finally resolved all the initialization issues! The bridge chain finally matches the hardware, no hack are needed, and everything is controlled by the DRM core. This prototype also includes the Jagan's patches, which add IMX support to Samsung DSIM. If one is interested, here is my git repo with all the PoC patches: https://github.com/mszyprow/linux/tree/v5.18-next-20220511-dsi-rework Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland