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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 70E8BC433B4 for ; Mon, 3 May 2021 11:16:10 +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 C781161221 for ; Mon, 3 May 2021 11:16:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C781161221 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com 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 16F686E8A7; Mon, 3 May 2021 11:16:09 +0000 (UTC) Received: from muru.com (muru.com [72.249.23.125]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B35E6E8A7 for ; Mon, 3 May 2021 11:16:08 +0000 (UTC) Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id C4DC2809F; Mon, 3 May 2021 11:16:08 +0000 (UTC) Date: Mon, 3 May 2021 14:16:04 +0300 From: Tony Lindgren To: Tomi Valkeinen Subject: Re: [PATCHv2] drm/omap: Fix issue with clocks left on after resume Message-ID: References: <20210428092500.23521-1-tony@atomide.com> <79bea9b8-b2d2-11ec-87a3-34626347e122@ideasonboard.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: linux-omap@vger.kernel.org, Laurent Pinchart , dri-devel@lists.freedesktop.org, Sebastian Reichel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, * Tony Lindgren [210503 10:45]: > * Tomi Valkeinen [210503 08:04]: > > On 29/04/2021 07:46, Tony Lindgren wrote: > > > Decoupling the system suspend and resume from PM runtime calls for > > > all the other dss components should still also be done IMO. But that > > > can be done as a separate clean-up patches after we have fixed the > > > $subject issue. > > > > I don't think I still really understand why all this is needed. I mean, > > obviously things don't work correctly at the moment, so maybe this patch can > > be applied to fix the system suspend. But it just feels like a big hack (the > > current pm_runtime_force_suspend/resume work-around feels like a big hack > > too). > > Well omapdrm is not handling the -EBUSY error during system resume. Or rather something on the resume path is not handling and cannot handle -EBUSY. And sounds like the reason is.. > > Slightly off topic, but I just noticed that we're using runtime_put_sync for > > some reason. Found 0eaf9f52e94f756147dbfe1faf1f77a02378dbf9. I've been > > fighting with system suspend for a long time =). > > > > I wonder if using non-sync version would remove the EBUSY problem... > > Worth trying, but it will only help if the -EBUSY error from > pm_runtime_put() is handled somewhere for a retry.. ..the use of pm_runtime_put_sync() like you suggested. I did a quick test with the minimal change below and that works :) Seems like that's probably the best minimal fix for the -rc cycle. Regards, Tony 8< ---------------- diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -664,7 +664,7 @@ void dispc_runtime_put(struct dispc_device *dispc) DSSDBG("dispc_runtime_put\n"); - r = pm_runtime_put_sync(&dispc->pdev->dev); + r = pm_runtime_put(&dispc->pdev->dev); WARN_ON(r < 0 && r != -ENOSYS); } _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel