Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1234739pxa; Thu, 20 Aug 2020 06:22:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw017xR4wBzmbJoIjHg+siutuovAggvypZ6FDUlPmG8wVSgBIxsAg5O9dEqOPahbdAzzmtb X-Received: by 2002:a17:906:71d3:: with SMTP id i19mr3195840ejk.459.1597929729143; Thu, 20 Aug 2020 06:22:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597929729; cv=none; d=google.com; s=arc-20160816; b=S/+JqD2q+IvFyM1D+3y1YKMAv6UHNPfLod8oiOW75GvGGeHt6m6kSKWA/tR3zesiAu OzSex5DJBdjlP8ZJXJvc00BNrXlImpbFSX/O8P0JNTXO4LKKDwLn9vKJVsuULYzIKi4N i/YooI5hKjlKtPqEYn3mdoheehJO9R+9TPNn+dWkD+CgE4FPp9jINEzEZwtAJs3oMWkH VKTAnglgbEsgPLiXsoqnyOQo7A8Twz/UPCAFdnS8Ag/DemiPe8vjgh+TSN0r6t5EAQQU 8fjHodwwJbRY/OJAnxefB8xNdNvdsSs6zRowhES6p6QBvFNRkfd1ngRGGJpVBC470r1/ OC3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6TcAHwyxe8OwfAXMB4o2IaDQwXWYGCq0BFfqfigtJ/U=; b=wFKnm5xA8gc9CRbghqfGEFhiISu5aywnrQNGJEog259hyq2bySZbbzcLvj5JW2X8u6 z7p6ipQqsY2gOfmecTitg30SZZTYyBB2xoJ3R5IcVtibfIRj9U7hohk6Ze5gbJoU291d RHujF/dzOI7cXEBlnMYnR/ew2Iyo460SpfaYia00VQtiHMsftbByojv8DdY320/PntUN GJ5rX2ln7PDrczHtE5DxslhsSQk2MSodSBUvLtzn0u5/l//fIMy9H1hycUmlKX3tnast xOZreuOlI35leGx0cRNR2qyGzRO9CYukv0zEJYycCpfO0tUC8O660TGayiLcKp9aPNPP 0GAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xIyxS1Bk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si1383332ejl.636.2020.08.20.06.21.44; Thu, 20 Aug 2020 06:22:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xIyxS1Bk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728723AbgHTNVO (ORCPT + 99 others); Thu, 20 Aug 2020 09:21:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:46354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728476AbgHTJel (ORCPT ); Thu, 20 Aug 2020 05:34:41 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9CE3E20724; Thu, 20 Aug 2020 09:34:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597916081; bh=fB0Emn9tdUFDUbLUQKwJWZ+0+bGZg3jjzr7SbIFLdkg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xIyxS1BkcdcDVeMxEiOTMagt6cA+lGVvTP3lxjpOZq9Eo9VdDeDoxDU7KUb4BbxIE iCbMu1vJINJnYYBWbD14+K5YaSeTdFTmRdfIU/6n9Zri2EYqFyuxO3vryn4Y8VZYuJ GSbBZDSRedTU93+8l7BvskrljjyduhsemYU4cfJY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomi Valkeinen , Tony Lindgren Subject: [PATCH 5.8 226/232] drm/omap: force runtime PM suspend on system suspend Date: Thu, 20 Aug 2020 11:21:17 +0200 Message-Id: <20200820091623.729630080@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091612.692383444@linuxfoundation.org> References: <20200820091612.692383444@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tomi Valkeinen commit ecfdedd7da5d54416db5ca0f851264dca8736f59 upstream. Use SET_LATE_SYSTEM_SLEEP_PM_OPS in DSS submodules to force runtime PM suspend and resume. We use suspend late version so that omapdrm's system suspend callback is called first, as that will disable all the display outputs after which it's safe to force DSS into suspend. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200618095153.611071-1-tomi.valkeinen@ti.com Acked-by: Tony Lindgren Fixes: cef766300353 ("drm/omap: Prepare DSS for probing without legacy platform data") Cc: stable@vger.kernel.org # v5.7+ Tested-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/omapdrm/dss/dispc.c | 1 + drivers/gpu/drm/omapdrm/dss/dsi.c | 1 + drivers/gpu/drm/omapdrm/dss/dss.c | 1 + drivers/gpu/drm/omapdrm/dss/venc.c | 1 + 4 files changed, 4 insertions(+) --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -4915,6 +4915,7 @@ static int dispc_runtime_resume(struct d static const struct dev_pm_ops dispc_pm_ops = { .runtime_suspend = dispc_runtime_suspend, .runtime_resume = dispc_runtime_resume, + SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; struct platform_driver omap_dispchw_driver = { --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -5467,6 +5467,7 @@ static int dsi_runtime_resume(struct dev static const struct dev_pm_ops dsi_pm_ops = { .runtime_suspend = dsi_runtime_suspend, .runtime_resume = dsi_runtime_resume, + SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; struct platform_driver omap_dsihw_driver = { --- a/drivers/gpu/drm/omapdrm/dss/dss.c +++ b/drivers/gpu/drm/omapdrm/dss/dss.c @@ -1614,6 +1614,7 @@ static int dss_runtime_resume(struct dev static const struct dev_pm_ops dss_pm_ops = { .runtime_suspend = dss_runtime_suspend, .runtime_resume = dss_runtime_resume, + SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; struct platform_driver omap_dsshw_driver = { --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c @@ -902,6 +902,7 @@ static int venc_runtime_resume(struct de static const struct dev_pm_ops venc_pm_ops = { .runtime_suspend = venc_runtime_suspend, .runtime_resume = venc_runtime_resume, + SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static const struct of_device_id venc_of_match[] = {