Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp935779rdb; Sun, 18 Feb 2024 20:46:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWno3qeeFnhp0Qd+4EBANBQzbW4r5z2K1Re3Pdfix/uw9UPI9RGq4qpbm9wZFg1HOQtA9sErjUeWKLgKDBgUNeZvjkM89QVnlOLGq+PnA== X-Google-Smtp-Source: AGHT+IGILV+pckOpMd8qT5QnTNDA3NbiQUH0LhzjFngWxQe/NHsGiUiIX856zNe/TPZd5fDfmkHK X-Received: by 2002:a05:6a20:6f02:b0:19e:840f:34d9 with SMTP id gt2-20020a056a206f0200b0019e840f34d9mr17882398pzb.29.1708317981410; Sun, 18 Feb 2024 20:46:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708317981; cv=pass; d=google.com; s=arc-20160816; b=b7JN22ZkEtINMTSG9fp0o89YZGbeWFBnCmear77TJI3aPbaCzTDLEPO6/dWiKuqUhd R+17sb2CQ9xnWm8eOZx+D0ymybgbUgBsNyZlYR9Yaam2MNcrE6u6k6fF7XfUR/d8kSJ7 U1/L6JtDSST62iL/WNWUKP7tr99SXhsGUQ4yurojqhALzgIQ6N67junGXyNnZ6jYzaZ9 Ee6O9X+qpCgNNaQA3ZbLyWT6tAfugIOTI6mcR11DlYPEqkGxpkz+4eIhAlPjLZvxiJJU 5xQ+MhAMo5PSgkNIXxr1rBCoBeI2IqWdTPAU0HBNS1/lD1qMLlT1UpE7mkrronKF0m47 0SmQ== 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=a7y1laujVjSrryFs6iJ5GCZwVB/NRNVw3uguZLpIQqk=; fh=fjvjTRKLsUDMwKbqHCidfQ9brGj8Hq/m6bwjWJBGnyY=; b=s6lpb3nq0fwldujkAJ5G8nDp0vcs1IPboTPmlgysa/MXxUZmjQeH2dK17wYlLDB8nb UF8Bap8OHYKkuY6EUJ5cfuUko9uJZekVt/uF1GFCXR+9G4TOIA/+HBmwZbM6OmvUvby9 n5rvbIdvMAqf2+TXvJwQYr1Nx6aNeJZU73SEWj3jootOR2TAPQ0CY2UI2kMAaNWwhr1z mEdjZvNo6nsfvYvrbRzrtihPf7urIb1DEsgJ2oyZ5/vVA+ZR4GcbX8mH2v0hnVrbAWoL ICdshai2VCSdEPkm1/MNktPoMW2R52AILtqPAgFe01SqdryCWNy8IgLnn/Lse3VJ/Epg rRHQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=K1fRXEr1; 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-70714-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70714-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b26-20020a6567da000000b005dc996f081fsi3784101pgs.382.2024.02.18.20.46.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Feb 2024 20:46:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70714-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=K1fRXEr1; 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-70714-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70714-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 07D64B2181A for ; Mon, 19 Feb 2024 04:46:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 43FE81CD24; Mon, 19 Feb 2024 04:45:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="K1fRXEr1" Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.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 99855257D for ; Mon, 19 Feb 2024 04:45:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708317954; cv=none; b=XJJOpkngBT1wCGCnradHDMXrb3axc6w0ydQG+VcIOJnDWGR5e+kRb/TPGHb6Uqhfxy2h5kY0Oh1AFym5pewEkmQJTadOmaNSH4nctLGVw7TbA1xe40zibZ4MlUFTqPcPJzY+V9bq8sjFuFftpNCfNIuK4z/7LNLOfW4rpTAIR8A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708317954; c=relaxed/simple; bh=AG6oUJLp4G2BsZYn1jZDFdciqjT6A0PJ0BJXgDCWjAY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=F16OdgTPuxK6E5c/kUjSyZkTVtF40tK10Hc38siNs0sNpddysjM1XJkuyBK1WGR91xfijMjNOx1a8MQqPSBrlk/qG+gN+AEy66FL0Zd+tod/hUBe76iu06+uG78T3h47LVVO9dRQaQhLWoCFBq2EIzcypfQO16rC1w9tH0pKuGk= 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=K1fRXEr1; arc=none smtp.client-ip=209.85.128.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-wm1-f48.google.com with SMTP id 5b1f17b1804b1-41265d2f7acso3868875e9.1 for ; Sun, 18 Feb 2024 20:45:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1708317951; x=1708922751; 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=a7y1laujVjSrryFs6iJ5GCZwVB/NRNVw3uguZLpIQqk=; b=K1fRXEr1BygoMtQ0LnKVRwvSxIwEqG2noyPgCxHawOi/i5n4zqcQncX4MfimdGOH8r RKGLt8DJf4xRWFpFZ/OXSgjU9HKeR9FnRD/kAoO+JHcExISIFORWBnFiOUef+t0GrurL 8DDiGwceJzKQatNODZLGRvVPbU/AV7oEmkEjw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708317951; x=1708922751; 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=a7y1laujVjSrryFs6iJ5GCZwVB/NRNVw3uguZLpIQqk=; b=Ssi99qdI3zj4J70qiT6/eAXOTw+RDBOt4OAEeAeifZEN7lgiCWOcE6IZu03DVu1KwT aHi8eR9iLqbu27KnvOxsOGf5crT7mL5TTyqXkOsCOFtmXavXFv82UQFY7jzQMcJa+m89 GsrwAVGPPr8Ql/b66C3HPmMC3+TweuCVW5nT+TE0979dQ8rzlZIyp1heHunR7j1gK8AT 5Si3tfqGdyvvcXPd+4Mj0xgY5FMrFEjfmMqtCiy7HDT8kTseqGe/JwkuXNdx+oBA89F/ p21tIY3EvJ9yHiewMR0yKi4HgNm91043tMOui2CBGwGuhJyM9FaSUjn2BwCYHdh0JiuF HOUw== X-Forwarded-Encrypted: i=1; AJvYcCUS06XcMKBg2U14I0WYaDmpgtl/ugZENK1iDntbsehJGcZp1wzayPdypnjx0VY0f2FnkybBkZ7SemZe/X6Qng0TG0ljzgAO4fVqiLN8 X-Gm-Message-State: AOJu0YxjW8Y8/xYX+bLjS+6y2AUdDxs/pciQYA9Ypg9xmBvJDu/6zuVw FW76zB5swmrim4lIFIzgNvL5rhxoBQhjS15UDJr4P2goAq34nH6vdlXZ7KwfXX0bMAVn7li1oC4 LQRGdGaCXy7v+EWl1kRV5m3OBPJ+hVhDAft3h X-Received: by 2002:a05:600c:2218:b0:410:ac80:bf3e with SMTP id z24-20020a05600c221800b00410ac80bf3emr10578913wml.37.1708317950949; Sun, 18 Feb 2024 20:45:50 -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: Eizan Miyamoto Date: Mon, 19 Feb 2024 15:45:39 +1100 Message-ID: Subject: Re: [PATCH] drm/dp: Don't attempt AUX transfers when eDP panels are not powered To: Doug Anderson Cc: neil.armstrong@linaro.org, Javier Martinez Canillas , Jani Nikula , Maxime Ripard , Thomas Zimmermann , Maarten Lankhorst , Hsin-Yi Wang , dri-devel@lists.freedesktop.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 Hiya, On Fri, Feb 16, 2024 at 4:09=E2=80=AFAM Doug Anderson wrote: [...snip...] > Sounds good. I know Eizan (CCed, but also a ChromeOS person) was going > to poke at it a bit and seemed willing to provide a Tested-by. I'll > let him chime in. Yup, I've tested this like so: 1. I started by slightly modifying a recent chromeos-5.15 kernel checked out to _right before_ the patch we are discussing to emit some tracing info to dmesg at entry/exit of auxdev_read_iter(). I installed it on a "tentacool" Corsola device. 2. I then rebooted the device and ran these commands: # dmesg -w & # while /bin/true; do echo -n "dpms: "; cat /sys/devices/platform/soc/14000000.syscon/mediatek-drm.7.auto/drm/card0/car= d0-eDP-1/dpms; dd if=3D/dev/drm_dp_aux1 count=3D1 of=3D/dev/null; sleep 30; done And after a few minutes, I saw the following output: dpms: On [ 435.603257] auxdev_open by pid 6327 inode num 108 dev 256901121 [ 435.603369] start auxdev_read_iter by pid 6327 1+0 records in 1+0 records out [ 435.756547] finish auxdev_read_iter by pid 6327 status 512 [ 435.756632] auxdev_release by pid 6327 inode num 108 dev 256901121 512 bytes copied, 0.153862 s, 3.3 kB/s [ 455.418637] [drm] mtk_crtc_ddp_hw_fini 459 event 0x0000000000000000 0xffffff80c0277080 0xffffff80c0277080 dpms: Off [ 465.775104] auxdev_open by pid 6399 inode num 108 dev 256901121 [ 465.775218] start auxdev_read_iter by pid 6399 dd: error reading '/dev/drm_dp_aux1': Connection timed out 0+0 records in 0+0 records out 0 bytes copied, 16.6631 s, 0.0 kB/s [ 482.437762] finish auxdev_read_iter by pid 6399 status -110 [ 482.438200] auxdev_release by pid 6399 inode num 108 dev 256901121 (OK, so what to look for in the above is the ETIMEDOUT returned by auxdev_read_iter after about 17s when dpms was turned off.) I then checked out the repo to the patch we are discussing and did the same thing, and after a few minutes, I saw: dpms: On [ 441.892692] auxdev_open by pid 6317 inode num 108 dev 256901121 [ 441.892786] start auxdev_read_iter by pid 6317 1+0 records in 1+0 records out 512 bytes copied, 0.148004 s, 3.5 kB/s [ 442.040597] finish auxdev_read_iter by pid 6317 status 512 [ 442.040652] auxdev_release by pid 6317 inode num 108 dev 256901121 [ 455.395549] [drm] mtk_crtc_ddp_hw_fini 459 event 0x0000000000000000 0xffffff80c3993080 0xffffff80c3993080 dpms: Off dd: error reading '/dev/drm_dp_aux1': Device or resource busy 0+0 records in 0+0 records out 0 bytes copied, 0.000241 s, 0.0 kB/s [ 472.055296] auxdev_open by pid 6439 inode num 108 dev 256901121 [ 472.055388] start auxdev_read_iter by pid 6439 [ 472.055421] finish auxdev_read_iter by pid 6439 status -16 [ 472.055571] auxdev_release by pid 6439 inode num 108 dev 256901121 Tested-by: Eizan Miyamoto