Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp79782rbe; Wed, 28 Feb 2024 12:48:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW0JEt/8fxhgozluR1B2lP6Gxt627gF0uSgVWy0CthqwCTPlmgkz3FXN5UGab0Kt/wIzdJa4YEhqbfa5lFZ5eM1Gu/jjYju7Mj2mvx96w== X-Google-Smtp-Source: AGHT+IE7EaCBq82eJd7pucNIkbNPmmysdWw1tF9IrfkSiH5H0JMTZ0sgBgW0bObc5ixPb/nA5Orj X-Received: by 2002:a17:906:cb05:b0:a3d:993e:ad24 with SMTP id lk5-20020a170906cb0500b00a3d993ead24mr50485ejb.59.1709153335129; Wed, 28 Feb 2024 12:48:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709153335; cv=pass; d=google.com; s=arc-20160816; b=orukRx+ifKM9x929WlGKSAgj1IOjLYpgm9wJtuzLkQUStI9G1ERJar5PIulxeE2F9O WyRGN1VencKbC4wBVYJBrpYkHoEgLXOOchhkr4+k5SsDqUdKAnEAM4HQfc211e3WWebZ HINZcdQc7iOF75OtF33sJ8h10c0uQqygcwRGJRHfvsR1bh7dEVRjjvpHcv/atUWz76XN 0hEnCPmF01/N8bSc7ZQown0Fb6t9NP4i8rnvFhnf/X/ECLgP7u5wlHnD46eMOu2MLJi9 NpXzQEZMIY+VY3m23GXngKWtXMPvjUgrKa/esmJ6cMj7pafeYFHK4B8+f/JP/zWxyOjL DX5A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=j7yv2aZOYPyxqiCW7SC4YeHXcQrFeT9++J/3vRdLw6I=; fh=XWT4S0eiACITMB6eNnaagOsO4k0D0MDTYBxnJ6GXQhM=; b=OWx2hXE/p/DMaPn74ILkSvn/htwW7oI/fBSY0B/mDAU4Ch0guR4JEjeiFoStzQApN7 3A3bJGxrgLBgjNGepMVW59B4uAczJ5VGDH0ZiaRCCoa39edl35UI1iI2PhuR2LxgCvFe /g4dR00obZw6g4PjOcfvOzbqNIwj7L2h/N98MbCFMgspmh/SDGzqmFwJ8AjuwA7pI0q6 J6dzrNAfFhnaDVbYYXO64KZfv0Awqr5Mcezw6Ui0Lx39sm8hfkrNROngWgij95+VlGFo BM+7bpHFL20NIoRiP+oSrdYsg6R4bD9qLikoUwFJr2OaYLmKgja8m0UUpob6kpkl9F2j E/dA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LibtN70t; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-85685-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85685-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c16-20020a17090603d000b00a4436eea7d2si33679eja.919.2024.02.28.12.48.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 12:48:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85685-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LibtN70t; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-85685-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85685-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AF4981F288AC for ; Wed, 28 Feb 2024 20:48:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F0DE71ECC; Wed, 28 Feb 2024 20:48:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="LibtN70t" Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C46D15DBBB for ; Wed, 28 Feb 2024 20:48:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709153314; cv=none; b=fNxLEibpW33+J1Ykm2XWe2Vmc71JKdnHSGkvNKIDCYFBFbqx73ckOEcFCZUgtFUkb9xiLlQuO+pl9GAIE/Ly/kn9wsmQj7FYmS1gKOaAK8tufuBvVSwIlLSlQOTftkQUYiiWMjY1XdYAamjXvBqinEY9JwKtCCGt8pkPq1BoeXw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709153314; c=relaxed/simple; bh=j7yv2aZOYPyxqiCW7SC4YeHXcQrFeT9++J/3vRdLw6I=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=hDAO/q9bI901HIciTn/hDfcxeW0kaRVEUtqALx1vQcbZy/L0ONjjInUckhVEhkiVF5mLuqVH0QYxpETL3KlijolexlH9FFNmvxu6dEE3gHdDAJdVcPXut5A6LTPIZfG+wq9upemhTkg97RfSx63u7+ng9Qhdehoho79LVRiHEzI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=LibtN70t; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5658082d2c4so320126a12.1 for ; Wed, 28 Feb 2024 12:48:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1709153307; x=1709758107; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=j7yv2aZOYPyxqiCW7SC4YeHXcQrFeT9++J/3vRdLw6I=; b=LibtN70tuJeuLmSqDky4HPmoDXrM7LtFWmWLHig8jIBi/eu6jJdCsGt6ymc6uiZGTJ DKO8K2PXMimiihifqNTXeMzCD7lafZOj05mIad3Ril/uKK3b57XUP6/laKA74BYoay+3 FCtiHCHq1eJFakugvleGcQDk2qfQz/9Gxh1tI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709153307; x=1709758107; h=content-transfer-encoding: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=j7yv2aZOYPyxqiCW7SC4YeHXcQrFeT9++J/3vRdLw6I=; b=K1en2PfXFpy/Lh7SEk7ge+fc4jk//ngEcNn15AV2CqBV/P5jQ7iqsBvY2Kaauhcdx0 c6B72OCJKT8vSzhTBq5Lai0Q/OQRMg3CAOkxQAtV56QXo64OROEWaCnBSCmGsFGnvZrE EhsRrQUiu4bk9DsLrHxlLA9iAx86nRIVTCZWvRPmRXYOhn3VG7zk43ee+kG56yKYT5GF SlDaO468P1ZP42Jer5upxkf+0ci0ZylA3158niinUkA84F98EnQPDe35RGwNKzYFI0do 743bG0Ic6Xuex6DdKLUmRYmcG8dDuR16Wxd3cppkGq7jV5kDVD99C1XO+2iqurxj446m HRzQ== X-Forwarded-Encrypted: i=1; AJvYcCWygt/3Hohh50y/NfGpk0rXBPywOhbHpuBXi9XwE/oq9Mnqdcpa8ET7ztoPC/3q4ydhNrsFMsMmoKDj4mfFWwRiOCkMHXgIxzl40Lhg X-Gm-Message-State: AOJu0Yx6b0cImqC/z/Qmzr8NyLEP1Yi7QTplnx+b40TIRLmBhteEcbGR NMM8ziPYdv5W5x4hOJQfg6C8nAQXRrPay1o3C8OFl4X4eeZ8RGd3hOUgB1CrnZU0W8MEo8efKXi fhkBm X-Received: by 2002:a17:906:3e0d:b0:a3f:4eaf:ec66 with SMTP id k13-20020a1709063e0d00b00a3f4eafec66mr69505eji.25.1709153307545; Wed, 28 Feb 2024 12:48:27 -0800 (PST) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com. [209.85.128.45]) by smtp.gmail.com with ESMTPSA id vu5-20020a170907a64500b00a442124bd2dsm440286ejc.37.2024.02.28.12.48.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Feb 2024 12:48:27 -0800 (PST) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4129a748420so20055e9.0 for ; Wed, 28 Feb 2024 12:48:25 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXsbw5O6oReaON/97WU/lHAQfAbkfhE/NLC0dAhh0FbYRPcC37ZwWUt5PdBYZZblvIX9rXbP5s9ncMaHlIiadloYgB7kk8a+j33yl4r X-Received: by 2002:a05:600c:b99:b0:412:a37b:4171 with SMTP id fl25-20020a05600c0b9900b00412a37b4171mr134980wmb.4.1709153305657; Wed, 28 Feb 2024 12:48:25 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240202141109.1.I24277520ac754ea538c9b14578edc94e1df11b48@changeid> <87sf1u58k0.fsf@intel.com> In-Reply-To: From: Doug Anderson Date: Wed, 28 Feb 2024 12:48:10 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/dp: Don't attempt AUX transfers when eDP panels are not powered To: neil.armstrong@linaro.org Cc: Jani Nikula , Maxime Ripard , Thomas Zimmermann , Maarten Lankhorst , Hsin-Yi Wang , dri-devel@lists.freedesktop.org, eizan@chromium.org, Ankit Nautiyal , Daniel Vetter , David Airlie , Heiner Kallweit , Imre Deak , Jessica Zhang , Sam Ravnborg , Stanislav Lisovskiy , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Wed, Feb 28, 2024 at 8:52=E2=80=AFAM wrote: > > On 28/02/2024 17:40, Doug Anderson wrote: > > Neil, > > > > On Thu, Feb 15, 2024 at 8:53=E2=80=AFAM Neil Armstrong > > wrote: > >> > >> Hi Doug, > >> > >> On 15/02/2024 16:08, Doug Anderson wrote: > >>> Hi, > >>> > >>> On Thu, Feb 15, 2024 at 2:24=E2=80=AFAM Jani Nikula wrote: > >>>> > >>>> On Wed, 14 Feb 2024, Doug Anderson wrote: > >>>>> Hi, > >>>>> > >>>>> On Tue, Feb 13, 2024 at 10:25=E2=80=AFPM Hsin-Yi Wang wrote: > >>>>>> > >>>>>> On Wed, Feb 14, 2024 at 2:23=E2=80=AFPM Douglas Anderson wrote: > >>>>>>> > >>>>>>> If an eDP panel is not powered on then any attempts to talk to it= over > >>>>>>> the DP AUX channel will timeout. Unfortunately these attempts may= be > >>>>>>> quite slow. Userspace can initiate these attempts either via a > >>>>>>> /dev/drm_dp_auxN device or via the created i2c device. > >>>>>>> > >>>>>>> Making the DP AUX drivers timeout faster is a difficult propositi= on. > >>>>>>> In theory we could just poll the panel's HPD line in the AUX tran= sfer > >>>>>>> function and immediately return an error there. However, this is > >>>>>>> easier said than done. For one thing, there's no hard requirement= to > >>>>>>> hook the HPD line up for eDP panels and it's OK to just delay a f= ixed > >>>>>>> amount. For another thing, the HPD line may not be fast to probe.= On > >>>>>>> parade-ps8640 we need to wait for the bridge chip's firmware to b= oot > >>>>>>> before we can get the HPD line and this is a slow process. > >>>>>>> > >>>>>>> The fact that the transfers are taking so long to timeout is caus= ing > >>>>>>> real problems. The open source fwupd daemon sometimes scans DP bu= sses > >>>>>>> looking for devices whose firmware need updating. If it happens t= o > >>>>>>> scan while a panel is turned off this scan can take a long time. = The > >>>>>>> fwupd daemon could try to be smarter and only scan when eDP panel= s are > >>>>>>> turned on, but we can also improve the behavior in the kernel. > >>>>>>> > >>>>>>> Let's let eDP panels drivers specify that a panel is turned off a= nd > >>>>>>> then modify the common AUX transfer code not to attempt a transfe= r in > >>>>>>> this case. > >>>>>>> > >>>>>>> Signed-off-by: Douglas Anderson > >>>>>>> --- > >>>>>> > >>>>>> Reviewed-by: Hsin-Yi Wang > >>>>> > >>>>> Thanks for the review! > >>>>> > >>>>> Given that this touches core DRM code and that I never got > >>>>> confirmation that Jani's concerns were addressed with my previous > >>>>> response, I'm still going to wait a little while before applying. I= 'm > >>>>> on vacation for most of next week, but if there are no further repl= ies > >>>>> between now and then I'll plan to apply this to "drm-misc-next" the > >>>>> week of Feb 26th. If someone else wants to apply this before I do t= hen > >>>>> I certainly won't object. Jani: if you feel this needs more discuss= ion > >>>>> or otherwise object to this patch landing then please yell. Likewis= e > >>>>> if anyone else in the community wants to throw in their opinion, fe= el > >>>>> free. > >>>> > >>>> Sorry for dropping the ball after my initial response. I simply have= not > >>>> had the time to look into this. > >>>> > >>>> It would be great to get, say, drm-misc maintainer ack on this befor= e > >>>> merging. It's not fair for me to stall this any longer, I'll trust t= heir > >>>> judgement. > >>>> > >>>> Reasonable? > >>> > >>> I'd be more than happy for one of the drm-misc maintainers to Ack. > >>> I'll move Maxime, Thomas, and Maarten to the "To:" line to see if tha= t > >>> helps get through their filters. > >> > >> I'll like some test reports to be sure it doesn't break anything, > >> then I'll be happy to give my ack ! > > > > Are you looking for any more test reports at this point? Eizan did > > some testing and provided a tag, though this was also on ChromeOS. > > Steev also tested on two non-ChromeOS environments and provided his > > tag. It's also been another two weeks of this being rolled out to some > > Chromebook users and I haven't heard any reports of problems. If > > somehow something was missed, I'm happy to follow-up and provide > > additional fixes if some report comes in later. > > Sure, thx I think you can apply it now > > Acked-by: Neil Armstrong Pushed to drm-misc-next. 8df1ddb5bf11 drm/dp: Don't attempt AUX transfers when eDP panels are not po= wered