From patchwork Wed Aug 24 20:00:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Glisse X-Patchwork-Id: 1094132 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7OK0EWE009268 for ; Wed, 24 Aug 2011 20:00:37 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8458FA09E0 for ; Wed, 24 Aug 2011 13:00:13 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177]) by gabe.freedesktop.org (Postfix) with ESMTP id B50099F706 for ; Wed, 24 Aug 2011 13:00:00 -0700 (PDT) Received: by yxk8 with SMTP id 8so1399637yxk.36 for ; Wed, 24 Aug 2011 13:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=AGLn0tsVyKiVcBXNw85vytnP0owLr4OR7F5o+7h8O0o=; b=b6CAjseK14diVxNhQttoVlVPM/LfUyNYxrf+r6jLYzfv2iep2/4fkoBI6zLdkV9lZQ 6o+ceratCLzMQXI89Ci3+M++Cm0RwkCufTeKFn//dR4gjXEVDqoeu0RrOnnFHE/UIlIJ 06AP+za8DyDaql/y56ROla/PgQHAlBJHekOSI= Received: by 10.52.71.103 with SMTP id t7mr5795058vdu.151.1314216000096; Wed, 24 Aug 2011 13:00:00 -0700 (PDT) Received: from homer.boston.devel.redhat.com (nat-pool-rdu.redhat.com [66.187.233.202]) by mx.google.com with ESMTPS id n5sm572236vcw.8.2011.08.24.12.59.58 (version=SSLv3 cipher=OTHER); Wed, 24 Aug 2011 12:59:59 -0700 (PDT) From: j.glisse@gmail.com To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/radeon/kms: evergreen & ni reset SPI block on CP resume Date: Wed, 24 Aug 2011 16:00:17 -0400 Message-Id: <1314216017-4730-1-git-send-email-j.glisse@gmail.com> X-Mailer: git-send-email 1.7.1 Cc: Jerome Glisse X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 24 Aug 2011 20:00:37 +0000 (UTC) From: Jerome Glisse For some reason SPI block is in broken state after module unloading. This lead to broken rendering after reloading module. Fix this by reseting SPI block in CP resume function Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/evergreen.c | 1 + drivers/gpu/drm/radeon/ni.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index fb5fa08..d8d71a3 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -1357,6 +1357,7 @@ int evergreen_cp_resume(struct radeon_device *rdev) SOFT_RESET_PA | SOFT_RESET_SH | SOFT_RESET_VGT | + SOFT_RESET_SPI | SOFT_RESET_SX)); RREG32(GRBM_SOFT_RESET); mdelay(15); diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 44c4750..a2e00fa 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -1159,6 +1159,7 @@ int cayman_cp_resume(struct radeon_device *rdev) SOFT_RESET_PA | SOFT_RESET_SH | SOFT_RESET_VGT | + SOFT_RESET_SPI | SOFT_RESET_SX)); RREG32(GRBM_SOFT_RESET); mdelay(15);