Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753327AbdFSPrN (ORCPT ); Mon, 19 Jun 2017 11:47:13 -0400 Received: from smtp.domeneshop.no ([194.63.252.55]:58378 "EHLO smtp.domeneshop.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751757AbdFSPrK (ORCPT ); Mon, 19 Jun 2017 11:47:10 -0400 Subject: Re: [PATCH v2] drm: hdlcd: Update PM code to save/restore console. To: Liviu Dudau , Mali DP Maintainers Cc: DRI devel , LKML References: <20170619135341.4357-1-Liviu.Dudau@arm.com> From: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= Message-ID: <6c1a7f41-872e-fd95-770a-ed057d89580d@tronnes.org> Date: Mon, 19 Jun 2017 17:47:07 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170619135341.4357-1-Liviu.Dudau@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1766 Lines: 56 Den 19.06.2017 15.53, skrev Liviu Dudau: > Update the PM code to suspend/resume the fbdev_cma console. > > Changelog: > - v2: Use drm_fbdev_cma_set_suspend_unlocked() function for taking the > console lock (suggested by Noralf Trønnes ) > - v1: Initial submission [1] > > > [1] https://lists.freedesktop.org/archives/dri-devel/2017-June/144502.html > > Signed-off-by: Liviu Dudau > --- > drivers/gpu/drm/arm/hdlcd_drv.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c > index d3da87fbd85a..11ecda211f7f 100644 > --- a/drivers/gpu/drm/arm/hdlcd_drv.c > +++ b/drivers/gpu/drm/arm/hdlcd_drv.c > @@ -13,6 +13,7 @@ > #include > #include > #include > +#include This include isn't necessary now. Noralf. > #include > #include > #include > @@ -435,9 +436,11 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev) > return 0; > > drm_kms_helper_poll_disable(drm); > + drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 1); > > hdlcd->state = drm_atomic_helper_suspend(drm); > if (IS_ERR(hdlcd->state)) { > + drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0); > drm_kms_helper_poll_enable(drm); > return PTR_ERR(hdlcd->state); > } > @@ -454,8 +457,8 @@ static int __maybe_unused hdlcd_pm_resume(struct device *dev) > return 0; > > drm_atomic_helper_resume(drm, hdlcd->state); > + drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0); > drm_kms_helper_poll_enable(drm); > - pm_runtime_set_active(dev); > > return 0; > }