From patchwork Wed Jun 1 22:27:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 9148587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CD6E760751 for ; Wed, 1 Jun 2016 22:28:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0430265F9 for ; Wed, 1 Jun 2016 22:28:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4D872714C; Wed, 1 Jun 2016 22:28:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 322D5265F9 for ; Wed, 1 Jun 2016 22:28:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D0D86E2A1; Wed, 1 Jun 2016 22:28:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5122C6E299 for ; Wed, 1 Jun 2016 22:28:08 +0000 (UTC) Received: by mail-it0-x244.google.com with SMTP id v125so609223itc.0 for ; Wed, 01 Jun 2016 15:28:08 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=VvqeOZKm0pqTeF9gp7IBDJgS9YgUUHl21BRAz9kIPFo=; b=nNaGtLV8kK4gYV+kYntSADobf3XMCEj/hp78Ov+3ozrA7k1zSCsVMEci0AaFinkwah nG4xZXWziFe9ZBmtjQVdjV4Um6brWvw6M/fc+OZvkqe+8cXUEw0PUNAXgd+cQs9VnzjL 3MW2Fj+ndExe9Bz2cHHpL2MLmDf8S9bV9wfFs/QAQzt1A78wuWRyBNTP1pm5EdrgHGJm a0ZarC8P+2o4dlgRXw+vOGo5TuOsLeRri7LAxC/EnAOEOk56lmHG6ehcGqN3/qHv22Go S5TaCtxf4KqSfXa9wPfGUJwboo6w9VA9ORZh43sjGfKDzizzRGUCjvvLxvgqzUJv6ICN q0bA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=VvqeOZKm0pqTeF9gp7IBDJgS9YgUUHl21BRAz9kIPFo=; b=ar4dkPIWReLzKzh59E2gotdLFd/cB+XpkdL3HAV/nAjRSQryO6c8HvB4mBoesUbZTd 3bwFRcqgI3bE1nDpDltNylYc5HHBKW3CMGlrU91Aye338j7w2jygo8hOkzNTfBFKkCM9 rnW7sXc98EGPvZok+sDhza6qUUhjvjWXynjufn13J0s2GMYlUJ3FICwA0oQCxXO11DgO cge1J6s33FWwyFSWqyTZQ6VfTxmlDB9rsKCA/G6N7dhfEqAnLIYkg4H6XhCK2T0Yn/EW 3zyCGkS123wkPgbtVAunyZo8BzzT5BvWI7/kM/PCLGH+gQ/9Lze75qN9TMBrFFSYdhbd vjmA== X-Gm-Message-State: ALyK8tLcyxZ+oAe4/2PcolE0o0zBHa5I5HaRFfIkDw3Vtpn3XWR15RrlhwKUdPx5lTG7OQ== X-Received: by 10.36.184.130 with SMTP id m124mr287984ite.95.1464820087374; Wed, 01 Jun 2016 15:28:07 -0700 (PDT) Received: from cm.amd.com ([165.204.55.251]) by smtp.gmail.com with ESMTPSA id e191sm9302113ioe.27.2016.06.01.15.28.06 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2016 15:28:06 -0700 (PDT) From: Alex Deucher X-Google-Original-From: Alex Deucher To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/4] drm/amdgpu: clear RB at ring init Date: Wed, 1 Jun 2016 18:27:55 -0400 Message-Id: <1464820078-18115-2-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464820078-18115-1-git-send-email-alexander.deucher@amd.com> References: <1464820078-18115-1-git-send-email-alexander.deucher@amd.com> MIME-Version: 1.0 Cc: Alex Deucher , Monk Liu 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-Virus-Scanned: ClamAV using ClamSMTP From: Monk Liu This help fix reloading driver hang issue of SDMA ring. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index 3b02272..a4b3f44 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c @@ -310,6 +310,9 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring, } r = amdgpu_bo_kmap(ring->ring_obj, (void **)&ring->ring); + + memset((void *)ring->ring, 0, ring->ring_size); + amdgpu_bo_unreserve(ring->ring_obj); if (r) { dev_err(adev->dev, "(%d) ring map failed\n", r);