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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BECAFC4332F for ; Thu, 3 Nov 2022 16:27:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=p/6joFNTMfFT6M0oyr5MrPOj7uPxLr/qsCpojqCwG8k=; b=jNOw/10G6WDDuR L4Tu5LwSw9raVCzUdgjW8DhwDjAIM4M9utGmilW7TxUAUtOGYKs5bINPEhlHyGWsBr4iDJvu3+YYV N4OqCXtbgZbyJyZhRRSoW520U3REBQMoESQDLOgRR7ggsURuPWH7/vN7+S6/CrEKdR6ypjDG0Gm82 OBmuTfFjNqVfmpD3Ix7G0VJjg1SquKmnKJMvnIO/i8T2u5RTIlMzZZmcqPi+hfA9YC73XaOLV8Wfv y5dkeY+xPM7DJlkEDwRtoRSmlYVW45Yl9OEt+r3OwEECR5WqnFgt9hglDM3bqu7Jtmzph+w0RPGwH eZqa65jLcHWDCbZ9QNrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqd2e-000g7N-2Q; Thu, 03 Nov 2022 16:26:08 +0000 Received: from phobos.denx.de ([85.214.62.61]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqd2a-000g5L-EJ for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2022 16:26:06 +0000 Received: from [127.0.0.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 BDD68851A0; Thu, 3 Nov 2022 17:26:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1667492763; bh=EVpiTL21LLWyJWLj3jAATwRKdOChMdmXNQfgNQ5inOs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Z46gvj2SUgjqF8l8TidhCOu4q6BI+e4OPqeRUSdW2SuXubbtRD9ywFIxSg6F+CsOz Tv1H6BqrRgOszVUkIIQCjjuY+PDkH5hps16v/ORrqS/P78nRmYMfir8hu6EN13VVNC x2IE3Ozti3UI5a/sigyexBoXhYuXQeEBUW/QPI+LhLg2lxDOU7P7LieEzctiwEu822 yr6koc/dsTYE6WJz7Stw1bpGaZdW/bfkRnycWW0SnQnmqNlY4jJR72bEVkINWCHXw6 lWXVMYyYObxbjux2NqqxeaJi246gBx4u9Qjfipu5ZGE8h6joDNkCt1fOlx076/4exI lPTVY8ufK/zFQ== Message-ID: <96bed121-3841-5776-8a35-e630e168ea83@denx.de> Date: Thu, 3 Nov 2022 17:03:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v7 07/10] drm: bridge: samsung-dsim: Add atomic_get_input_bus_fmts Content-Language: en-US To: Jagan Teki Cc: Andrzej Hajda , Inki Dae , Marek Szyprowski , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Fancy Fang , Tim Harvey , Michael Nazzareno Trimarchi , Adam Ford , Neil Armstrong , Robert Foss , Laurent Pinchart , Tommaso Merciai , Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula References: <20221005151309.7278-1-jagan@amarulasolutions.com> <20221005151309.7278-8-jagan@amarulasolutions.com> From: Marek Vasut In-Reply-To: X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221103_092604_821850_EBDD5D38 X-CRM114-Status: GOOD ( 19.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/3/22 08:40, Jagan Teki wrote: > On Mon, Oct 17, 2022 at 12:54 PM Marek Vasut wrote: >> >> On 10/17/22 05:58, Jagan Teki wrote: >>> On Sun, Oct 16, 2022 at 3:31 AM Marek Vasut wrote: >>>> >>>> On 10/5/22 17:13, Jagan Teki wrote: >>>> >>>> [...] >>>> >>>>> @@ -1321,6 +1322,32 @@ static void samsung_dsim_atomic_post_disable(struct drm_bridge *bridge, >>>>> pm_runtime_put_sync(dsi->dev); >>>>> } >>>>> >>>>> +#define MAX_INPUT_SEL_FORMATS 1 >>>>> + >>>>> +static u32 * >>>>> +samsung_dsim_atomic_get_input_bus_fmts(struct drm_bridge *bridge, >>>>> + struct drm_bridge_state *bridge_state, >>>>> + struct drm_crtc_state *crtc_state, >>>>> + struct drm_connector_state *conn_state, >>>>> + u32 output_fmt, >>>>> + unsigned int *num_input_fmts) >>>>> +{ >>>>> + u32 *input_fmts; >>>>> + >>>>> + *num_input_fmts = 0; >>>>> + >>>>> + input_fmts = kcalloc(MAX_INPUT_SEL_FORMATS, sizeof(*input_fmts), >>>>> + GFP_KERNEL); >>>>> + if (!input_fmts) >>>>> + return NULL; >>>>> + >>>>> + /* This is the DSI-end bus format */ >>>>> + input_fmts[0] = MEDIA_BUS_FMT_RGB888_1X24; >>>>> + *num_input_fmts = 1; >>>> >>>> Is this the only supported format ? NXP AN13573 lists the following: >>> >>> At least it only formats I have tested on my panel. >>> >>>> >>>> i.MX 8/RT MIPI DSI/CSI-2, Rev. 0, 21 March 2022 >>>> 3.7.4 Pixel formats >>>> Table 14. DSI pixel packing formats >>>> >>>> Loosely Packed Pixel Stream, 20-bit YCbCr, 4:2:2 >>>> Packed Pixel Stream, 24-bit YCbCr, 4:2:2 >>>> Packed Pixel Stream, 16-bit YCbCr, 4:2:2 >>>> Packed Pixel Stream, 30-bit RGB, 10-10-10 >>>> Packed Pixel Stream, 36-bit RGB, 12-12-12 >>>> Packed Pixel Stream, 12-bit YCbCr, 4:2:0 >>>> Packed Pixel Stream, 16-bit RGB, 5-6-5 >>>> Packed Pixel Stream, 18-bit RGB, 6-6-6 >>>> Loosely Packed Pixel Stream, 18-bit RGB, 6-6-6 >>>> Packed Pixel Stream, 24-bit RGB, 8-8-8 Format >>>> >>>> The MX8MM/MN LCDIF can generate all of those RGB formats , the MX8MP >>>> LCDIFv3 can also generate the 16bit YCbCr . >>>> >>>> It seems there should be more formats here. >>> >>> The idea of this patch is to support the default format first, and can >>> possibly add future patches with the addition of new formats. >> >> Since you already know about the list, please add all the formats, so we >> won't be adding known broken code first, only to fix it later. > > Okay. I can see the DSI section Mini TRM shown below formats. (13.6.2 Features) > > Supports pixel format: 16bpp, 18bpp packed, 18bpp loosely packed (3 byte > format), and 24bpp > > I will try to add these 4 formats. let me know. You should be able to add all but the 'Packed Pixel Stream, 12-bit YCbCr, 4:2:0' which would have to be defined (that's a few lines patch?). _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel