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 X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE4A7C433ED for ; Thu, 6 May 2021 20:51:36 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 40D1060FE8 for ; Thu, 6 May 2021 20:51:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40D1060FE8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 659D46EDBF; Thu, 6 May 2021 20:51:35 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1A5EF6EDBF for ; Thu, 6 May 2021 20:51:34 +0000 (UTC) Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id D87DA82CF3; Thu, 6 May 2021 22:51:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1620334292; bh=Qlgw/zJ1mlSvjCPgpk6zmUAsbVyye0JiIHR3CntzYPw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=FNKYcod6syJhoZZ+hUGQhrD0BdEWkERTYi8amXjjE45kSRDdQ7kxaMwdDp2NCrgzS M47AYQ6faTzVIYTWKIN+wIVLbIwqFIMPxNz391iCDxsJFkB/66KaEnQLQTlew2M/RZ 7U7RySYL9WS9vAFAd0Upg4Enlr91O/WNwrxlQHGsYLpndnoB6s/ofwehVYjbKMEGq/ 0J+o3OaaCPSCwlG/o9THl9n0gkLoEkM7vN+MfAoDoYKz2+xczFWReCMF9uzAhaGAxF lG1VVldE65sIwqV4MLgK8NTc1ll57HgIZ+SNQrl1g43aWn1QeQz0fSYd8I6IIGiVIn tK5iAqFDzt5cA== Subject: Re: [PATCH V3 2/2] drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver To: Frieder Schrempf , dri-devel@lists.freedesktop.org References: <20210505100218.108024-1-marex@denx.de> <20210505100218.108024-2-marex@denx.de> <2655a86a-d371-6a5a-715a-53b73a696d28@kontron.de> <7da2c2d2-fb02-0a1b-d853-bfd756a0cd9b@denx.de> <61e269b7-870a-01a8-722b-15c9aecf9bf9@kontron.de> From: Marek Vasut Message-ID: <8985230f-cb0a-43ca-f8f7-66898f85dc2b@denx.de> Date: Thu, 6 May 2021 22:51:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <61e269b7-870a-01a8-722b-15c9aecf9bf9@kontron.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean 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: Loic Poulain , ch@denx.de, Douglas Anderson , Stephen Boyd , Philippe Schenker , Jagan Teki , Valentin Raevsky , Sam Ravnborg , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 5/6/21 6:03 PM, Frieder Schrempf wrote: > On 06.05.21 17:46, Marek Vasut wrote: >> On 5/6/21 5:38 PM, Frieder Schrempf wrote: >> [...] >>> Works on i.MX8MM with SN65DSI84 and a single link LVDS display (1024x600) and from my perspective everything else also looks good. Thanks for your work! >>> >>> I have two remarks: >>> >>> 1. In my test I couldn't get it to work with four DSI lanes enabled (only with two) but I'm quite sure that the DSIM driver is to blame as everything on the bridge level looks good (also setting the DSI EQ register didn't help as you suggested, Marek). >> >> I suspect there is indeed something with the DSIM going on, I'll keep you posted if I find something out. >> >>> 2. When I set MEDIA_BUS_FMT_RGB888_1X7X4_SPWG in the panel driver I get distorted colors. I need to use MEDIA_BUS_FMT_RGB888_1X24 to make it work, but this is not valid for LVDS. Again I don't think this driver is to blame as I can't see where it does anything wrong, but my experience here is very limited so I still want to mention it. >> >> Hmm, in that conversion supposed to happen in this bridge driver or should MXSFB handle the SPWG pixel format ? Or should the DSIM bridge do something about that ? > > As far as I understand it the conversion is already done by the DSI84 without any extra configuration necessary. The only thing that needs to be done is selecting the LVDS output format via CHx_24BPP_MODE and CHx_24BPP_FORMAT1 which the driver currently hardcodes to 24bpp aka MEDIA_BUS_FMT_RGB888_1X7X4_SPWG. I think the DSI input format is always 24bpp aka MEDIA_BUS_FMT_RGB888_1X24. The DSI is MEDIA_BUS_FMT_RGB888_1X24, yes. So maybe this bridge driver has to somehow deal with MEDIA_BUS_FMT_RGB888_1X7X4_SPWG ? Except I haven't seen such a thing implemented in other bridge drivers, so input would be welcome on this. > So I wonder where the format actually is evaluated. Could it be that it is passed down to the LCDIF and changes its output format which causes the data passed by DSIM to the DSI84 to already be in the SPWG format? If that's the case we maybe need a way to specify MEDIA_BUS_FMT_RGB888_1X24 as input bus format for the DSI84 so it doesn't pass on the panel's format? Only a wild guess, no idea if it really works like that. I _think_ the bridge must somehow handle the MEDIA_BUS_FMT_RGB888_1X7X4_SPWG <-> MEDIA_BUS_FMT_RGB888_1X24 conversion.