Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30107969rwd; Thu, 6 Jul 2023 00:39:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlGyjgFX77QQ0TFrBnjoxugC7PDTG7ykOrhLFDBggphmLcAFy0KVZz8G6hHveXwaFZ/d4dCJ X-Received: by 2002:a05:6358:2905:b0:134:ec26:b53 with SMTP id y5-20020a056358290500b00134ec260b53mr1346578rwb.16.1688629141267; Thu, 06 Jul 2023 00:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688629141; cv=none; d=google.com; s=arc-20160816; b=LzNTFAD2wYQjWAanTGBzBu1FPnCKnA5I+0215wZKc8LsJmT61KXg/1JsZGKbM6f6vO zKAQseiLU3VcUBIE0KIprOX6Kr7kHmJZmomOahynCzLcfU42F+YwY9fiFUtCS0qQrfpg VxZuhefCk+EG2pVIssC82ziH/FWBfXkIJYWrkrXdMHQw5KAO7YbXTflOufG91gMVeqMI l0YbohYyCIGVB1S+3ZdoiFyc26mid2k6eCGqMLd2HhMwu+cGCoYQYnOn3+WveucaI+aC YPpuDQ1mH3JXj2Pdm3WOKrU9PP7bAI0/O3YVntbsBh9EXMLEV1ilLdWDz9Uvli/edG+h Q+kA== 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 :organization:references:cc:to:content-language:subject:reply-to :from:user-agent:mime-version:date:message-id:dkim-signature; bh=309+H+PBAX2oHRfRvkMbpKlusq5HD5Zi6qZ4kOaZfs8=; fh=DrbIcmPyJuEmEkyNCkgDRDn8Cak4SdBrLgQ5NZ3Ku8s=; b=kz4zbpKHIIz9MhB33PRRu2qJLwFnF97ohljUcShHANW0nrLnAntTxo8Qw6d+S05l+B lPm4X3/oC3/tAKA7mMhiwBIpFqZoe0DDD6mS+DfQgD+y9OdFzXU3CEWImupCyXRhPGU2 /3jVDxrklamGHwYHGZG+pVjmrU3lHfHUgdAbMTRg+L7WtPIA8hJ+g07dAQOKTg+0x6et oK7Qt5Tnv0HyCEgzaJNQneaWHu9nC69ffGSuQ821Tx70qJAMINPCozlql87kk/ZHfJfI l/ZIlvtQYno1c1Tgpx6nQ6pgy6xuwWfyvj8KLLDjbXzeFFXD6cml6UiNkRovj/0vrTI2 azyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IvP2VB4S; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv123-20020a632e81000000b00536b4c4b695si955378pgb.136.2023.07.06.00.38.47; Thu, 06 Jul 2023 00:39:01 -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=@linaro.org header.s=google header.b=IvP2VB4S; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233140AbjGFHdZ (ORCPT + 99 others); Thu, 6 Jul 2023 03:33:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233026AbjGFHdX (ORCPT ); Thu, 6 Jul 2023 03:33:23 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 456CE1990 for ; Thu, 6 Jul 2023 00:33:18 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3144bf65ce9so289798f8f.3 for ; Thu, 06 Jul 2023 00:33:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688628797; x=1691220797; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=309+H+PBAX2oHRfRvkMbpKlusq5HD5Zi6qZ4kOaZfs8=; b=IvP2VB4SiXOGQv47glGKQbzd/b6iS3TCWEMnR38LlzdBnrrLx0abTIHa0CvUy0HIRe zdNziOaxTIxo8mJXkrp2lOgJ6pBsWzNVl+URxFt6sm3zqbh83f54D+D6Cwen6M7zwSNj DbZLvwKbIRkyQweY6cdDe9xXydeONKFRFuV0qhsfdTWkcdCpOiS5gojB9ZyuUUtMJ12g kvF6J6M2urHXjUhxcO9+iqL8poCTBvrolJlCoYLkefM7CXn9DzQoSQIrm7bkbYnqH7Dp AWzfpkjvryOmIwJi0O7jYs0746NMU0wJQvCWWTczr4UkqCn8vi8lfy7IoNfV3xi6YLsj YO1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688628797; x=1691220797; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=309+H+PBAX2oHRfRvkMbpKlusq5HD5Zi6qZ4kOaZfs8=; b=aklzbIjutzsAcSF5TVbuh07/7+jdRkGo8Ru09hJMPkGoXtM6rXj3r+M1bNxLpEfU5e O/QTrTttuw287rwf6nhgFJZtqs7yClIe9jsuUhxqzEcs4/milQ8sJ8cCjdVEFpu9CX5i mWYF5Vuvy9dG9shcEZ83Zgwl/UF3RyUSCYSZsGZMfO/wmt+eugsgXcamAXlK9OCxnZ3E 9u+mblYrid8tG9hIplfSJeLd0iLxBQX39sTEkil3PcCmqVnhtF/F5eMqQBf1iOyLU17v 4c6TzdwytfP04i1MAwuFHxWpcY7FcQr1RD/eVkV0n912y0rlJd/pQQaeBXTWjEMq14Oo HIlA== X-Gm-Message-State: ABy/qLaEgX9DfMxVskejcd8LgEGhUs6/iDxjhEYbO/g4dt1COBhq2hAX 8dBIQ4SummwTzNTdDp9MQzIKzg== X-Received: by 2002:a05:6000:4ee:b0:313:e80b:2273 with SMTP id cr14-20020a05600004ee00b00313e80b2273mr730483wrb.46.1688628796648; Thu, 06 Jul 2023 00:33:16 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:15d1:2748:ead4:bdff? ([2a01:e0a:982:cbb0:15d1:2748:ead4:bdff]) by smtp.gmail.com with ESMTPSA id y15-20020a056000108f00b0031433d8af0dsm1093640wrw.18.2023.07.06.00.33.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jul 2023 00:33:16 -0700 (PDT) Message-ID: <9e071beb-9d9d-c6dc-8196-a3e23ea73713@linaro.org> Date: Thu, 6 Jul 2023 09:33:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Subject: Re: RFC: DSI host capabilities (was: [PATCH RFC 03/10] drm/panel: Add LGD panel driver for Sony Xperia XZ3) Content-Language: en-US To: Maxime Ripard , Dmitry Baryshkov Cc: AngeloGioacchino Del Regno , "open list:DRM DRIVER FOR MSM ADRENO GPU" , Caleb Connolly , Krzysztof Kozlowski , AngeloGioacchino Del Regno , Marijn Suijten , Sam Ravnborg , Kuogee Hsieh , Andy Gross , Jessica Zhang , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Conor Dooley , "open list:DRM DRIVER FOR MSM ADRENO GPU" , Abhinav Kumar , Rob Herring , Martin Botka , ~postmarketos/upstreaming@lists.sr.ht, Jami Kettunen , Bjorn Andersson , open list , Konrad Dybcio , freedreno References: <739a8bd9-9ff0-5072-fdae-b64efdf86842@collabora.com> <47a5678c-1eb3-dfc2-a9ac-f8e497455d11@linaro.org> <6e070141-8c0e-59ed-8a08-58c3fadb17df@linaro.org> Organization: Linaro Developer Services In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 06/07/2023 09:24, Maxime Ripard wrote: > On Wed, Jul 05, 2023 at 11:09:40PM +0300, Dmitry Baryshkov wrote: >> On 05/07/2023 19:53, Maxime Ripard wrote: >>> On Wed, Jul 05, 2023 at 06:20:13PM +0300, Dmitry Baryshkov wrote: >>>> On Wed, 5 Jul 2023 at 17:24, Maxime Ripard wrote: >>>>> >>>>> On Wed, Jul 05, 2023 at 04:37:57PM +0300, Dmitry Baryshkov wrote: >>>>>>>>> >>>>>>>>> Either way, I'm not really sure it's a good idea to multiply the >>>>>>>>> capabilities flags of the DSI host, and we should just stick to the >>>>>>>>> spec. If the spec says that we have to support DSC while video is >>>>>>>>> output, then that's what the panels should expect. >>>>>>>> >>>>>>>> Except some panels supports DSC & non-DSC, Video and Command mode, and >>>>>>>> all that is runtime configurable. How do you handle that ? >>>>>>> >>>>>>> In this case, most of the constraints are going to be on the encoder >>>>>>> still so it should be the one driving it. The panel will only care about >>>>>>> which mode has been selected, but it shouldn't be the one driving it, >>>>>>> and thus we still don't really need to expose the host capabilities. >>>>>> >>>>>> This is an interesting perspective. This means that we can and actually have >>>>>> to extend the drm_display_mode with the DSI data and compression >>>>>> information. >>>>> >>>>> I wouldn't extend drm_display_mode, but extending one of the state >>>>> structures definitely. >>>>> >>>>> We already have some extra variables in drm_connector_state for HDMI, >>>>> I don't think it would be a big deal to add a few for MIPI-DSI. >>>>> >>>>> We also floated the idea for a while to create bus-specific states, with >>>>> helpers to match. Maybe it would be a good occasion to start doing it? >>>>> >>>>>> For example, the panel that supports all four types for the 1080p should >>>>>> export several modes: >>>>>> >>>>>> 1920x1080-command >>>>>> 1920x1080-command-DSC >>>>>> 1920x1080-video >>>>>> 1920x1080-video-DSC >>>>>> >>>>>> where video/command and DSC are some kinds of flags and/or information in >>>>>> the drm_display_mode? Ideally DSC also has several sub-flags, which denote >>>>>> what kind of configuration is supported by the DSC sink (e.g. bpp, yuv, >>>>>> etc). >>>>> >>>>> So we have two things to do, right? We need to expose what the panel can >>>>> take (ie, EDID for HDMI), and then we need to tell it what we picked >>>>> (infoframes). >>>>> >>>>> We already express the former in mipi_dsi_device, so we could extend the >>>>> flags stored there. >>>>> >>>>> And then, we need to tie what the DSI host chose to a given atomic state >>>>> so the panel knows what was picked and how it should set everything up. >>>> >>>> This is definitely something we need. Marijn has been stuck with the >>>> panels that support different models ([1]). >>>> >>>> Would you prefer a separate API for this kind of information or >>>> abusing atomic_enable() is fine from your point of view? >>>> >>>> My vote would be for going with existing operations, with the slight >>>> fear of ending up with another DSI-specific hack (like >>>> pre_enable_prev_first). >>> >>> I don't think we can get away without getting access to the atomic_state >>> from the panel at least. >>> >>> Choosing one setup over another is likely going to depend on the mode, >>> and that's only available in the state. >>> >>> We don't have to go the whole way though and create the sub-classes of >>> drm_connector_state, but I think we should at least provide it to the >>> panel. >>> >>> What do you think of creating a new set of atomic_* callbacks for >>> panels, call that new set of functions from msm and start from there? >> >> We are (somewhat) bound by the panel_bridge, but yeah, it seems possible. > > Bridges have access to the atomic state already, so it's another place > to plumb this through but I guess it would still be doable? It's definitely doable, but I fear we won't be able to test most of the panel drivers, should we introduce a new atomic set of panel callbacks ? Or shall be simply move the "new" panel driver supporting atomic to bridge and only use panel_bridge for basic panels ? Neil > > Maxime