Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4430322rdh; Wed, 29 Nov 2023 00:58:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IHis3yQshUOTtQnYnGkY4mTBwNu9eoyYTNhi+Fra0W2ycsLOavFCPSQi/ds1d5jsEt3u1Qa X-Received: by 2002:a05:6871:460b:b0:1fa:3e11:7104 with SMTP id nf11-20020a056871460b00b001fa3e117104mr14705914oab.6.1701248298586; Wed, 29 Nov 2023 00:58:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701248298; cv=none; d=google.com; s=arc-20160816; b=s6hBWLapOke0NmFGTDKkd/IXKzYoFttp2oK8jGdeoSlIWy8IF4kRlP+AqGLxeSyU8F APkxtCC3YhIt82wsI3MsfFZ3tgAPW4Q+H+boU9gztzI0f7sNmLfxvBbDFKeAkYS1vgzZ 82d7NRA/kLXsCzpnDQlBmqmishkmJhuVUm0zDzdYCifaKytuHoVjnsHRXW1m2aMP7M8+ 8fKmy1oNVpVXse6R5U2XhERagV94AAxqwRAsyxYtcOpS98U+5X+8L2eHvEs2G2oVJga4 W2ZZHRI/S0K/ZWNW/aEuL+VpVYBOIeqlCX/r73mWUPjlikOVYTf+puWfmnDYa7FP9KxM koyA== 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:autocrypt:references:cc:to:content-language:subject :reply-to:from:user-agent:mime-version:date:message-id :dkim-signature; bh=GHnCYf5RXf0vnemvHjAASp0ZNFRzPFmZNLDDXI6AIJ8=; fh=67okcqcuVm6p+23+FKvjJlAGLhmw6+W0p0ondai9WB8=; b=wkoXvABu9zLFnPI/Yb5MJFLPgqY2J/9h57ks4AG4IgZYiIG2KJRnz0FOoTnmEP0QtV KgY4CQSYY6Nm+D1tkH4yTXSWWjp586Ni4QTH4hMBgMUPkHE6OJ+ft+v6KxPBQ7pWGP1s H4Y4Sh0VtLcBzDz5QH06hV2K1SVvIxJN1khjoLSZa4FFaSgUqXdjktmUA7PM+zcVPa2V moFtbrDdnvWkUy+lxGg3MmXHlb62WvD/V/p+xARboeUOUNbyvs3OH+0/GRz943rWIX8/ +Kn2O5RbGImGVlaR9mYmtshNIak7f1syZ73lrlUgmXTzkzz2O6zuKU4nmxPzHzhCNgPp nu3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u0S8fDdV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id t9-20020a056a0021c900b006b6cc63a79csi14452478pfj.330.2023.11.29.00.58.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 00:58:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u0S8fDdV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 54FB5805E2CD; Wed, 29 Nov 2023 00:58:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232158AbjK2I57 (ORCPT + 99 others); Wed, 29 Nov 2023 03:57:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232009AbjK2I56 (ORCPT ); Wed, 29 Nov 2023 03:57:58 -0500 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4882512C for ; Wed, 29 Nov 2023 00:58:03 -0800 (PST) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-50bbb4de875so2178279e87.0 for ; Wed, 29 Nov 2023 00:58:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701248281; x=1701853081; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :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=GHnCYf5RXf0vnemvHjAASp0ZNFRzPFmZNLDDXI6AIJ8=; b=u0S8fDdVide38v749X9Zj9CS1gtV4O0Kg5PrATlOhU8GiYznZyl41KL/doRsfGoGBT /C7KbB+E8jHtxVEDLSqLG7nw1pvghBioGVIbS50yGDtfts9UfnQntTN4eoXinkKy9IW8 bdJwNMelkXJpxyxCTBn+YElSnx60jRD+8KMZlOH5q0U0WaZ3itx82/XRBIwoMtIcaGI9 ocFOgboqfFezwXWqmhpgYcHi4ttlpO1GH1ZBLY3ZLDlbEU7YOwvGQ+OLiHM5K/G9wVi/ nVCZvXDgpV+lsXs0Snpgtvc+WcsojrMKzdSxYSeza5aG8LRYvpg59NRA4ZlbBnJ995D5 0m7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701248281; x=1701853081; h=content-transfer-encoding:in-reply-to:organization:autocrypt :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=GHnCYf5RXf0vnemvHjAASp0ZNFRzPFmZNLDDXI6AIJ8=; b=ekXxCR5kxyjsbprYnobUax/7yn2GeJKsOPEpgOHxyFHQD1wPEzDDJPQfHS9ZMBrXuo cIUU+EmoQaMS5eQQEbBZ9ePyqxRr6Y4oo1bDXJsKe/utqv65h1a/NDD5A06l7Mc8bhAD edWkGLUahHZsgROPAQ/0nWa2mAa1Js9oIsLQe0osx2CkPIy7/L5CQlPsSIi5cswVAkGq 2HkHqX5csmYnWiJg6TRXw1O6NVEHL5e1HjxihIxE/RPBKL9UfQbhCUup4wsNiUWpVhLi gvnHU1KCj2sI9DQrUSpu8dtVHUbdTl/eXN4q1CqDspX2T7To8f0aPPJFIesadpzIEHTW 6U2w== X-Gm-Message-State: AOJu0YylqCnJlcy1+WUIIqKs3sDrUOsIcsv23uG+JrlnupzGkJTXB0Em I8aPoiOIujuSdtqe6aJFMP5vhw== X-Received: by 2002:a05:6512:33cd:b0:50b:bc9a:b8b with SMTP id d13-20020a05651233cd00b0050bbc9a0b8bmr3673264lfg.28.1701248281399; Wed, 29 Nov 2023 00:58:01 -0800 (PST) Received: from ?IPV6:2a01:e0a:982:cbb0:31d3:eea3:8f97:6a2c? ([2a01:e0a:982:cbb0:31d3:eea3:8f97:6a2c]) by smtp.gmail.com with ESMTPSA id u19-20020a05600c139300b0040b540ff0a5sm1058902wmf.19.2023.11.29.00.57.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Nov 2023 00:58:00 -0800 (PST) Message-ID: <63cc17a9-d28d-43e3-9e04-249534a96d38@linaro.org> Date: Wed, 29 Nov 2023 09:57:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Subject: Re: [RFC PATCH 03/10] drm/mipi-dsi: add API for manual control over the DSI link power state Content-Language: en-US, fr To: Laurent Pinchart , Maxime Ripard Cc: Greg Kroah-Hartman , Dmitry Baryshkov , Dave Stevenson , Andrzej Hajda , Robert Foss , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Douglas Anderson , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , Konrad Dybcio , Jessica Zhang , Marek Vasut , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org References: <1696f131-83fb-4d0c-b4d7-0bdb61e4ae65@linaro.org> <2z3yvvtd6ttsd7qw43sl5svtfijxevdr6omxxmws64k6l5qv55@5nnh2b32h2ep> <2023110704-playback-grit-7a27@gregkh> <2023110704-deem-jigsaw-0bbf@gregkh> <20231108155836.GB21616@pendragon.ideasonboard.com> Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk Q5wSAhkBAAoJEBaat7Gkz/iuyhMIANiD94qDtUTJRfEW6GwXmtKWwl/mvqQtaTtZID2dos04 YqBbshiJbejgVJjy+HODcNUIKBB3PSLaln4ltdsV73SBcwUNdzebfKspAQunCM22Mn6FBIxQ GizsMLcP/0FX4en9NaKGfK6ZdKK6kN1GR9YffMJd2P08EO8mHowmSRe/ExAODhAs9W7XXExw UNCY4pVJyRPpEhv373vvff60bHxc1k/FF9WaPscMt7hlkbFLUs85kHtQAmr8pV5Hy9ezsSRa GzJmiVclkPc2BY592IGBXRDQ38urXeM4nfhhvqA50b/nAEXc6FzqgXqDkEIwR66/Gbp0t3+r yQzpKRyQif3OwE0ETVkGzwEIALyKDN/OGURaHBVzwjgYq+ZtifvekdrSNl8TIDH8g1xicBYp QTbPn6bbSZbdvfeQPNCcD4/EhXZuhQXMcoJsQQQnO4vwVULmPGgtGf8PVc7dxKOeta+qUh6+ SRh3vIcAUFHDT3f/Zdspz+e2E0hPV2hiSvICLk11qO6cyJE13zeNFoeY3ggrKY+IzbFomIZY 4yG6xI99NIPEVE9lNBXBKIlewIyVlkOaYvJWSV+p5gdJXOvScNN1epm5YHmf9aE2ZjnqZGoM Mtsyw18YoX9BqMFInxqYQQ3j/HpVgTSvmo5ea5qQDDUaCsaTf8UeDcwYOtgI8iL4oHcsGtUX oUk33HEAEQEAAcLAXwQYAQIACQUCTVkGzwIbDAAKCRAWmrexpM/4rrXiB/sGbkQ6itMrAIfn M7IbRuiSZS1unlySUVYu3SD6YBYnNi3G5EpbwfBNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3 3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro Developer Services In-Reply-To: <20231108155836.GB21616@pendragon.ideasonboard.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 29 Nov 2023 00:58:16 -0800 (PST) On 08/11/2023 16:58, Laurent Pinchart wrote: > On Wed, Nov 08, 2023 at 04:34:39PM +0100, Maxime Ripard wrote: >> On Tue, Nov 07, 2023 at 04:26:34PM +0100, Greg Kroah-Hartman wrote: >>> On Tue, Nov 07, 2023 at 01:18:14PM +0100, Maxime Ripard wrote: >>>> On Tue, Nov 07, 2023 at 12:22:21PM +0100, Greg Kroah-Hartman wrote: >>>>> On Tue, Nov 07, 2023 at 11:57:49AM +0100, Maxime Ripard wrote: >>>>>> +GKH >>>>> >>>>> Why? I don't see a question for me here, sorry. >>>> >>>> I guess the question is: we have a bus with various power states >>>> (powered off, low power, high speed) >>> >>> Great, have fun! And is this per-device or per-bus-instance? >> >> Per bus instance > > To be precise, those power states are link states. They don't > necessarily translate directly to device power states, and they're not > so much about power management than speed (and bus turn-around for > reads) management. So the DSI core should support handling and tracking the current DSI link state, and DSI devices should be able to request for a particular link state. > > Also, while DSI allows for multiple peripherals on a bus, the link is > point-to-point, with the peripherals being all behind a single DSI RX. > >>>> low power is typically used to send commands to a device, high speed to >>>> transmit pixels, but still allows to send commands. > > Low power (LP) is a link state where commands can be transmitted at a > low speed, as opposed to the high speed (HS) link state that is used to > transmit both video data and commands at high speed. Any device-to-host > data transfer (in response to read commands) occurs exclusively in LP > mode (at least with DSI v1.3, I don't have acces to newer > specifications). > >>>> Depending on the devices, there's different requirements about the state >>>> devices expect the bus to be in to send commands. Some will need to send >>>> all the commands in the low power state, some don't care, etc. See >>>> the mail I was replying too for more details. >>>> >>>> We've tried so far to model that in KMS itself, so the framework the >>>> drivers would register too, but we're kind of reaching the limits of >>>> what we can do there. It also feels to me that "the driver can't access >>>> its device" is more of a problem for the bus to solve rather than the >>>> framework. >>> >>> This is up to the specific bus to resolve, there's nothing special >>> needed in the driver core for it, right? >> >> Yeah, we weren't really looking to handle this into the driver core, but >> rather if there was a set of guidelines or feedback on implementing >> those kind of features for a bus. >> >>>> Do you agree? Are you aware of any other bus in Linux with similar >>>> requirements we could look at? Or any suggestion on how to solve it? >>> >>> There might be others, yes, look at how the dynamic power management >>> works for different devices on most busses, that might help you out >>> here. >> >> Thanks for the pointers, we'll have a look >