From patchwork Wed Mar 12 20:22:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 3820831 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 8DB2DBF540 for ; Wed, 12 Mar 2014 20:22:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B26E1202FE for ; Wed, 12 Mar 2014 20:22:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E789F202F0 for ; Wed, 12 Mar 2014 20:22:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A2F52F9EB5; Wed, 12 Mar 2014 13:22:32 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f50.google.com (mail-qg0-f50.google.com [209.85.192.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 7190BF9EB5 for ; Wed, 12 Mar 2014 13:22:31 -0700 (PDT) Received: by mail-qg0-f50.google.com with SMTP id q108so99638qgd.9 for ; Wed, 12 Mar 2014 13:22:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=GY3DaOEDbsjpyUPIHKlsfWdTx+j3O28CSjvVjUqSEDU=; b=kv3KmZ5QmLsL5kHIxerDtBkFbJBcWXF58HBVgkPSZ3cNsmw6Ew0BWQaEcoJ8O+PC/r NwiKi+DdPw0OIj2YHwLaYhVzEKtTGXHX67O/wUKvgzT54Ubp+Z086FHGhqutZah5jKei uY0ujvu6BuOX+5wuFJnU6xhz5yz9eaIg0G4hYqWwqzIF03ZgVeSdCgXykiX0EaJCLehW D/jpRlAbuBN53GKfGMzoYnKUMNLK32QUxY+bmA6owf0kre0cgcqCFhsdRgLjS2XGloPJ yd943AcO9e4kh2z8jKdDlCz4S9sYPcWKgtSpMPPT8NPtkIzWtUWDSwCRveGxgPUqZHy9 y7XA== X-Received: by 10.229.66.202 with SMTP id o10mr51344003qci.7.1394655751042; Wed, 12 Mar 2014 13:22:31 -0700 (PDT) Received: from localhost.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by mx.google.com with ESMTPSA id z8sm81335786qaw.17.2014.03.12.13.22.30 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Wed, 12 Mar 2014 13:22:30 -0700 (PDT) From: Alex Deucher To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/radeon/cik: properly set compute ring status on disable Date: Wed, 12 Mar 2014 16:22:24 -0400 Message-Id: <1394655744-27127-1-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 1.8.3.1 Cc: Alex Deucher , stable@vger.kernel.org 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@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 When we disable the rings, set the status properly. If not other code pathes may try and use the rings which are not functional at this point. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org --- drivers/gpu/drm/radeon/cik.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index e22be84..bbb1784 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c @@ -4134,8 +4134,11 @@ static void cik_cp_compute_enable(struct radeon_device *rdev, bool enable) { if (enable) WREG32(CP_MEC_CNTL, 0); - else + else { WREG32(CP_MEC_CNTL, (MEC_ME1_HALT | MEC_ME2_HALT)); + rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX].ready = false; + rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX].ready = false; + } udelay(50); }