Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29579077rwd; Wed, 5 Jul 2023 14:10:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ586yXKeeEtT/PNZ2Bc6onBNRKKDhAYShyjWpc6r78vthQk1rBD+oiT34LjOR3q2o1cwHof X-Received: by 2002:a05:6808:1509:b0:3a1:f36c:3fdb with SMTP id u9-20020a056808150900b003a1f36c3fdbmr23200663oiw.47.1688591421145; Wed, 05 Jul 2023 14:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688591421; cv=none; d=google.com; s=arc-20160816; b=Oi376Thld1vz44oOP08sflg10U6etJ/UGP0z8pvbjNEGbzNYkzmv/zat6zTMFSOCSt eUdymVpRKXQYsm2ehBiZTI8BfiBImgHYEN1zDJaIHpnW6IEYZEipGyBonX2buL8U8e7K wz1YC/LArdZ9RJJWjRUTI9fPYK4wspZal7M5elF60ue1cOfzwLaZ9QZXqFiC8qE7eRQE oFcvhUvwBbsuul+ndbNpuM0kD3Acdmv5YpQd6w6aiWPASAU/Ne8auwn+Hq94Ga5kCKzF jcpuHd0DYyc2HVnF2lb07C4P6h9+BA447G3ytESH3RQ08qVXHcBvPW+oqbubveSqd9SR 372A== 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=QedvqYyJQViKyDdMD30O1M4fPDEkDaVf9Y43Xrvhkbs=; fh=mONBiO0NcdIBoq4UhDlziX7k7xt36H++thJDcMLZ4+I=; b=qLdprxG4ew81mjJ4683zgbVjXRgJBPRCmyvEfhjrKC6bDji3lL3WBwPyyC0FUpjkF+ bOEgvhm/Q/eJL9iDhno8HILl6jDea1Q2433zS00gacurqrDps8qlMYHt056M93PjT0Wd +2a7HsF+PeKeE+i/iXFLuBcGA41dkHhDzZfPzDa++hZQ1ztqfyU1mkuSZ0nDjNfiQPbr eEroaASbtuZFRbeG/2HIRLv5fFwR6tzfW3N79N8CuIgXNCOC40RTh5Z6x5Kjn5sLEZEk x6atDrdZSYnMp3rnvzQALnGyNdF4laqbZlSB+oEvlpeVYKtVTHaObm6652kwy0h4+Wav hhLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gT9o+qi7; 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 x37-20020a634a25000000b005307b843a98si26895pga.53.2023.07.05.14.10.06; Wed, 05 Jul 2023 14:10:21 -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=gT9o+qi7; 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 S232200AbjGEUJr (ORCPT + 99 others); Wed, 5 Jul 2023 16:09:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231967AbjGEUJq (ORCPT ); Wed, 5 Jul 2023 16:09:46 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30910173B for ; Wed, 5 Jul 2023 13:09:44 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2b6a6f224a1so117958841fa.1 for ; Wed, 05 Jul 2023 13:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688587782; x=1691179782; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=QedvqYyJQViKyDdMD30O1M4fPDEkDaVf9Y43Xrvhkbs=; b=gT9o+qi7q8GI67qc4H1S3zeZyOR3NCtEjmK0kMBoZOTeO4eBGtk6kqTc+1ashkwQ4g GQVIp1YvHYbKOlHdL5mAsdfcLO/RGERkQTLW0IfvDcrRWKwVkAvr0CmU8an6E82KjVW6 Ucj9ymEzDo7uDP33JNxTLDI9R22B3AeH8O6HGYoSJA4yz43ZseJkxwt51XIT3TSmNI1n vOkWp+ZH42ubdsgyAVft+AF3xzr2r269xq4FQvq9HjdwNgAdx/Wkmki0UyxiXhrKxQu/ mANCf5VBOihpSsQnOFfrROEzMY0EXY059H57mHKkudw/2UEgv0Qyh3kUffcYG9JXaU4f Dc3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688587782; x=1691179782; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QedvqYyJQViKyDdMD30O1M4fPDEkDaVf9Y43Xrvhkbs=; b=YUhdWy6wmvkT1Q/CVNEdz8/uSrDErIIi8wbVRtXxzEMSjpHIZFxfxwywSNfwNL/Pfh Y7hFhRDjnx4FenofNKBVNI2y8SKri1FFNGQV9h2MHWXewslQUsf67vSFNy1wemegyzp0 DwSWLboL9YEJxKAMgodsw9y/wzeE382qYW+AcIpqI6WpYf78ezl5xxtvu13iVrGph+tH I+WVZxs5uq76KEiU5Fea+fEkTVuL7pRuJOq1f6Hp3lGxF4pe6QxSSoh9hH42w7/2paq3 rm1AnYKYbuk7qmJmK5wj3wg55gdf0i5chCYn5Td+OmexVqYTuh+5mQSPB2kmmALrqmLQ kkqA== X-Gm-Message-State: ABy/qLZFprBSJFY9jaf14+t6IRxJ4bihkmlL4ZTDDLLC79WKUXcBwzHE WY797WZu+0t/U1NS7aDX73dV9w== X-Received: by 2002:a2e:8e8d:0:b0:2b6:cf18:7397 with SMTP id z13-20020a2e8e8d000000b002b6cf187397mr10609414ljk.5.1688587782244; Wed, 05 Jul 2023 13:09:42 -0700 (PDT) Received: from ?IPV6:2001:14ba:a0db:1f00::8a5? (dzdqv0yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::8a5]) by smtp.gmail.com with ESMTPSA id j10-20020a2e850a000000b002b6ca539d92sm3957501lji.138.2023.07.05.13.09.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jul 2023 13:09:41 -0700 (PDT) Message-ID: Date: Wed, 5 Jul 2023 23:09:40 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: RFC: DSI host capabilities (was: [PATCH RFC 03/10] drm/panel: Add LGD panel driver for Sony Xperia XZ3) Content-Language: en-GB To: Maxime Ripard Cc: Neil Armstrong , 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: <617c8f8a-1fc7-c6a0-eaa5-ce75ff2adc1b@linaro.org> <739a8bd9-9ff0-5072-fdae-b64efdf86842@collabora.com> <47a5678c-1eb3-dfc2-a9ac-f8e497455d11@linaro.org> <6e070141-8c0e-59ed-8a08-58c3fadb17df@linaro.org> From: Dmitry Baryshkov 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,URIBL_BLOCKED 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 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. -- With best wishes Dmitry