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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 52769C433ED for ; Tue, 27 Apr 2021 10:54:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C3F5613BE for ; Tue, 27 Apr 2021 10:54:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235547AbhD0Kzb (ORCPT ); Tue, 27 Apr 2021 06:55:31 -0400 Received: from muru.com ([72.249.23.125]:49128 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230341AbhD0Kza (ORCPT ); Tue, 27 Apr 2021 06:55:30 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id CDC0180EB; Tue, 27 Apr 2021 10:54:47 +0000 (UTC) Date: Tue, 27 Apr 2021 13:54:44 +0300 From: Tony Lindgren To: Tomi Valkeinen Cc: Laurent Pinchart , Sebastian Reichel , dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org Subject: Re: [PATCH] drm/omap: Fix issue with clocks left on after resume Message-ID: References: <20210426141241.51985-1-tony@atomide.com> <0963c9fa-1b45-b742-ed9b-5c48d3a97987@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org * Tony Lindgren [210427 10:12]: > * Tomi Valkeinen [210427 08:47]: > > If I understand right, this is only an issue when the dss was not enabled > > before the system suspend? And as the dispc is not enabled at suspend, > > pm_runtime_force_suspend and pm_runtime_force_resume don't really do > > anything. At resume, the DRM resume functionality causes omapdrm to call > > pm_runtime_get and put, and this somehow causes the dss to stay enabled. > > We do have dss enabled at system suspend from omap_atomic_comit_tail() > until pm_runtime_force_suspend(). Then we have pm_runtime_force_resume() > enable it. Sorry I already forgot that pm_runtime_force_resume() is not enabling it because pm_runtime_need_not_resume().. It's the omapdrm calling pm_runtime_get() that enables the hardware on resume. > Then on resume PM runtime prevents disable of the hardware on resume path > until after device_complete(). Until then we have rpm_suspend() return > -EBUSY, and so the parent child_count is not going to get decreased. > Something would have to handle the -EBUSY error here it seems. Regards, Tony