From patchwork Mon Mar 3 19:08:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 3758121 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CA0FBBF40C for ; Tue, 4 Mar 2014 00:46:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0F4D1201FA for ; Tue, 4 Mar 2014 00:46:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3D6E9203E5 for ; Tue, 4 Mar 2014 00:46:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F43FFB482; Mon, 3 Mar 2014 16:46:37 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by gabe.freedesktop.org (Postfix) with ESMTP id E9A76FBFD4 for ; Mon, 3 Mar 2014 11:10:29 -0800 (PST) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s23JARLK005886; Mon, 3 Mar 2014 13:10:27 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s23JARNP004003; Mon, 3 Mar 2014 13:10:27 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Mon, 3 Mar 2014 13:10:27 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s23JAQ7H032491; Mon, 3 Mar 2014 13:10:26 -0600 From: Felipe Balbi To: Subject: [PATCH] drm/tilcdc: restore correct display mode and contents on pm resume Date: Mon, 3 Mar 2014 13:08:56 -0600 Message-ID: <1393873736-26867-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.9.0 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 03 Mar 2014 16:46:25 -0800 Cc: Linux Kernel Mailing List , dri-devel@lists.freedesktop.org, airlied@redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darren Etheridge On resume the screen contents were not being restored properly. Looking at other DRM drivers it seems a call to drm_helper_resume_force_mode() is needed in the resume handler to force restoration of the mode and framebuffer data. Signed-off-by: Darren Etheridge Reviewed-by: Rob Clark --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 171a820..1a5ddfa 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -563,6 +563,13 @@ static int tilcdc_pm_resume(struct device *dev) if (registers[i].save && (priv->rev >= registers[i].rev)) tilcdc_write(ddev, registers[i].reg, priv->saved_register[n++]); + /* + * if this call isn't here, the display is blank on return from + * suspend. With this call here the contents of the framebuffer + * during suspend are restored correctly. + */ + drm_helper_resume_force_mode(ddev); + drm_kms_helper_poll_enable(ddev); return 0;