Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3067278pxm; Mon, 28 Feb 2022 11:19:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6DXsXAIpoOhg8WwqOaTKQL82LQDlmX5gjC1bWZDf8dpM9oei8z+bFKC3xLj/4mLyzP7kq X-Received: by 2002:a63:204d:0:b0:378:c9e5:bea6 with SMTP id r13-20020a63204d000000b00378c9e5bea6mr2411044pgm.573.1646075993003; Mon, 28 Feb 2022 11:19:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646075992; cv=none; d=google.com; s=arc-20160816; b=inL1DxbC0vf34WjlXA7MCBN0HVv9pvHbR/Oo0PVNG3r/htVO9fA5QgyWZguD/HfPKh lVYMkIMqjJZk850XEkDYPaphGjRl44Yh7zO7NsUHHpsufuePIntPgQS2eG21U31hAbpD shRRK6p3HOwErYW1duabFxDxASP2+BTqfBN7k2sYIJO/jDCGjfLSNy1FIdYzkkAoFKXZ tvkgFtOnP8qiQJ7CUHIfyyIpv3OjoleYrzxBvU1w4EszKstVKMUG1Eg32Ai+zBs+JYE1 5zSya06TUWgYsFLg7HkocwwC4M230zYcd6pv5UNRf5sORKXWVRGZBRfV1/w0TaVlogps JT6g== 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=rKyFAXCmKAYNuarZ8yzonNl7KAxrf0Qm9q5cbYgdEIY=; b=D8jwxhM3C7RMS+azlVrJcNXqOIKeH5rygrjr4G7L2hF7EarwPwom5JddY67QM/SIze HhA7fP0OFRyyW9+gV0eomHIIdWcEBHl71TvPbND1ES7QpCOWYfFhuxq0zSoGpuWh12fl sb8wdIixO8h2lGoffwPcJKi+yK/JmzaoCaZZqr8V0MdRY6/ZCywgBi3+8fD1TjSYFqh5 yLMvL3YaRcvq8ZCGQlMOKyT+ig85UFI8cGsKU47hj4y7b/3mRv+labTBlLsaR/z2spba JH5vWteBB78yVV6fyYPVFsRCHc2aq1c4qZgZNYxkiv/0tIUdCJByR+ttNU1cLttG8DAv GVPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JDy8fgGU; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b6-20020aa78ec6000000b004c7e5d4ce3asi9008800pfr.61.2022.02.28.11.19.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 11:19:52 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JDy8fgGU; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9227CAB44F; Mon, 28 Feb 2022 11:10:45 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239842AbiB1STf (ORCPT + 99 others); Mon, 28 Feb 2022 13:19:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240819AbiB1SSO (ORCPT ); Mon, 28 Feb 2022 13:18:14 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A3D3AC050 for ; Mon, 28 Feb 2022 09:54:53 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id p14so26378842ejf.11 for ; Mon, 28 Feb 2022 09:54:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rKyFAXCmKAYNuarZ8yzonNl7KAxrf0Qm9q5cbYgdEIY=; b=JDy8fgGUxf0IGJHfk/O0WyiqfUorrv0vNRQq82dCqBFpjXsWqco4CzrVWvadRg1/0t n+RDd3ztRNk5y4or+DUO9bjKQaeqkhnkPAXva+M2qMDwMS9w1ybbP4a+pECwFE+qimRA Uk39Oshxgwz/pp7FehPY5V1w9jkfkplrbf25w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rKyFAXCmKAYNuarZ8yzonNl7KAxrf0Qm9q5cbYgdEIY=; b=mQzE5CuL74draORiucHV96UhDK+DIQ+kHPzSDE5Eh9UBkLQlloFHyFEUcn0PObQbph Xc3s054DBDf6Ui/GRhes99rCEwJG7gAPesKGztMy/ROqoTj+8IxBK457ILbXvgyZ8i5M 1S4bJq3UFT5rLJFmTcsB1Um5RGSo5Hw+UPU4w4pKn8zgZs9EjSthSUaeDYgIVcWz53Z5 v0P9ZCT1hfpy0VK48aT/tAx8+0SG5fYmXtFlVOC2hy4Ft6uoFHittXjBYUGwtFIW8Dt5 h+ZVXb3FrKp8w6tpwxRpspm+biljLieSwx7udZ+IGQLThsh0AzAEfK8VllLfunJKOhQH eAOQ== X-Gm-Message-State: AOAM530LOAf3W5Opq3zX4+i9M7R08neY1WSv8GGHl7mb57XiJMYzPEKo jzAqaO+scRiQ9WPOQS/0TPPEW2tkk0c10w== X-Received: by 2002:a17:907:9691:b0:6d1:711d:9050 with SMTP id hd17-20020a170907969100b006d1711d9050mr16625508ejc.755.1646070891585; Mon, 28 Feb 2022 09:54:51 -0800 (PST) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com. [209.85.221.44]) by smtp.gmail.com with ESMTPSA id n24-20020a509358000000b00410bedd9eb4sm6463795eda.88.2022.02.28.09.54.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Feb 2022 09:54:50 -0800 (PST) Received: by mail-wr1-f44.google.com with SMTP id j17so16776712wrc.0 for ; Mon, 28 Feb 2022 09:54:49 -0800 (PST) X-Received: by 2002:a5d:6543:0:b0:1ef:7194:3efc with SMTP id z3-20020a5d6543000000b001ef71943efcmr12481297wrv.422.1646070889301; Mon, 28 Feb 2022 09:54:49 -0800 (PST) MIME-Version: 1.0 References: <20220222141838.1.If784ba19e875e8ded4ec4931601ce6d255845245@changeid> In-Reply-To: From: Doug Anderson Date: Mon, 28 Feb 2022 09:54:36 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/bridge: ti-sn65dsi86: Properly undo autosuspend To: Laurent Pinchart Cc: Linus Walleij , dri-devel , Brian Norris , Andrzej Hajda , Bjorn Andersson , Daniel Vetter , David Airlie , Jernej Skrabec , Jonas Karlman , Neil Armstrong , Robert Foss , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Feb 23, 2022 at 7:55 AM Laurent Pinchart wrote: > > Hi Doug, > > On Wed, Feb 23, 2022 at 07:43:27AM -0800, Doug Anderson wrote: > > On Tue, Feb 22, 2022 at 9:08 PM Laurent Pinchart wrote: > > > On Tue, Feb 22, 2022 at 11:44:54PM +0100, Linus Walleij wrote: > > > > On Tue, Feb 22, 2022 at 11:19 PM Douglas Anderson wrote: > > > > > > > > > > The PM Runtime docs say: > > > > > Drivers in ->remove() callback should undo the runtime PM changes done > > > > > in ->probe(). Usually this means calling pm_runtime_disable(), > > > > > pm_runtime_dont_use_autosuspend() etc. > > > > > > > > > > We weren't doing that for autosuspend. Let's do it. > > > > > > > > > > Fixes: 9bede63127c6 ("drm/bridge: ti-sn65dsi86: Use pm_runtime autosuspend") > > > > > Signed-off-by: Douglas Anderson > > > > > > > > Hm. I know a few places in drivers where I don't do this :/ > > > > > > It seems to be a very common problem indeed, I haven't seen any driver > > > yet that uses pm_runtime_dont_use_autosuspend(). We could play a game of > > > whack-a-mole, but we'll never win. Could this be solved in the runtime > > > PM framework instead ? pm_runtime_disable() could disable auto-suspend. > > > If there are legitimate use cases for disabling runtime PM temporarily > > > without disabling auto-suspend, then a new function designed > > > specifically for remove() that would take care of cleaning everything up > > > could be another option. > > > > Yeah, it would be good. It's probably not a yak I have time to shave > > right now, though. :( > > I don't insist on shaving that yak right now :-) This patch is fine. Landed in drm-misc-fixes: 26d347434829 drm/bridge: ti-sn65dsi86: Properly undo autosuspend -Doug