Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp5389504rwb; Mon, 8 Aug 2022 18:36:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR49IMDRUNBC8eZfgUbC+Z4/8K3gs5cTwM3fdJgFUMh9XmLs3YCnGKlVGUm35Rk+MmHrzfGa X-Received: by 2002:a17:907:781a:b0:730:cd06:3572 with SMTP id la26-20020a170907781a00b00730cd063572mr15719631ejc.487.1660008998032; Mon, 08 Aug 2022 18:36:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660008998; cv=none; d=google.com; s=arc-20160816; b=wniiBJW0QUQx/ihTFQ/N3NSQ3oVvWuaoWWVDCPTNqqj9c2OeJOqwqm5qzsyHyxEFqN Mh+aD7+DcynDuwpbmOUHvqCumgdp/1w9l2oQkNOmfqcPiraqGMLpuyds02h8GHpPBM6Y pPerrpz6/gHxYiKo/1CpaLgyWa42tg5GyIqKZwWHPZLBdijtQLoAwNYzVOtc3gtLtfQI yP0ABs67Ikmj1kcud7VwMHNQdxkrKLG/hgMYHU4pHQznNEzd+PkXVyN/i+SYeoHvF655 kuS+YutXKXb2epn70ny/fuGq2HDCBuWw6mWNjQr5imCOKTReXe6dBRelbuWPO6W1OO01 iDew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=goK8Xyy9CXnnnf5aAlKG6fKJPnCIUrulzRORKlgOilg=; b=E4Y9/LnBhHxSMiQfd1jbmowuxXIOt5+vgxhPgp2ceEeCq2kkpqSji/2A63s5Om5tr2 yXnbckKOwdgvxdjhW1EvjmQFIESGauv2/I2cUnm7/aaMnCxQ2tD271bt2/pFkCZVCv0+ OTrGqUYryP3zIPel9MmXGzEnj6DaHaphr6UrKnfqRCbk/xz4+k01QFkc/EdJxGdT+b89 RGezvgsUerpsW8uBoGhC6Hn4pW87G664rNIHcQQ3BZ6HNfzuWY7SyO9xwCfR08gWSLo1 mo//rVjz5m2POBhfahYjmyYKVgaIMAXL9RAeJ7MuHJLGupDwbMp507HG0OWnniZtHRq2 OL5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=OJyY+JZV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n2-20020a5099c2000000b0043dd2989916si8291409edb.608.2022.08.08.18.36.05; Mon, 08 Aug 2022 18:36:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=OJyY+JZV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232153AbiHIBZV (ORCPT + 99 others); Mon, 8 Aug 2022 21:25:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230441AbiHIBZT (ORCPT ); Mon, 8 Aug 2022 21:25:19 -0400 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3328CB3B; Mon, 8 Aug 2022 18:25:15 -0700 (PDT) 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 94CB1845A5; Tue, 9 Aug 2022 03:25:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1660008311; bh=goK8Xyy9CXnnnf5aAlKG6fKJPnCIUrulzRORKlgOilg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=OJyY+JZVJF8GVtbbz92GXnTeWynqEa2Gfb6K0/BOUVjuV/WpEnqWXxNIrw4CcX1bZ 3LypYW6m/ynPf82BIJfOSZr4TP+oAbw4yCc2i40BUx34a5LJhKswMymFLhwdfg1LW+ QFwR549mlYbg5BcDir8gmDt6x1ycjgchvmxFUIo2ygDFOdhj8bH2a3fUOqFmG2Np4e 8XY5utnnYKQkltJjJYNFFQiTf+/tHsT239xyKvp26bRwgSZXCK//R5qmu4RyszmrTJ 3J2oIVr+hhVkJnf64RfBAdhy7rEHXdNjtrSBFp0mLarDL6570BzGik6nefc6udnZed yjOaHTC4lvbwg== Message-ID: Date: Tue, 9 Aug 2022 03:25:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v3 2/4] dt-bindings: display: add new bus-format property for panel-dpi Content-Language: en-US To: Max Krummenacher Cc: max.krummenacher@toradex.com, Laurent Pinchart , Rob Herring , Dave Stevenson , Maxime Ripard , Christoph Niedermaier , Francesco Dolcini , Daniel Vetter , David Airlie , Krzysztof Kozlowski , Rob Herring , Sam Ravnborg , Thierry Reding , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20220628181838.2031-1-max.oss.09@gmail.com> <20220628181838.2031-3-max.oss.09@gmail.com> <7e30f558-d42e-9751-7729-f0422f3926fa@denx.de> From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/8/22 15:56, Max Krummenacher wrote: > Hi Marek Hello Max, [...] >>> + properties: >>> + bus-format: >>> + $ref: /schemas/types.yaml#/definitions/uint32 >>> + minimum: 0x1001 >>> + maximum: 0x1fff >>> + description: | >>> + Describes how the display panel is connected to the display interface. >>> + Valid values are defined in . >>> + The mapping between the color/significance of the panel lines to the >>> + parallel data lines are defined in: >>> + https://www.kernel.org/doc/html/v5.17/userspace-api/media/v4l/subdev-formats.html#packed-rgb-formats >> >> I am not sure whether I should re-open this discussion, but I still >> wonder, wouldn't it be better to describe the DPI bus color channel >> ordering (RGB, BGR, ...), width of each color channel in bits, pixel >> format (RGB, YUV, ...) instead of using specific constants for the >> entire format ? > >>From a system view it would be hard to define that structure which > will catch any and all future requirements. Assume that there will be > 3D panels and they will need an additional depth field. You can very much say you have panels which require Y/U/V color channels instead of R/G/B , and then just add more color channels as needed. But that -- color channel, their order, offset, bit width, can be described rather easily, something like: color-channel-names = "R", "G", "B"; color-channel-width = <8 8 8>; color-channel-shift = <16 8 0>; > Or in > in addition to RGB data there will be a fourth color component. Or > whatever the panel manufacturers might come up with... > Or consider the Tegra 30 example I brought up in this thread. Tegras can > output RGB666 for 18bit panels, and then use the next 8 bits to extend > to 24bit (Maybe RGB666RGB222 ?). I think there are two options here: 1) Look at 'data-lanes' property on DSI ? Both the DSI host and DSI device define the 'data-lanes' property per endpoint and they might not be the same. But with DPI, the better option might be: 2) Implement something like LVDS codec, some sort of transparent DPI bridge driver which can be defined in DT and represent the "glue" wiring adapter between the mismatched DPI source and sink formats. > https://lore.kernel.org/all/71ef1b35301330d0bbb64844247b6c4c2237ad1c.camel@gmail.com/ > If such requirements pop up the enumeration can be extended with a new > value without changing the binding in any way, with a structured > approach this will require changed bindings, maybe even with issues > in backward compatibility. If we have 2) which would describe how the DPI wires were connected, like "channel R got shifted by two bits, bottom two bits got replicated, etc.", then maybe we can avoid introducing new non-standard formats altogether ? >>From an implementation perspective for Linux the busformat in code is > currently an enumeration. So one would have to take the device tree > structured busformat and run it through a potentially complicated > function to get to the Linux busformat enumeration value. The final > consumer has no advantage over what is there today. > > IMHO a change away from one enumeration value to a structured approach > creates some drawbacks without any obvious advantages. > > Comments, other views on that? See above.