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: 25629 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4A1A520540 for ; Mon, 3 Mar 2014 19:10:50 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id kq14sf11645373pab.6 for ; Mon, 03 Mar 2014 11:10:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=YYlj7mUAsAaAqAbI5z4eC13ZhgPY+AOG/6fi+7oB3hg=; b=MiP3wc7eoa4k+bjwZwqhG2HDseq4HnRmPRBSjpS9AtlddTkeGNYRojmF/kssgOl1ir 4p57XkIxwr5i53Ch+PO6H44DpKwEqp/QkwLcYy1t/URyjyYYeu2CoSiFqDByIX3PyRqU m8i6GGCcWOHI/dIdVqPxjVNbiSgzx/4pvykwiMfg2QNiZniBEyW0hf9j89Vid6jtVI3u Vug/iJgnpk4VfBEF1c8/Si3ZS2ZLUUaZUTc7atOKC5V7LQmaZ4gmlst9PpiaGIgbAprT W8/Oc9IBOGdg53b1vKeQ+pwIYiaw/FVjtLa8PEkBXT/+QpiaiAwVxMMD3iqOqD1g49uO 8KiQ== X-Gm-Message-State: ALoCoQkIvzjPy0GXyibqhWcU8krGhT3l1NcHiwQjg7PRdfgo2QsxBH5bnivYHRErPXAnSnVTXsPd X-Received: by 10.66.189.163 with SMTP id gj3mr549957pac.32.1393873849550; Mon, 03 Mar 2014 11:10:49 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.119 with SMTP id h110ls2354247qge.54.gmail; Mon, 03 Mar 2014 11:10:49 -0800 (PST) X-Received: by 10.52.179.198 with SMTP id di6mr705802vdc.7.1393873849272; Mon, 03 Mar 2014 11:10:49 -0800 (PST) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id tr5si3759015vdc.91.2014.03.03.11.10.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Mar 2014 11:10:49 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id jw12so1329229veb.27 for ; Mon, 03 Mar 2014 11:10:49 -0800 (PST) X-Received: by 10.58.186.132 with SMTP id fk4mr18050883vec.9.1393873849187; Mon, 03 Mar 2014 11:10:49 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.130.193 with SMTP id u1csp75260vcs; Mon, 3 Mar 2014 11:10:48 -0800 (PST) X-Received: by 10.68.249.100 with SMTP id yt4mr4699910pbc.165.1393873848187; Mon, 03 Mar 2014 11:10:48 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u5si1219749pbi.238.2014.03.03.11.10.45; Mon, 03 Mar 2014 11:10:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755470AbaCCTKe (ORCPT + 26 others); Mon, 3 Mar 2014 14:10:34 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:44538 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754388AbaCCTKc (ORCPT ); Mon, 3 Mar 2014 14:10:32 -0500 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: CC: , , , , Linux Kernel Mailing List , Darren Etheridge 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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;