Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3011662rdh; Wed, 27 Sep 2023 22:52:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGiKPEAoXN4adwg6cY6XwWpIvlT+mCrJxjHnjbP0zTlW8vuZ+4WeBLBv0C7KakI44Z/1w/2 X-Received: by 2002:a17:90b:8c4:b0:26d:20ef:1d32 with SMTP id ds4-20020a17090b08c400b0026d20ef1d32mr236787pjb.38.1695880342561; Wed, 27 Sep 2023 22:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695880342; cv=none; d=google.com; s=arc-20160816; b=FtLl2wPnJKcKpAa0wcRLq6ZXYyVEbr4WD0gCEo7RJKsvorW7w0XQf2xGVd7IH0zvIQ 7LOT8gQblcodsGt4wu8YIXYetzsAJdyyV2A0XPub2M5Ln1FXJXxKTJ2h+oNYrcQ0sDrH xzO9ymW2+ybvCHKayNSzecTDPytC//k5g57+0zk5QnBE2l+liIbor1yIaovS237Iev+L G292b530pebFd+3WI/W4REVjJbB6hahQK8wT5QN/+xhbZSD6WPUJaV8KEPTWTKQ8V7w2 wkWi/BJpwUsUyo9YFvufEAql16nFdh3XyENKY2lK/3ZO0wsJIQr8AaPqZdeAjcOzoHlE Rsbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:user-agent:from:references:in-reply-to:mime-version :dkim-signature; bh=oSjejR5JF3wP/eMQJYeeQ3/RdpG//Fx9fX4rCgiiwsA=; fh=A8fdtc9EjgioAHRQ7J8YYhyd5rnob49R55gB/unpZMY=; b=b5rpyWNsCiBGtLA1D2EhL4m8ALLzdRH6vv54aJPR2pyMEUDTeOlTHBZ88fRpYT8o7h huz3J0lhWiZFhiMgwcBQB9BUTnXzg+oGffWK0VirslvkAgWWh2FS1n2DHBGai4oxLtjF hDACjUDJ3lcIrNkpLo0Y3ZINT5hF0GDR1uxmqGPZYRetYLh4razZ47H4eYVfWqG2CxEj UigmxMiJedLLg4444vxeM1T2oe34rU+RqeASpIRBfTgK/PrdhRoD7XgFpqZbMfc2LIpK jXriHrqRQNB9Z5dyOJ7TeOPA4Ekk9lvMYfStw0WzPHJ4PYB/8aToPz1puA8e/hQRGKZp 0Usw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nA1MPKGh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id hi14-20020a17090b30ce00b00278ea235413si5580355pjb.31.2023.09.27.22.52.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 22:52:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nA1MPKGh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C722580617C7; Wed, 27 Sep 2023 15:02:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229731AbjI0WCF (ORCPT + 99 others); Wed, 27 Sep 2023 18:02:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbjI0WCD (ORCPT ); Wed, 27 Sep 2023 18:02:03 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF657194 for ; Wed, 27 Sep 2023 15:01:58 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-504b84d59cbso1467325e87.3 for ; Wed, 27 Sep 2023 15:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695852117; x=1696456917; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:user-agent :from:references:in-reply-to:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=oSjejR5JF3wP/eMQJYeeQ3/RdpG//Fx9fX4rCgiiwsA=; b=nA1MPKGhAJBCTrEnASX1o3wwHSDH3cO7zZokWQCm61ftStt8KJlPtUQpkOrcsMeVT2 J83k8ko1v5Qu6jWhsq+BONEG2J44sG3uu3wWSulnjB6OCj0HZl04K0ZsSXe8dwHrE+TE glkT00cvZKpeGjUjX1PC6WAr1YZwKtRFcJMaI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695852117; x=1696456917; h=content-transfer-encoding:cc:to:subject:message-id:date:user-agent :from:references:in-reply-to:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=oSjejR5JF3wP/eMQJYeeQ3/RdpG//Fx9fX4rCgiiwsA=; b=ZwW/JCSXrTqV50BMRAhPQLtcx2R/RIXhnMPSlOX7/W7sROzBm2C88pXMl8cp488vbi 79kq+AcJgB9GPT+m8c3hTK6wkZ86TJ+C+HWUuGtOJ08w866o2O6KHi64+Ff48+u5uxJT 1763Ienn+plyh2jb0pY1Ma+o885DbUABTV87XSjmBPJnK4XtunYeQ8fp99Lgpt4L+iJw avUTCUkxELitY2PAeUwrBTD96CINyKg0vQz6MtvitKzcbLlsmfunVAJYQL96+FZ0x1sz NvyoflWlVo0W4Sj2NbekuCjhloHczaWgjah8AUliO3ZZ3z1m1LglMG8qOMetdOzVrsyg A3jQ== X-Gm-Message-State: AOJu0YwKgyez/upawoNP9RqGmpNPSpeuSUp+XMrQvOr0MXA75WElcsEU 3HJtmn8oZc6Ew6SLTFq/NGk3TyDSeMO+HqVyCXtY5w== X-Received: by 2002:ac2:410e:0:b0:502:f740:220 with SMTP id b14-20020ac2410e000000b00502f7400220mr2552704lfi.58.1695852116130; Wed, 27 Sep 2023 15:01:56 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 27 Sep 2023 17:01:55 -0500 MIME-Version: 1.0 In-Reply-To: <1d9bf80d-0267-937b-4dd9-c57db7a89cb4@quicinc.com> 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> From: Stephen Boyd User-Agent: alot/0.10 Date: Wed, 27 Sep 2023 17:01:55 -0500 Message-ID: Subject: Re: [PATCH v3 6/7] drm/msm/dp: add pm_runtime_force_suspend()/resume() To: Abhinav Kumar , Dmitry Baryshkov , Kuogee Hsieh Cc: 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" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,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 groat.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 (groat.vger.email [0.0.0.0]); Wed, 27 Sep 2023 15:02:16 -0700 (PDT) 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,=C2=A0 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).