From patchwork Wed May 11 18:07:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 9073801 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6EF77BF29F for ; Wed, 11 May 2016 18:07:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76E032012B for ; Wed, 11 May 2016 18:07:42 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 293DB2014A for ; Wed, 11 May 2016 18:07:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D58F6E29B; Wed, 11 May 2016 18:07:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-x241.google.com (mail-qk0-x241.google.com [IPv6:2607:f8b0:400d:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id B09556E29B for ; Wed, 11 May 2016 18:07:38 +0000 (UTC) Received: by mail-qk0-x241.google.com with SMTP id l68so3625663qkf.3 for ; Wed, 11 May 2016 11:07:38 -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-transfer-encoding; bh=lBwIqyZDVPkiObSg1T5knJdVjqT7PcTYkoBthE0P7S0=; b=Lssy3uJq40vSOCfb8m+Ex9zWXpKBwiIRpu3z6uXkTbGu4Vr/YerIyMHwXPXQQiX74m gU4+0WEWMN2nNzIebtONFdTUBW6kFB2+sC8KwlJhUpuq8v4iKDaPHq+vkLYwfDMvfY/+ FgPkQj6epM+M+C6AhIWntgmfvD1byQ+wjJ719zVTO/ESSsVxLgWNgNNGCWKlCHFJyYwZ 5bq+uUwPk++4xfbzZoqih9PAfPnsWnIxiFJ6qWqY5j1UvKBI819JrkgH5Q1/qHRLZicN tPs7/5fmBRxiYN6JEX8MErEk0x5IUFVUF6t3/8lk45WMgJTfkNrX36tWZZFwraH3TQ+0 bBHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lBwIqyZDVPkiObSg1T5knJdVjqT7PcTYkoBthE0P7S0=; b=W/DN+KhCL1jCSQWvW4or+T/EJlEect0iKeqGOzqZ6GUkteXgw34H8z9w2wCAiB/1q1 Va4B2zDz320eggYet1uPzCZNOG63TOSlBs24x72baAlJEqcsnj0MQoFCJDF+54f7I47m LTgC++R7lzsP8lOHJJjBc6vz7ojmCJq1aFwZns5ncsQ0wHmBpIT1jNOEjUHuADzm6DuQ ObInKFxbINNH50VWkZaLjhO//rNAP/6+Zzvv/3ZojW6KN3/MBUOrdvLBaNchP5qOfdIT HKJZv2sNoqpPGqmhocjUWkkVcjWPwfsOlihP4Fwyr4/9JRZKT7yl0uYFJ60YGC2S/Q0K G+Lg== X-Gm-Message-State: AOPr4FUzRRwLJ9Pidw4TjBB3oTkL+c1fqQyuqueOwJlHuW571bxtQZaiBcaMjZKR2nYRMA== X-Received: by 10.55.94.7 with SMTP id s7mr5191708qkb.181.1462990057810; Wed, 11 May 2016 11:07:37 -0700 (PDT) Received: from cm.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by smtp.gmail.com with ESMTPSA id v5sm3995422qhv.21.2016.05.11.11.07.37 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 May 2016 11:07:37 -0700 (PDT) From: Alex Deucher X-Google-Original-From: Alex Deucher To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: fix TC cache flushing Date: Wed, 11 May 2016 14:07:29 -0400 Message-Id: <1462990050-13825-1-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 2.5.5 MIME-Version: 1.0 Cc: Alex Deucher , =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 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=-5.5 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: Marek Olšák TC_WB_ACTION must be set according to the docs Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +++- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 1dab5f2..0dee008 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -50,9 +50,11 @@ * KMS wrapper. * - 3.0.0 - initial driver * - 3.1.0 - allow reading more status registers (GRBM, SRBM, SDMA, CP) + * - 3.2.0 - GFX8: Uses EOP_TC_WB_ACTION_EN, so UMDs don't have to do the same + * at the end of IBs. */ #define KMS_DRIVER_MAJOR 3 -#define KMS_DRIVER_MINOR 1 +#define KMS_DRIVER_MINOR 2 #define KMS_DRIVER_PATCHLEVEL 0 int amdgpu_vram_limit = 0; diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 92647fb..ef192aa 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -5725,6 +5725,7 @@ static void gfx_v8_0_ring_emit_fence_gfx(struct amdgpu_ring *ring, u64 addr, amdgpu_ring_write(ring, PACKET3(PACKET3_EVENT_WRITE_EOP, 4)); amdgpu_ring_write(ring, (EOP_TCL1_ACTION_EN | EOP_TC_ACTION_EN | + EOP_TC_WB_ACTION_EN | EVENT_TYPE(CACHE_FLUSH_AND_INV_TS_EVENT) | EVENT_INDEX(5))); amdgpu_ring_write(ring, addr & 0xfffffffc);