From patchwork Wed Apr 10 17:49:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrik Jakobsson X-Patchwork-Id: 2422671 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id BD4F6DF2E5 for ; Wed, 10 Apr 2013 18:01:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8162AE6491 for ; Wed, 10 Apr 2013 11:01:40 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) by gabe.freedesktop.org (Postfix) with ESMTP id CDA8CE6442 for ; Wed, 10 Apr 2013 10:51:03 -0700 (PDT) Received: by mail-lb0-f180.google.com with SMTP id t11so795860lbi.25 for ; Wed, 10 Apr 2013 10:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=irv3NMlanzS9Zn0rYiFYuqjS50Em1rMnWONwJI7FAvI=; b=XAYbkhnX+e0teJi9GZufRfTKyEAzr1AdKRF/dvFpeSLO5OPbEYIG2Wr3ot59NgKec7 nxgeYyH8lcQ0TMTRdngB+wXLvqm1BXaCaQn8rYFg5k+cdESs/Nr+fdz56uMSzoMkB3dA gKo7pESdJNfcD2qRL7K1a+U26oodzakMqK9AdU0IXD/QhuugxAowBQY7krR4Vhx5y0vm Z81WsVygVg9iusBQvl/yEd3mpAmtc3qjUioYo5L44GJGRtHWhN+kZ6S7phuTTMLU7zx4 hMxrnqflxu/QYAZpFkHp+4lgc+sSttYMDA7EWt0iTyhDzq+61bQX5KZDaOLUuiv4FSCm 3Feg== X-Received: by 10.112.155.131 with SMTP id vw3mr1695679lbb.64.1365616262999; Wed, 10 Apr 2013 10:51:02 -0700 (PDT) Received: from patrik-desktop.lan (h138n8-oer-a32.ias.bredband.telia.com. [2.248.103.138]) by mx.google.com with ESMTPS id iq6sm309626lab.10.2013.04.10.10.51.01 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 10:51:02 -0700 (PDT) From: Patrik Jakobsson To: dri-devel@lists.freedesktop.org Subject: [PATCH 12/15] drm/gma500: Activate the gtt rebuild on suspend/resume Date: Wed, 10 Apr 2013 19:49:57 +0200 Message-Id: <1365616200-26312-13-git-send-email-patrik.r.jakobsson@gmail.com> X-Mailer: git-send-email 1.7.10.4 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: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org This patch activates the rebuilding of the gtt. Currently we reinitialize the gtt by inserting the stolen pages again and map the rest to our scratch page. Then we go about restoring the needed ranges. This is a bit overkill but right now we don't have that much to restore so better safe than sorry. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/power.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c index 889b854..4c575a9 100644 --- a/drivers/gpu/drm/gma500/power.c +++ b/drivers/gpu/drm/gma500/power.c @@ -110,6 +110,8 @@ static void gma_resume_display(struct pci_dev *pdev) PSB_WVDC32(dev_priv->pge_ctl | _PSB_PGETBL_ENABLED, PSB_PGETBL_CTL); pci_write_config_word(pdev, PSB_GMCH_CTRL, dev_priv->gmch_ctrl | _PSB_GMCH_ENABLED); + + psb_gtt_restore(dev); /* Rebuild our GTT mappings */ dev_priv->ops->restore_regs(dev); }