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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 D5028C433E0 for ; Wed, 3 Jun 2020 14:06:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B16CD20738 for ; Wed, 3 Jun 2020 14:06:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726071AbgFCOGo (ORCPT ); Wed, 3 Jun 2020 10:06:44 -0400 Received: from muru.com ([72.249.23.125]:56886 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725833AbgFCOGn (ORCPT ); Wed, 3 Jun 2020 10:06:43 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id B20A1809C; Wed, 3 Jun 2020 14:07:32 +0000 (UTC) Date: Wed, 3 Jun 2020 07:06:39 -0700 From: Tony Lindgren To: Tomi Valkeinen Cc: linux-omap@vger.kernel.org, "Andrew F . Davis" , Dave Gerlach , Faiz Abbas , Greg Kroah-Hartman , Grygorii Strashko , Keerthy , Nishanth Menon , Peter Ujfalusi , Roger Quadros , Suman Anna , Tero Kristo , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Laurent Pinchart Subject: Re: [PATCH 1/5] drm/omap: Fix suspend resume regression after platform data removal Message-ID: <20200603140639.GG37466@atomide.com> References: <20200531193941.13179-1-tony@atomide.com> <20200531193941.13179-2-tony@atomide.com> <16ba1808-5c7f-573d-8dd0-c80cac2f476e@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16ba1808-5c7f-573d-8dd0-c80cac2f476e@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org * Tomi Valkeinen [200603 12:34]: > Hi Tony, > > On 31/05/2020 22:39, Tony Lindgren wrote: > > When booting without legacy platform data, we no longer have omap_device > > calling PM runtime suspend for us on suspend. This causes the driver > > context not be saved as we have no suspend and resume functions defined. > > > > Let's fix the issue by switching over to use UNIVERSAL_DEV_PM_OPS as it > > will call the existing PM runtime suspend functions on suspend. > > I don't think we can use UNIVERSAL_DEV_PM_OPS, as we can't disable DSS > modules in any order, but things have to be shut down in orderly manner. OK. I presume you talk about the order of dss child devices here. > omapdrm hasn't relied on omap_device calling runtime suspend for us (I > didn't know it does that). We have system suspend hooks in omap_drv.c: We had omap_device sort of brute forcing things to idle on suspend which only really works for interconnect target modules with one device in them. > SIMPLE_DEV_PM_OPS(omapdrm_pm_ops, omap_drm_suspend, omap_drm_resume) > > omap_drm_suspend() is supposed to turn off the displays, which then cause > dispc_runtime_put (and other runtime_puts) to be called, which result in > dispc_runtime_suspend (and other runtime PM suspends). OK thanks for explaining, I missed that part. > So... For some reason that's no longer happening? I need to try to find a > board with which suspend/resume works (without DSS)... Yes it seems something has changed. When diffing the dmesg debug output on suspend and resume, context save and restore functions are no longer called as the PM runtime suspend and resume functions are no longer called on suspend and resume. I'll drop this patch, and will be applying the rest of the series to fixes if no objections. Thanks, Tony 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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 A4E08C433E0 for ; Wed, 3 Jun 2020 14:07:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 71F0A20679 for ; Wed, 3 Jun 2020 14:07:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jyMl0kgX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71F0A20679 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uPxlG65RRAJbnqM99NVgcwyZZaKWElPD+HY/RSJevcE=; b=jyMl0kgXRjUghN TIHAdAL3iIXGFtQuNrmkCrNMchh68ssY3BI0djILAgf2RQdHMOa+Tty46FVHowd6krGugia4znblb N4JBboYvOE/vrQwlAOI8pZS8oFdDyiIfiITpkvydEQ2ONaaREvMnB6PHAODPjv6RIsGTNvue3xoFH zXWeq/E5ubtgTgnQHsYRkJa4KBZRzbzBsE3Euj+qhw2RH4xc/vQXefHR/9SMMyCNvbBUhYDhbGHVj mw2LERsX8cqDr8dPjBTJdDDO8OXfcZ6bACwAiXro+6TUEy594gWbqJ6kS8x306ZWVHjvcol7TTapB Kyd+mlKHn9m+SP8SJJug==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgU2e-0001s8-6R; Wed, 03 Jun 2020 14:06:52 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgU2a-0001r7-Qs for linux-arm-kernel@lists.infradead.org; Wed, 03 Jun 2020 14:06:50 +0000 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id B20A1809C; Wed, 3 Jun 2020 14:07:32 +0000 (UTC) Date: Wed, 3 Jun 2020 07:06:39 -0700 From: Tony Lindgren To: Tomi Valkeinen Subject: Re: [PATCH 1/5] drm/omap: Fix suspend resume regression after platform data removal Message-ID: <20200603140639.GG37466@atomide.com> References: <20200531193941.13179-1-tony@atomide.com> <20200531193941.13179-2-tony@atomide.com> <16ba1808-5c7f-573d-8dd0-c80cac2f476e@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <16ba1808-5c7f-573d-8dd0-c80cac2f476e@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200603_070648_912168_52C0DF4C X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , Tero Kristo , Grygorii Strashko , Dave Gerlach , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, "Andrew F . Davis" , Peter Ujfalusi , Faiz Abbas , Laurent Pinchart , Keerthy , Suman Anna , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Roger Quadros Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org * Tomi Valkeinen [200603 12:34]: > Hi Tony, > > On 31/05/2020 22:39, Tony Lindgren wrote: > > When booting without legacy platform data, we no longer have omap_device > > calling PM runtime suspend for us on suspend. This causes the driver > > context not be saved as we have no suspend and resume functions defined. > > > > Let's fix the issue by switching over to use UNIVERSAL_DEV_PM_OPS as it > > will call the existing PM runtime suspend functions on suspend. > > I don't think we can use UNIVERSAL_DEV_PM_OPS, as we can't disable DSS > modules in any order, but things have to be shut down in orderly manner. OK. I presume you talk about the order of dss child devices here. > omapdrm hasn't relied on omap_device calling runtime suspend for us (I > didn't know it does that). We have system suspend hooks in omap_drv.c: We had omap_device sort of brute forcing things to idle on suspend which only really works for interconnect target modules with one device in them. > SIMPLE_DEV_PM_OPS(omapdrm_pm_ops, omap_drm_suspend, omap_drm_resume) > > omap_drm_suspend() is supposed to turn off the displays, which then cause > dispc_runtime_put (and other runtime_puts) to be called, which result in > dispc_runtime_suspend (and other runtime PM suspends). OK thanks for explaining, I missed that part. > So... For some reason that's no longer happening? I need to try to find a > board with which suspend/resume works (without DSS)... Yes it seems something has changed. When diffing the dmesg debug output on suspend and resume, context save and restore functions are no longer called as the PM runtime suspend and resume functions are no longer called on suspend and resume. I'll drop this patch, and will be applying the rest of the series to fixes if no objections. Thanks, Tony _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-0.8 required=3.0 tests=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 CE4EFC433E0 for ; Thu, 4 Jun 2020 07:12:02 +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 89362206DC for ; Thu, 4 Jun 2020 07:12:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89362206DC 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 DF3E86E271; Thu, 4 Jun 2020 07:11:43 +0000 (UTC) Received: from muru.com (muru.com [72.249.23.125]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F27F89B11 for ; Wed, 3 Jun 2020 14:06:44 +0000 (UTC) Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id B20A1809C; Wed, 3 Jun 2020 14:07:32 +0000 (UTC) Date: Wed, 3 Jun 2020 07:06:39 -0700 From: Tony Lindgren To: Tomi Valkeinen Subject: Re: [PATCH 1/5] drm/omap: Fix suspend resume regression after platform data removal Message-ID: <20200603140639.GG37466@atomide.com> References: <20200531193941.13179-1-tony@atomide.com> <20200531193941.13179-2-tony@atomide.com> <16ba1808-5c7f-573d-8dd0-c80cac2f476e@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <16ba1808-5c7f-573d-8dd0-c80cac2f476e@ti.com> X-Mailman-Approved-At: Thu, 04 Jun 2020 07:11:42 +0000 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: Nishanth Menon , Tero Kristo , Grygorii Strashko , Dave Gerlach , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, "Andrew F . Davis" , Peter Ujfalusi , Faiz Abbas , Laurent Pinchart , Keerthy , Suman Anna , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Roger Quadros Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" * Tomi Valkeinen [200603 12:34]: > Hi Tony, > > On 31/05/2020 22:39, Tony Lindgren wrote: > > When booting without legacy platform data, we no longer have omap_device > > calling PM runtime suspend for us on suspend. This causes the driver > > context not be saved as we have no suspend and resume functions defined. > > > > Let's fix the issue by switching over to use UNIVERSAL_DEV_PM_OPS as it > > will call the existing PM runtime suspend functions on suspend. > > I don't think we can use UNIVERSAL_DEV_PM_OPS, as we can't disable DSS > modules in any order, but things have to be shut down in orderly manner. OK. I presume you talk about the order of dss child devices here. > omapdrm hasn't relied on omap_device calling runtime suspend for us (I > didn't know it does that). We have system suspend hooks in omap_drv.c: We had omap_device sort of brute forcing things to idle on suspend which only really works for interconnect target modules with one device in them. > SIMPLE_DEV_PM_OPS(omapdrm_pm_ops, omap_drm_suspend, omap_drm_resume) > > omap_drm_suspend() is supposed to turn off the displays, which then cause > dispc_runtime_put (and other runtime_puts) to be called, which result in > dispc_runtime_suspend (and other runtime PM suspends). OK thanks for explaining, I missed that part. > So... For some reason that's no longer happening? I need to try to find a > board with which suspend/resume works (without DSS)... Yes it seems something has changed. When diffing the dmesg debug output on suspend and resume, context save and restore functions are no longer called as the PM runtime suspend and resume functions are no longer called on suspend and resume. I'll drop this patch, and will be applying the rest of the series to fixes if no objections. Thanks, Tony _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel