From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 279CBC2B9F7 for ; Mon, 24 May 2021 21:09:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E9C7D610CB for ; Mon, 24 May 2021 21:09:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233294AbhEXVKk (ORCPT ); Mon, 24 May 2021 17:10:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233267AbhEXVKk (ORCPT ); Mon, 24 May 2021 17:10:40 -0400 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D365DC061756 for ; Mon, 24 May 2021 14:09:09 -0700 (PDT) Received: by mail-qk1-x72e.google.com with SMTP id v8so28435143qkv.1 for ; Mon, 24 May 2021 14:09:09 -0700 (PDT) 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=Cb0Uq1HaIEgENxGmHlcF9aKNMAXuk7VxGUnLZxEoKmU=; b=ntnzKyxJBJ7zU41VapDr35r0+JiHT8LcMIOT1SR4I6dP7Nrl9EK73MZQzrTWVv2G/a TvLKeWmsqGVaLQw7mwVv23fZ6u/EttxAw0FagUfXUq1zL12KWaqXnLByBCoKE5F7om18 zGL5EynggjpTSTpu9EBvXFi+MSf3PrIlYRTSY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Cb0Uq1HaIEgENxGmHlcF9aKNMAXuk7VxGUnLZxEoKmU=; b=Iyr0fMDEjkZCJNP4fdVz2tGSXesU/1TdZApiQTWSqEv9qAXKwF1FmoEa9UAnRdxJzq BENW6PJK5+a0dvNOf9TvUFI7JQChrahBr/LoXcm52QRZ0zc5oN53tNbtnk1DsdshmsHP bdUeWMqfkD6vjF1NGLoKfyiU7VknPVyum0DMkC6FfkYsikrtgSq7qKs/sTMvXNOLGS0Q 2FsAt3JUc1v8FtiYxT2jxCfj6ggzCQoYhjzxWQuCGAFHJQCcLIYYVb6LXr7QuhYy/iZ3 f0hna/N49MUdpVM0/2pTRZub9eFOSIvnpTUbQ2pJBiJ0GiXn4Y9vNJN/6APuq87ucMog lh7w== X-Gm-Message-State: AOAM532rVXpxdODoQzRT0BTy3R1n2SGHOTTtv7031jtF/CTw9nuqmjut d53to9YNat69h/dJDrioOvCRtQC3WnIbIw== X-Google-Smtp-Source: ABdhPJxhCG3stcmcbor+5lY7uViTAUSqKnC3rKEC4I+MYyhQnVUSHrI2IAdw23cY0XPeG8MCwZ4hkQ== X-Received: by 2002:a37:789:: with SMTP id 131mr31537941qkh.130.1621890548508; Mon, 24 May 2021 14:09:08 -0700 (PDT) Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com. [209.85.219.175]) by smtp.gmail.com with ESMTPSA id s20sm11870289qke.2.2021.05.24.14.09.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 May 2021 14:09:07 -0700 (PDT) Received: by mail-yb1-f175.google.com with SMTP id o18so2307189ybc.8 for ; Mon, 24 May 2021 14:09:07 -0700 (PDT) X-Received: by 2002:a25:b801:: with SMTP id v1mr2108952ybj.32.1621890546699; Mon, 24 May 2021 14:09:06 -0700 (PDT) MIME-Version: 1.0 References: <20210517200907.1459182-1-dianders@chromium.org> <20210517130450.v7.1.I9e947183e95c9bd067c9c1d51208ac6a96385139@changeid> In-Reply-To: From: Doug Anderson Date: Mon, 24 May 2021 14:08:53 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 01/10] drm/panel: panel-simple: Add missing pm_runtime_dont_use_autosuspend() calls To: Laurent Pinchart Cc: Andrzej Hajda , Neil Armstrong , Jonas Karlman , Jernej Skrabec , Sam Ravnborg , Rob Clark , David Airlie , linux-arm-msm , Stephen Boyd , dri-devel , Bjorn Andersson , Stanislav Lisovskiy , Thierry Reding , Steev Klimaszewski , Thierry Reding , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hi, On Mon, May 24, 2021 at 1:22 PM Laurent Pinchart wrote: > > Hi Doug, > > Thank you for the patch. > > On Mon, May 17, 2021 at 01:08:58PM -0700, Douglas Anderson wrote: > > The PM Runtime docs specifically call out the need to call > > pm_runtime_dont_use_autosuspend() in the remove() callback if > > pm_runtime_use_autosuspend() was called in probe(): > > > > > 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. > > ~/src/kernel/linux $ git grep pm_runtime_use_autosuspend -- drivers | wc -l > 209 > ~/src/kernel/linux $ git grep pm_runtime_dont_use_autosuspend -- drivers | wc -l > 80 > > Seems like a lost battle :-( > > The fix is right, but I wonder if this shouldn't be handled > automatically by the runtime PM core. The runtime PM API is notoriously > difficult to use correctly. No kidding. > > We should do this. This fixes a warning splat that I saw when I was > > testing out the panel-simple's remove(). > > > > Fixes: 3235b0f20a0a ("drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare") > > Signed-off-by: Douglas Anderson > > Reviewed-by: Laurent Pinchart Thanks! I have pushed just this patch for now. -Doug From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2014C04FF3 for ; Mon, 24 May 2021 21:09:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9DF566140F for ; Mon, 24 May 2021 21:09:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DF566140F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0AA5489E2A; Mon, 24 May 2021 21:09:11 +0000 (UTC) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by gabe.freedesktop.org (Postfix) with ESMTPS id AC7ED89E2A for ; Mon, 24 May 2021 21:09:09 +0000 (UTC) Received: by mail-qk1-x734.google.com with SMTP id q10so28406598qkc.5 for ; Mon, 24 May 2021 14:09:09 -0700 (PDT) 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=Cb0Uq1HaIEgENxGmHlcF9aKNMAXuk7VxGUnLZxEoKmU=; b=ntnzKyxJBJ7zU41VapDr35r0+JiHT8LcMIOT1SR4I6dP7Nrl9EK73MZQzrTWVv2G/a TvLKeWmsqGVaLQw7mwVv23fZ6u/EttxAw0FagUfXUq1zL12KWaqXnLByBCoKE5F7om18 zGL5EynggjpTSTpu9EBvXFi+MSf3PrIlYRTSY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Cb0Uq1HaIEgENxGmHlcF9aKNMAXuk7VxGUnLZxEoKmU=; b=KdgdDh5ca7SPjupxYmb7MdmeJsJtMPbnXiWU8sVKqbfx115wm8YskoKf1owlZ8UeLJ Egq2NmHM5WukhGSAW55WjXCCC39wx2HJHYbk8SVGl3NhnH9P/FhTs2wn9alNcRt1P36j YVCrIAJfdDjEotsEuzgYdt1dX96mW1D4p7JDLVXT7MPtVK//Yixy8du8VjixKXJEHgPV zk3FU6jj9g3vnqU+jrIwbjKvwEAjWT03gpywtsM7N+qxro1gq/7N8DZuaAsdUMV6ZBVg vZv3U4lVbvD+Xv53W832CbJmkfFLvedUH01Vvy20aJZJZNVKAh0cFBX3FuKyiHvV4O1C G/dQ== X-Gm-Message-State: AOAM533EzYWulXQnac8hUimTr5ILLSe2eCQYTvSn3VOMWvC9QKlKjSB6 BxuMkU/ybcu2/TT2QEGqHyEOUG4/9jBMsg== X-Google-Smtp-Source: ABdhPJzT8Kx2qM4FakI0ASog3AWgG5WS2NO3O9IStf3kgTHt0cdWOefsNC4/lqsdjeQld2Qn2ZibKw== X-Received: by 2002:a05:620a:120d:: with SMTP id u13mr3695462qkj.404.1621890548424; Mon, 24 May 2021 14:09:08 -0700 (PDT) Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com. [209.85.219.181]) by smtp.gmail.com with ESMTPSA id d2sm12186568qkn.95.2021.05.24.14.09.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 May 2021 14:09:07 -0700 (PDT) Received: by mail-yb1-f181.google.com with SMTP id b13so38547009ybk.4 for ; Mon, 24 May 2021 14:09:07 -0700 (PDT) X-Received: by 2002:a25:b801:: with SMTP id v1mr2108952ybj.32.1621890546699; Mon, 24 May 2021 14:09:06 -0700 (PDT) MIME-Version: 1.0 References: <20210517200907.1459182-1-dianders@chromium.org> <20210517130450.v7.1.I9e947183e95c9bd067c9c1d51208ac6a96385139@changeid> In-Reply-To: From: Doug Anderson Date: Mon, 24 May 2021 14:08:53 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 01/10] drm/panel: panel-simple: Add missing pm_runtime_dont_use_autosuspend() calls To: Laurent Pinchart Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Jernej Skrabec , Thierry Reding , Jonas Karlman , David Airlie , linux-arm-msm , Neil Armstrong , LKML , dri-devel , Stephen Boyd , Stanislav Lisovskiy , Andrzej Hajda , Thierry Reding , Steev Klimaszewski , Bjorn Andersson , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, On Mon, May 24, 2021 at 1:22 PM Laurent Pinchart wrote: > > Hi Doug, > > Thank you for the patch. > > On Mon, May 17, 2021 at 01:08:58PM -0700, Douglas Anderson wrote: > > The PM Runtime docs specifically call out the need to call > > pm_runtime_dont_use_autosuspend() in the remove() callback if > > pm_runtime_use_autosuspend() was called in probe(): > > > > > 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. > > ~/src/kernel/linux $ git grep pm_runtime_use_autosuspend -- drivers | wc -l > 209 > ~/src/kernel/linux $ git grep pm_runtime_dont_use_autosuspend -- drivers | wc -l > 80 > > Seems like a lost battle :-( > > The fix is right, but I wonder if this shouldn't be handled > automatically by the runtime PM core. The runtime PM API is notoriously > difficult to use correctly. No kidding. > > We should do this. This fixes a warning splat that I saw when I was > > testing out the panel-simple's remove(). > > > > Fixes: 3235b0f20a0a ("drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare") > > Signed-off-by: Douglas Anderson > > Reviewed-by: Laurent Pinchart Thanks! I have pushed just this patch for now. -Doug