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=-2.5 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,USER_AGENT_SANE_1 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 21DE4C433E0 for ; Thu, 2 Jul 2020 10:54:59 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 E55322075D for ; Thu, 2 Jul 2020 10:54:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="b8PZGcIL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E55322075D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.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:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/p5qVzcAgEnS/47BdIWMEPSrk8mwJcGSyxb7Awi4iMc=; b=b8PZGcILTDl5FNWOoei1fP7Wz eftHvfvhhIMQTzmf6cTT1hOHpQKkOsHLdcBIIDMDB6+t2BfGW9xHtd5M9f3twraSVE85YMBD8TuV8 TVJ8P6EuRwi+AW7SAPYwhpqoBljAJT3aNfV8D8pSaRHqj8Mu3iZvep2FsLb+wgTg0hSQaatqg07rQ SWyUoYGermbBVR6crnRohspprygYoz35ZXY1RQLrpX1za4bBSbhhyMt6dYXa7R1YznMc4fvNVjqPN sn/wNcV5alSdLA37giIrb29iNdEDYsp37NrzDUlhmoLjVDtcGFij5SKHCYYqaPUJTYG6KbYhthMWz D+ag9yT7g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqwqT-0006TM-3M; Thu, 02 Jul 2020 10:53:33 +0000 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqwqQ-0006SO-NK for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 10:53:31 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49yFLr39hkz1rVw0; Thu, 2 Jul 2020 12:53:24 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49yFLr2C48z1qw71; Thu, 2 Jul 2020 12:53:24 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id XE8f4teyIOH6; Thu, 2 Jul 2020 12:53:22 +0200 (CEST) X-Auth-Info: BxUsMb4hTCTIOASkHZPedF6xg2xeCtGU7rA2aRGZqFc= Received: from [IPv6:::1] (unknown [195.140.253.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 2 Jul 2020 12:53:22 +0200 (CEST) Subject: Re: [PATCH] drm/stm: repair runtime power management To: Philippe CORNU , Yannick FERTRE , "dri-devel@lists.freedesktop.org" References: <20200229221649.90813-1-marex@denx.de> <64ea7f77-0a0b-ae3a-2911-5fdc8633255e@denx.de> <68f47008-f0ed-384c-7e21-f29b444da3ee@st.com> <3121f339-c513-f75d-569e-81c5c0f3cd1a@st.com> From: Marek Vasut Message-ID: Date: Thu, 2 Jul 2020 12:53:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <3121f339-c513-f75d-569e-81c5c0f3cd1a@st.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_065330_883822_748E1676 X-CRM114-Status: GOOD ( 16.54 ) 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: Benjamin Gaignard , Maxime Coquelin , Vincent ABRIOU , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , Alexandre TORGUE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 7/2/20 12:07 PM, Philippe CORNU wrote: Hi, [...] >>>> Thank for your patch. Pm_runtime_put_sync is also done into function ltdc_crtc_mode_fixup. >>>> To avoid several call of Pm_runtime_put_sync, it could be better to check pm_runtime activity: >>>> >>>> + int ret; >>>> >>>> DRM_DEBUG_DRIVER("\n"); >>>> >>>> + if (!pm_runtime_active(ddev->dev)) { >>>> + ret = pm_runtime_get_sync(ddev->dev); >>>> + if (ret) { >>>> + DRM_ERROR("Failed to enable crtc, cannot get sync\n"); >>>> + return; >>>> + } >>>> + } >>>> + >>> >>> Where should this go ? And wouldn't that only hide nastier PM imbalance >>> issues ? >> Hi Marek, >> I tested the patch & it generate an error when I try wake up / sleep >> the board STM32MP1 DK2 with weston application. >> It need an additional patch >> drm-stm-ltdc-remove-call-of-pm-runtime-functions. >> >> Thanks for the patch. >> >> Tested-by: Yannick Fertre >> > > Hi Marek, > before merging the 2 patches, I would like to be sure that Yannick's > patch does not "break" your use case (Qt I think)? > May I ask you please to give it a try? > Note: If you think there is no need to do extra checks, simply tell me > of course It's fine, thanks ! -- Best regards, Marek Vasut _______________________________________________ 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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 43AE7C433E0 for ; Fri, 3 Jul 2020 08:12:26 +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 05A41206A1 for ; Fri, 3 Jul 2020 08:12:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05A41206A1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de 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 0F6B26EB1A; Fri, 3 Jul 2020 08:12:03 +0000 (UTC) X-Greylist: delayed 577 seconds by postgrey-1.36 at gabe; Thu, 02 Jul 2020 11:03:03 UTC Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 721656E038 for ; Thu, 2 Jul 2020 11:03:03 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49yFLr39hkz1rVw0; Thu, 2 Jul 2020 12:53:24 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49yFLr2C48z1qw71; Thu, 2 Jul 2020 12:53:24 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id XE8f4teyIOH6; Thu, 2 Jul 2020 12:53:22 +0200 (CEST) X-Auth-Info: BxUsMb4hTCTIOASkHZPedF6xg2xeCtGU7rA2aRGZqFc= Received: from [IPv6:::1] (unknown [195.140.253.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 2 Jul 2020 12:53:22 +0200 (CEST) Subject: Re: [PATCH] drm/stm: repair runtime power management To: Philippe CORNU , Yannick FERTRE , "dri-devel@lists.freedesktop.org" References: <20200229221649.90813-1-marex@denx.de> <64ea7f77-0a0b-ae3a-2911-5fdc8633255e@denx.de> <68f47008-f0ed-384c-7e21-f29b444da3ee@st.com> <3121f339-c513-f75d-569e-81c5c0f3cd1a@st.com> From: Marek Vasut Message-ID: Date: Thu, 2 Jul 2020 12:53:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <3121f339-c513-f75d-569e-81c5c0f3cd1a@st.com> Content-Language: en-US X-Mailman-Approved-At: Fri, 03 Jul 2020 08:12:01 +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: Maxime Coquelin , Vincent ABRIOU , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , Alexandre TORGUE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 7/2/20 12:07 PM, Philippe CORNU wrote: Hi, [...] >>>> Thank for your patch. Pm_runtime_put_sync is also done into function ltdc_crtc_mode_fixup. >>>> To avoid several call of Pm_runtime_put_sync, it could be better to check pm_runtime activity: >>>> >>>> + int ret; >>>> >>>> DRM_DEBUG_DRIVER("\n"); >>>> >>>> + if (!pm_runtime_active(ddev->dev)) { >>>> + ret = pm_runtime_get_sync(ddev->dev); >>>> + if (ret) { >>>> + DRM_ERROR("Failed to enable crtc, cannot get sync\n"); >>>> + return; >>>> + } >>>> + } >>>> + >>> >>> Where should this go ? And wouldn't that only hide nastier PM imbalance >>> issues ? >> Hi Marek, >> I tested the patch & it generate an error when I try wake up / sleep >> the board STM32MP1 DK2 with weston application. >> It need an additional patch >> drm-stm-ltdc-remove-call-of-pm-runtime-functions. >> >> Thanks for the patch. >> >> Tested-by: Yannick Fertre >> > > Hi Marek, > before merging the 2 patches, I would like to be sure that Yannick's > patch does not "break" your use case (Qt I think)? > May I ask you please to give it a try? > Note: If you think there is no need to do extra checks, simply tell me > of course It's fine, thanks ! -- Best regards, Marek Vasut _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel