Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp577597lqp; Wed, 12 Jun 2024 09:47:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0IE0SlosJD6LWADdGJNDmhqxdY0sXXg4YKbIUqwzvQQQoVKzmHfR2pIN1uVYI3Fovx0XeLbB497/6SC5qSMrFOECCFkNfqR9xLS9Jlw== X-Google-Smtp-Source: AGHT+IEZfk698/Ir8S32sUVD4JoZB+KUw/nTK7BY/VzvS50vYZd8Y9wguXq0fFXF6vtprijg8tf3 X-Received: by 2002:a05:6358:7e02:b0:19f:315e:cb2 with SMTP id e5c5f4694b2df-19f69cf5a92mr280092855d.3.1718210857553; Wed, 12 Jun 2024 09:47:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718210857; cv=pass; d=google.com; s=arc-20160816; b=g0K9H4q2HDOPbAs6OQ7WpbhS+GFJxlES4WDOJTtwmkbVztZd0ZXhm/uHoqcbnMpVpN aq3NVYI3cmNQKMUgJNfqjgdHjuXh5je4IrGzAQnyCPE+5qAc6hG8SFup2/0mV4MuKvuQ I3/5vvYKLLA9D6c6tJ0k3xk7HVzFPMGNfCb/h87SebCOnVeBCz767h1eyeeHk7fhUTL7 Fc4OcZHr2J6yTvO0Bo1aeTxZwO8hhNKQrt6oKQ100pOlKaD2PrRKBFtQlAWKjKQKpC9L sXvXuYBo3e4qS2SFvVTCAJ0L2fhRYp3hDp+SPpF39VBQsG9+j9OobkSHj1nE0BveQNeX KBTA== 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=hyKQtIaovCsyWP0csv+18LsQLrk2+qXO3sWeddnPol0=; fh=pBEpUCMY28fows0hVQ/M/kEShmM+mYxdGmhfzuGFI5w=; b=YNLcx2eBzQ5jtyzjfBD5Y3G9JcEPoAMDH0okgzqe5h9+CimdRH+A2oOscfJTIRVOpp erY0hC3vwBXTTmgfj5UQlCJOwRby5Wp5oHiQe4rkGN7DQePrijz6po7pB353qHY3fCYr xadK6sAvVt4Qkd6PJW/v0j1s9PfRzlo4wOErZ41PVrzqodpjRyl8Dx/kqxkXgkAQ3S9I rZafOWOfDAeeI7pYtzdhS0avNV5q24v9ZBQPAi8wSqzEo003ZStqH6rPmKKyHJDPY+kl jhsVYeL/1wXx6lHCqV5YTgFip0EiQFKlV7Ftr7PqDC01XzG/7SeJfiUwFV7qtwkmjv/q Dvyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nb+He5Vi; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-211937-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211937-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de2ae12072si8072671a12.896.2024.06.12.09.47.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:47:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211937-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nb+He5Vi; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-211937-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211937-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A6A0E282251 for ; Wed, 12 Jun 2024 16:47:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3077181BBB; Wed, 12 Jun 2024 16:47:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="nb+He5Vi" Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 32E29180A91 for ; Wed, 12 Jun 2024 16:47:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718210844; cv=none; b=b01F+18EFB01Hc0leCmO5muge9v5njm5WATao7wFsg80DY+wWYkPrrwEjUvXVC15NqjZRIiPnsUykqNLkIFBV+mJerB3mHezs+1w9uutVB2RMVuOyFdGWyo2qRr6fy2pAwR5XM3Z0+s8nCJnlRlLh1FYAJtsfFeumWPg8ooGadM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718210844; c=relaxed/simple; bh=hyKQtIaovCsyWP0csv+18LsQLrk2+qXO3sWeddnPol0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=AnRST1WJ4NtO33AG2M+ltWUSfyrVc/Z8MHKLwUn+iDWxZpH8bs9j6y4ALNfLwGguNzW+iLGu+wXIHm44GxOQPM8vRKORxM2qStc+4UdAudeZG/BG/w/gT0yTgaSPu4NO/H7RLi9aOvlqmIFlDXCc/TljKzYgQf1xa5P8TrfJY8I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=nb+He5Vi; arc=none smtp.client-ip=209.85.208.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2e724bc46c4so78306071fa.2 for ; Wed, 12 Jun 2024 09:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718210841; x=1718815641; 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=hyKQtIaovCsyWP0csv+18LsQLrk2+qXO3sWeddnPol0=; b=nb+He5ViKRQPWtN4koGSbYLItQKMtgGohZnnEDSrcz8AuP7llnKdd4rC0d5Aijz3GW 9VV1zgtMH/1ryvtGEqMJHUo3OMBTDwLzZvugQoYArnQcwM49/byPQSDmOy4MFxtoMqtx EYOX7wHfF87udhakjobKLfEk292Dy0uUFfZU+KyS/JkYR6FTV2Iz5RRfkmk3AKJLl+/I D8iw03x+p0rQCb1t571zE8jjtCusCtR1ZArBnwZ3HFCjpmAmRa4LoM4+kVrUvQct72O9 whAXZnB8POkLdphPi2XmW0ZnTWTVQpqRet2/arOBNksf14SXPLMjpvULA40g7V97/O3Z GrTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718210841; x=1718815641; 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=hyKQtIaovCsyWP0csv+18LsQLrk2+qXO3sWeddnPol0=; b=RUaM9O/F2XxZPSOUy+LJjDFt+0jZRG3TAO3DyHhwiDu8PBvM/HeFL5n7u6UDT0mpHt m7OIztow6owUTfMjiwZozX4jq5LjtK2TX5Qu70oAf3lm/x8XT20nvzy5oJ4sxzuJSzoE uWUMCxo5LZebnypZwZroco1uVyNlDdOfqKv5G33hsJmFKmH6d88Nf0/Nt5A1ayImJ/N9 +wEgTcRjRSJwCNAyVqeVzwBhytuhqb/WX2Eban2E8hXblsvydKgAAR34BTEbPjX0pf+p Z7Oo2vR9Lx6B33AMlq2uLWIP0hlDq1hPZFWuiZpE3vJPwLkAq7IoOAyJuK8jEyjWk42E xZyA== X-Forwarded-Encrypted: i=1; AJvYcCWM536X4Svpj6bVYsY6tsUWCUeNXA5+ILcAguzkJISm+dIWKRoc3+vStx4kyRCu8S3XFDqcCfsVFc2wB8kMZoKpA3Qgf5cxRjyXn3j1 X-Gm-Message-State: AOJu0Yzfxf9sX9s3WeuylLPWb2ZO+7PXKgX+6qnXvjjt8PsaJoc1QtJ0 DDP2xgAAvoFqJ5PkqhAuHpwRNLOV16R1E1ZN9wMtkaot5/dGvjUOlN5vs1GjV3JT6vFKnZcsCJw 7shAWqTGRgPUgYXLEC/47U/QqmsfPRXczj5GDFQ== X-Received: by 2002:a19:431c:0:b0:52c:845e:3194 with SMTP id 2adb3069b0e04-52c9a3d8b80mr1283565e87.29.1718210841311; Wed, 12 Jun 2024 09:47:21 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240611074846.1.Ieb287c2c3ee3f6d3b0d5f49b29f746b93621749c@changeid> In-Reply-To: From: Linus Walleij Date: Wed, 12 Jun 2024 18:47:10 +0200 Message-ID: Subject: Re: [PATCH] drm/panel: Avoid warnings w/ panel-simple/panel-edp at shutdown To: Doug Anderson , dri-devel@lists.freedesktop.org, Neil Armstrong , Maxime Ripard , Linus Walleij , Yuran Pereira , Chris Morgan , David Airlie , Jessica Zhang , Maarten Lankhorst , Thomas Zimmermann , linux-kernel@vger.kernel.org, Saravana Kannan Cc: Daniel Vetter Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 12, 2024 at 5:11=E2=80=AFPM Daniel Vetter wro= te: > On Wed, Jun 12, 2024 at 07:49:31AM -0700, Doug Anderson wrote: (...) > > The problem is that the ordering is wrong, I think. Even if the OS was > > calling driver shutdown functions in the perfect order (which I'm not > > convinced about since panels aren't always child "struct device"s of > > the DRM device), the OS should be calling panel shutdown _before_ > > shutting down the DRM device. That means that with your suggestion: > > > > 1. Shutdown starts and panel is on. > > > > 2. OS calls panel shutdown call, which prints warnings because panel > > is still on. > > > > 3. OS calls DRM driver shutdown call, which prints warnings because > > someone else turned the panel off. > > Uh, that's a _much_ more fundamental issue. > > The fix for that is telling the driver core about this dependency with > device_link_add. Unfortuantely, despite years of me trying to push for > this, drm_bridge and drm_panel still don't automatically add these, > because the situation is a really complex mess. > > Probably need to read dri-devel archives for all the past attempts around > device_link_add. I think involving Saravana Kannan in the discussions around this is the right thing to do, because he knows how to get devicelinks to do the right thing. If we can describe what devicelink needs to do to get this ordering right, I'm pretty sure Saravana can tell us how to do it. Yours, Linus Walleij