From patchwork Fri Aug 1 18:05:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Boll X-Patchwork-Id: 4664061 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 30482C0338 for ; Fri, 1 Aug 2014 18:06:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A40732021A for ; Fri, 1 Aug 2014 18:06:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 18A43201C8 for ; Fri, 1 Aug 2014 18:06:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D6F489DC9; Fri, 1 Aug 2014 11:06:05 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 16AF089DC9 for ; Fri, 1 Aug 2014 11:06:03 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id w62so4646142wes.22 for ; Fri, 01 Aug 2014 11:06:03 -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:mime-version:content-type :content-transfer-encoding; bh=dNiEZl+0uDjyj1Jq2lj2Nrf6wrXAxfwM3213tsLNcRo=; b=Vu86vanCXx/LSUz/T+j39TV0icifMGT/rjUztHFgEp0YFyKWRF1Qifzdndsp8PRH+O yAgTjL0bfwKPCkNPCjUSi2H6WFhtWlVHJ80AeYo3TjptGgKMSKH+MYZkj1lO/LwUVrA+ XIoounof0x1RPm88HmKKjocOhOlh2/nV+H7me2lupvYaT6CS89mdMhbFYe+isj+FK+va 9udx19ANp5nvlBaSFLmKMsSsYItprHP7MuwbLqsNGHAGhFfQmw+Lvugsx2aGCFRj3IG7 4EJAw0tOXWg4lKkOONYgMMyWNmQX/uhauWsyRvbM21hma8MD2Asp0uZtu9xwBV3p+gz6 KUrA== X-Received: by 10.194.188.46 with SMTP id fx14mr10152351wjc.112.1406916362967; Fri, 01 Aug 2014 11:06:02 -0700 (PDT) Received: from debian.tuwien.ac.at (p237-175.vps.tuwien.ac.at. [128.131.237.175]) by mx.google.com with ESMTPSA id gq4sm10894574wib.8.2014.08.01.11.06.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Aug 2014 11:06:01 -0700 (PDT) From: Andreas Boll To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/4] drm/radeon: use packet2 for nop on hawaii with old firmware Date: Fri, 1 Aug 2014 20:05:29 +0200 Message-Id: <1406916332-4195-1-git-send-email-andreas.boll.dev@gmail.com> X-Mailer: git-send-email 2.0.1 MIME-Version: 1.0 Cc: Alex Deucher , stable@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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: Alex Deucher Older firmware didn't support the new nop packet. v2 (Andreas Boll): - Drop usage of packet3 for new firmware Signed-off-by: Alex Deucher Reviewed-by: Christian König (v1) Signed-off-by: Andreas Boll Cc: stable@vger.kernel.org --- drivers/gpu/drm/radeon/cik.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index c0ea661..e5985d5 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c @@ -7900,6 +7900,7 @@ restart_ih: static int cik_startup(struct radeon_device *rdev) { struct radeon_ring *ring; + u32 nop; int r; /* enable pcie gen2/3 link */ @@ -8033,9 +8034,15 @@ static int cik_startup(struct radeon_device *rdev) } cik_irq_set(rdev); + if (rdev->family == CHIP_HAWAII) { + nop = RADEON_CP_PACKET2; + } else { + nop = PACKET3(PACKET3_NOP, 0x3FFF); + } + ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX]; r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP_RPTR_OFFSET, - PACKET3(PACKET3_NOP, 0x3FFF)); + nop); if (r) return r; @@ -8043,7 +8050,7 @@ static int cik_startup(struct radeon_device *rdev) /* type-2 packets are deprecated on MEC, use type-3 instead */ ring = &rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX]; r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP1_RPTR_OFFSET, - PACKET3(PACKET3_NOP, 0x3FFF)); + nop); if (r) return r; ring->me = 1; /* first MEC */ @@ -8054,7 +8061,7 @@ static int cik_startup(struct radeon_device *rdev) /* type-2 packets are deprecated on MEC, use type-3 instead */ ring = &rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX]; r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP2_RPTR_OFFSET, - PACKET3(PACKET3_NOP, 0x3FFF)); + nop); if (r) return r; /* dGPU only have 1 MEC */