Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp368462pxm; Wed, 23 Feb 2022 02:04:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyy4z0xzpJUFHkEHzTgnbiKHDfF6v2bMjUdgjxEJWZFWm6Tsvsiu8ZZ+JpGQKEu/X0ybOlL X-Received: by 2002:a63:2f87:0:b0:374:4ebe:2048 with SMTP id v129-20020a632f87000000b003744ebe2048mr10309674pgv.157.1645610691934; Wed, 23 Feb 2022 02:04:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645610691; cv=none; d=google.com; s=arc-20160816; b=GwHpImjNdSKqFgcMJaM9kSvy7PxPTWyMFpVmoJjI4gAdSgFv4YUcE1l+Oi1AM5gMJp QnJjKiEJulTcVbPNSLB/lcsyfDZS0BHuYEKSxzWjWvkm3YH7OTLLL0sthVLsRicR5xDS +oHAwUld7dxK1mJ0V1MSEh7ufB3R9FBQa2wDDM4MKjW8VZkIdqkeqsJF0JFK4mJlbfcF Qzt+UXWAbb71s/igIq+ky4e9wr2kfALWjXU9mlbivSvHsCPR6vCWF0vrlXHUNHWxepyE gCE5Y9yke4SVSzaFujtAoAucqtgePLZYi4b1qVpZbDYsEve8fr+5JopOXE5AwuhmNUVt LRJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PlwcvwE9lvxlUowbP+3/7z5RIpQSReuCRQM2eidrPbM=; b=kLPCY/5nDh3kBR/SrnBVMNBumzy0N5H8j04F4zsRtB8pZFFbXwqnZyp64ZiZs1JLCK JXck6epj0T8RVXF4Azo+2SfuRJvWauY6YV4RUsVSmm6eDT7z3dGH8wI9GLei1K6yutN5 In2PkIm/q45Rxq9WKwqdFi8d32AAKN+UyYUkQPHxOTjIABBTcFYoJGOeK0AAhcTP99JU Xwi3t4j8CU4aOCrYJmQDEA7tor6/YCyK87DsQ7KXXxB89fWfjrK1F7q9x8aEfZaAvFce hklFs+YvulHPKDcCwwpzpS8uL/jsmz8F9/KEsYfMHHEB3IRLX5MnO45UNU0cmdJ0lEyX roGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=bD7ZBhUz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g7si15419792pgu.391.2022.02.23.02.04.38; Wed, 23 Feb 2022 02:04:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=bD7ZBhUz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237013AbiBWFI3 (ORCPT + 99 others); Wed, 23 Feb 2022 00:08:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230020AbiBWFI1 (ORCPT ); Wed, 23 Feb 2022 00:08:27 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A15474B1C5 for ; Tue, 22 Feb 2022 21:07:59 -0800 (PST) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 328CCDD; Wed, 23 Feb 2022 06:07:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1645592877; bh=kN0ZyoiXMV6L86XxzCtG8GG9/tq0A0jYC35yUuHrYpg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bD7ZBhUzEVTFSC9UurN3tBFuK/V2CrlB81b9dlbdrRkJa8+jXNsELI/EYUjbws6Ca beS3SQQIBx4nLEeXw8MP2ya6FLBFpyD7fvvOY6sNSdiL8nYSmRoFrgJn0BF7sSrRbr 7zgeVkjgaG/01MZkw5VH4Z57Et1ihson0wpgRBw0= Date: Wed, 23 Feb 2022 07:07:47 +0200 From: Laurent Pinchart To: Linus Walleij Cc: Douglas Anderson , dri-devel@lists.freedesktop.org, Brian Norris , Andrzej Hajda , Bjorn Andersson , Daniel Vetter , David Airlie , Jernej Skrabec , Jonas Karlman , Neil Armstrong , Robert Foss , linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/bridge: ti-sn65dsi86: Properly undo autosuspend Message-ID: References: <20220222141838.1.If784ba19e875e8ded4ec4931601ce6d255845245@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 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. > Reviewed-by: Linus Walleij -- Regards, Laurent Pinchart