Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30107840rwd; Thu, 6 Jul 2023 00:38:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlHH6whOQDzvlPoZrIErFPXvWf3XyzzFKX/NbEjybwwi0rEkDvOvyZwEJ+LFctzE9/GpfEyP X-Received: by 2002:a05:6808:1987:b0:3a1:dac8:9c1f with SMTP id bj7-20020a056808198700b003a1dac89c1fmr1097201oib.29.1688629132723; Thu, 06 Jul 2023 00:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688629132; cv=none; d=google.com; s=arc-20160816; b=QAqFoX2QGtieRAHwMTOUw075/48Mea1UwD8YUHS56ulKORNjape/+ZJ6o6nkPfxiUl GNt/hSikL4wKOAogNDrz+p1MZnTtgDZbUvX+/6Ge+SAsnJD8EvcCcGtux4mR0JbjbffO /ZLSHNnv+oU4eeGACBCXzdQ8q4vZCUJZRYeenPEY4nyx6dBidXqBjEChoTA/aHnrddW3 g3Xqsk1sHavJckU1UKkAABoc6we+hLHK0BvwJNEz6tLldyM8BgWKctlRAieUIa6CH7c4 0FPQDG5+xAYKdSc6hq4cniKLzZR+cEw5OleqgIqEYgfWW0dDfW710Af/+XviC/Speek+ Dd3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9YXus58HFCYWUgF7WtrOWJhmbffOAFniPNX7tWAUfxo=; fh=ngIkZ5oPjRtoPmUxdxl3O8If4p2o/q33OXeC75UODjI=; b=fzvkU/3bTH5u3RNeXjSKXnnbOavgGXjrhqG0Gl6tj/F4vkztfplBkQl3QdZhTvJ20/ US785cCiDP0O1ILXxVA+b+x8gbfm2AJji8mg0jU+4Clp/u60ny4OetaIqlUD2KBkXOHA +79LuR+Ems4p+Fg2fB3UEDvC3VeFpZ8FR2SIUJlbJJbA9IIA1x2UevJIx8Rj0Bzc5fQc bWbdlkeHqnUAXEiCJaalJFF3FFyZhTHFkIpYWaqQz8lsil/PWn5R0KLWsAQqxcz7/OVh 0DPQYZxt7gYJv0iu+NmuRjeFFlZqz79b9Q2APWkiuBQzJVoU0gblVlmrsWyYZdOxyLcB 8PGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tDH99pEA; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ce11-20020a056a002a0b00b0064d3e1db254si878160pfb.347.2023.07.06.00.38.39; Thu, 06 Jul 2023 00:38:52 -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=@kernel.org header.s=k20201202 header.b=tDH99pEA; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233570AbjGFHYh (ORCPT + 99 others); Thu, 6 Jul 2023 03:24:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231467AbjGFHYg (ORCPT ); Thu, 6 Jul 2023 03:24:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A21CDA; Thu, 6 Jul 2023 00:24:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1D1B2618AC; Thu, 6 Jul 2023 07:24:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00539C433C7; Thu, 6 Jul 2023 07:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688628274; bh=9YXus58HFCYWUgF7WtrOWJhmbffOAFniPNX7tWAUfxo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tDH99pEA6Fd2mbUppE/ZRMF5kkfzrmNwbrf5813UjgZuLjKhkbnOipsupdOj5+iye SaSxr3F2i4cyJpW13kGIclP9h3VXOI+TxlD1tAdfZ5C8JSjdj1DYxONWVZuNF4xzDG v5XVG1HC9PzEAl3NU0gkw9P0KfzS3Zt3khkpUWkj65DaMfBNJ/7AOLlQdAFMr0Qh0H rxH/0Q1Thzshs/2dx1pElSqMPidv9wx2Pj13PBtgWJH1Pkcak2Iz4Vhhz5RfIzJKgY 11bAYUFtPch/mF5pn18dTt9D5nF4m/1k4/zfbrC1tnm6RlRySlqzRGijS5Th3MRcsX hqjJQdW1+zQ3Q== Date: Thu, 6 Jul 2023 09:24:31 +0200 From: Maxime Ripard To: Dmitry Baryshkov 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 Subject: Re: RFC: DSI host capabilities (was: [PATCH RFC 03/10] drm/panel: Add LGD panel driver for Sony Xperia XZ3) Message-ID: References: <739a8bd9-9ff0-5072-fdae-b64efdf86842@collabora.com> <47a5678c-1eb3-dfc2-a9ac-f8e497455d11@linaro.org> <6e070141-8c0e-59ed-8a08-58c3fadb17df@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ta6lyqgdkmvaizdf" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 --ta6lyqgdkmvaizdf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: > > > >=20 > > > > On Wed, Jul 05, 2023 at 04:37:57PM +0300, Dmitry Baryshkov wrote: > > > > > > > >=20 > > > > > > > > Either way, I'm not really sure it's a good idea to multipl= y the > > > > > > > > capabilities flags of the DSI host, and we should just stic= k to the > > > > > > > > spec. If the spec says that we have to support DSC while vi= deo is > > > > > > > > output, then that's what the panels should expect. > > > > > > >=20 > > > > > > > Except some panels supports DSC & non-DSC, Video and Command = mode, and > > > > > > > all that is runtime configurable. How do you handle that ? > > > > > >=20 > > > > > > In this case, most of the constraints are going to be on the en= coder > > > > > > still so it should be the one driving it. The panel will only c= are about > > > > > > which mode has been selected, but it shouldn't be the one drivi= ng it, > > > > > > and thus we still don't really need to expose the host capabili= ties. > > > > >=20 > > > > > This is an interesting perspective. This means that we can and ac= tually have > > > > > to extend the drm_display_mode with the DSI data and compression > > > > > information. > > > >=20 > > > > I wouldn't extend drm_display_mode, but extending one of the state > > > > structures definitely. > > > >=20 > > > > We already have some extra variables in drm_connector_state for HDM= I, > > > > I don't think it would be a big deal to add a few for MIPI-DSI. > > > >=20 > > > > 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? > > > >=20 > > > > > For example, the panel that supports all four types for the 1080p= should > > > > > export several modes: > > > > >=20 > > > > > 1920x1080-command > > > > > 1920x1080-command-DSC > > > > > 1920x1080-video > > > > > 1920x1080-video-DSC > > > > >=20 > > > > > where video/command and DSC are some kinds of flags and/or inform= ation in > > > > > the drm_display_mode? Ideally DSC also has several sub-flags, whi= ch denote > > > > > what kind of configuration is supported by the DSC sink (e.g. bpp= , yuv, > > > > > etc). > > > >=20 > > > > So we have two things to do, right? We need to expose what the pane= l can > > > > take (ie, EDID for HDMI), and then we need to tell it what we picked > > > > (infoframes). > > > >=20 > > > > We already express the former in mipi_dsi_device, so we could exten= d the > > > > flags stored there. > > > >=20 > > > > 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. > > >=20 > > > This is definitely something we need. Marijn has been stuck with the > > > panels that support different models ([1]). > > >=20 > > > Would you prefer a separate API for this kind of information or > > > abusing atomic_enable() is fine from your point of view? > > >=20 > > > 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). > >=20 > > I don't think we can get away without getting access to the atomic_state > > from the panel at least. > >=20 > > Choosing one setup over another is likely going to depend on the mode, > > and that's only available in the state. > >=20 > > 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. > >=20 > > 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? >=20 > 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? Maxime --ta6lyqgdkmvaizdf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZKZsLwAKCRDj7w1vZxhR xQYLAQDrdn9drGvi55zx4P3Y2raA/CnwNgRdfA3IyCWJWHEDAgEAhpDQWL3p2wMq vhnP9QUdDtDLVJB0QOPAk5w1qMBU4w0= =CHew -----END PGP SIGNATURE----- --ta6lyqgdkmvaizdf--