Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3116586rdh; Thu, 28 Sep 2023 03:12:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGct6LCZbzSAaMaIbvQdIRcHqbScaLa0p/xNpEj1xZdYZzmwW80ephNXJNqtTrX6iu8v3eQ X-Received: by 2002:a5b:a:0:b0:d85:af36:4b6f with SMTP id a10-20020a5b000a000000b00d85af364b6fmr685091ybp.21.1695895952419; Thu, 28 Sep 2023 03:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695895952; cv=none; d=google.com; s=arc-20160816; b=pl+yzymQsNnYlD/7bs5mVrC0W0zYtdAJnb/dr0HDZ93Ll+oEbytmMjENRpf5HM5B21 A55fmvpmiNMeYyo4WL3gATD+PAXYXLbf+2ppFmPJ72mL94Nx9EQ2gVWyFYtIynUDMK8+ gsSLEkxqg8bnwBXHnIHAI9EeD0dGyFuFkurF5ILOGGY9Z22IpTk2JoNoW44ulRLDrSoh huTxeL+51G/bKrpj75ILXL/YPNhoPEP5C5O4jXFUvLPhBr/bCtXC5l0P32NJ+mrG7yJZ ZNJzTKkv0duZYEFAJKKGymID/zQgBjP8Z/kmI8GwtwRjQORzmd0wU8PuWJ3g5SthRucE 49cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=CNs9Uy0sZIcXogJDKuzAoviMSMHPVfDjWIe9eamVRQE=; fh=0bjkpWrkO6hFo8TcKOHS7+v/o/RkybHJovDSLTSNjpQ=; b=e6TdcO9OJSEBnzBKk4E13x+Sb+C/4N20X3rOk6MQsi2es5uEG3SSHD5l4xrG62Vumk T6Czu7mpLUzzupj/6ft0tvT3OcYsJ4VyEhFZ953jAdz5imt95MJoxSbjW2sbaGUcbwvI en8VFhnWHYZsSx+lpFM7RlxE7MyoeCepDgJEBHc28fCjPZP/e8PRIicaVjWXm1hBRQFi 10MuRrgpxZ0S+TsusBA3jBpGA6L368W9LbNiMlE226B4C4aTiFMbdCiTcchIYrSvnb+8 7DFSba9F68xqr1EKiFtRIAMdDIdJLGq/UvHZ6uOINwMKFfPhAI2WmyyMu87CwM6XKAzA EPdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rf8g9OXS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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. [23.128.96.31]) by mx.google.com with ESMTPS id x185-20020a6386c2000000b00578fc70f905si15991490pgd.315.2023.09.28.03.12.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 03:12:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rf8g9OXS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 DC112805CACF; Wed, 27 Sep 2023 15:05:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229517AbjI0WFo (ORCPT + 99 others); Wed, 27 Sep 2023 18:05:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjI0WFn (ORCPT ); Wed, 27 Sep 2023 18:05:43 -0400 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ECE5AF for ; Wed, 27 Sep 2023 15:05:41 -0700 (PDT) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-59eb8ec5e20so149828247b3.3 for ; Wed, 27 Sep 2023 15:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695852340; x=1696457140; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CNs9Uy0sZIcXogJDKuzAoviMSMHPVfDjWIe9eamVRQE=; b=rf8g9OXS/oQoEFEXXB2zV9m5e/4cb13RHHUf3gEEj70UJR1deKo01vC48RGyOCeqDU Q942J5yGADD9nFPRtMzd3AAnW11czyimawbD4wKhC2k+LBCwgPDdtIR2nam0UXG8AKJ+ rBXg3jTADlUJJUpz8ClVl+gqgtj2UxLrXG0go9jmrh+Y6a1zr+eT80sMdlF5zQfI8dR9 SSenLoSTjOc/VquA3KXVQjgO0lN+6K8bVk6uWxaTqroJycEX/Ygb1RSR5BvF6HMBuUMv wfdF7EUpdpVZJGQbcm0tRxE1RjeTZteTairpRY2xDCpX+voJTRDQSt/Z12LFKKn9U+bA lIZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695852340; x=1696457140; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CNs9Uy0sZIcXogJDKuzAoviMSMHPVfDjWIe9eamVRQE=; b=X03Ntoynn/flPu1D85/faUgTZLpqbsCIjZ49dsxCfJedKNVa/XCoksIvedA9vhYhhe dGyMQrOwvcCZsKV9gZhmrcufxLTIEeMKHtZQSAPzRlsmPJf2rn4Ok2zr+ZVLFq5lCCg3 sZKgoBjp67yYC5gwV7iRuQLk1L/nTbgeYrHgco7ZejGAHOP76ooYi9DM//wNeCRMQVli SAVy2I7tDR1zOqGzN0AqmrmJTRL+VvflKjoIJCRpdtlt6VRs3jCPg89qx07m+nKv2qW6 aXiAEF+GyUCAnIiAkaj6lh4PftZPD2opdyEuMcva88yWjDV5cGyX+/lFm8x7h6WanSk0 TRwA== X-Gm-Message-State: AOJu0YwKaObqBZWRLLJGUrRDaq6fDe8yUCjpEbtgkPpLRozzX7HuPyS2 KgwlWeGVjRra6q1A0hAh9j2HMZZfcX5SA/yRSU/ydg== X-Received: by 2002:a81:9186:0:b0:59f:4c52:2f51 with SMTP id i128-20020a819186000000b0059f4c522f51mr3574047ywg.17.1695852340711; Wed, 27 Sep 2023 15:05:40 -0700 (PDT) MIME-Version: 1.0 References: <1694813901-26952-1-git-send-email-quic_khsieh@quicinc.com> <1694813901-26952-7-git-send-email-quic_khsieh@quicinc.com> <2f98d5f1-57c1-d9fe-cb1c-b975db057287@quicinc.com> <65566a68-3510-2e5f-7d57-e4dba08c008c@quicinc.com> <1d9bf80d-0267-937b-4dd9-c57db7a89cb4@quicinc.com> In-Reply-To: From: Dmitry Baryshkov Date: Thu, 28 Sep 2023 01:04:31 +0300 Message-ID: Subject: Re: [PATCH v3 6/7] drm/msm/dp: add pm_runtime_force_suspend()/resume() To: Stephen Boyd Cc: Abhinav Kumar , Kuogee Hsieh , dri-devel@lists.freedesktop.org, robdclark@gmail.com, sean@poorly.run, dianders@chromium.org, vkoul@kernel.org, daniel@ffwll.ch, airlied@gmail.com, agross@kernel.org, andersson@kernel.org, quic_jesszhan@quicinc.com, quic_sbillaka@quicinc.com, marijn.suijten@somainline.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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 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, 27 Sep 2023 15:05:53 -0700 (PDT) On Thu, 28 Sept 2023 at 01:01, Stephen Boyd wrote: > > Quoting Kuogee Hsieh (2023-09-25 09:07:18) > > > > On 9/22/2023 6:35 PM, Abhinav Kumar wrote: > > > > > > Doing link training when we get hpd instead of atomic_enable() is a > > > design choice we have been following for a while because for the case > > > when link training fails in atomic_enable() and setting the link > > > status property as you mentioned, the compositor needs to be able to > > > handle that and also needs to try with a different resolution or take > > > some other corrective action. We have seen many compositors not able > > > to handle this complexity. So the design sends the hotplug to usermode > > > only after link training succeeds. > > > > > > I do not think we should change this design unless prototyped with an > > > existing compositor such as chrome or android at this point. > > > > > > Thanks > > > > > > Abhinav > > > > > > We did perform link training at atomic_enable() at eDP case since we can > > assume link training will always success without link rate or link lane > > being reduced. > > > > However for external DP case, link training can not be guarantee always > > success without link rate or lane being reduced as Abhinav mentioned. > > > > In addition, CTS (compliance test) it required to complete link > > training within 10ms after hpd asserted. > > Is it possible to change that timeout? I have to look around for the CTS > parameters because I'm pretty confused how it can work. What do we do if > DP wakes the system from suspend and asserts HPD? We need resume time to > be < 10ms? That's not realistic. > > > > > I am not sure do link training at atomic_enable() can meet this timing > > requirement. > > > > At least in the DP spec itself it doesn't require the link to be trained > within 10ms of HPD being asserted. Instead it simply recommends that the > OS start configuring the display promptly after HPD is asserted, e.g. > within 100ms. There's some strict timing on IRQ_HPD, so the driver must > read DPCD registers within 100ms of IRQ_HPD rising edge; maybe that is > what CTS is checking for? > > TL;DR: I don't see why CTS should stop us from link training in > atomic_enable(). It would be beneficial to do so to make eDP and DP the > same. It would also help to report a drm connector being connected > _before_ link training so that userspace knows the link itself is the > bad part of the equation (and not that the DP connector looks > disconnected to userspace when in fact it really is connected and the > monitor is asserting HPD, just the link training failed). Also this will move us closer to i915 user experience: failing link training in the display enablement part. So that a part of xrandr calls can retry link training. -- With best wishes Dmitry