From patchwork Sun Sep 25 20:34:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 9349915 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 05C24607F0 for ; Sun, 25 Sep 2016 20:35:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECF6D28C7A for ; Sun, 25 Sep 2016 20:35:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E16952885B; Sun, 25 Sep 2016 20:35:03 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AF1FA2885B for ; Sun, 25 Sep 2016 20:35:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FD176E266; Sun, 25 Sep 2016 20:35:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7ED916E264; Sun, 25 Sep 2016 20:34:59 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id 133so11201063wmq.2; Sun, 25 Sep 2016 13:34:59 -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=E0kqZR236j0E1xdhTDwR2yzhclp0Kx8CM8LyvNqoK9E=; b=OF0mhVoHUC7B6vCEUb4i5CaGjWWC/xdL/5qDQmGvx/Wpr9G/zP7GkTKahATrnoRm3U bMWKZIBzPvQnMp884br4TO28miyHKqla6WP7QuaLuY3cgHDICAirQZBk0PA5t9+tj2W8 iEzJYbTR0d4Cxcagz9kNWGlJPaD1oKMVetBRTU/EmDHuIxQdEkEvxxekebonW4YnNQXD 4boe/Dml0RDF6fg5lALA1YilIFsZMm3FCLL+6AsDCfXKmMo2OxGHm33yGiihXVFgmEQV ftgzoU2pqRH1FZiXwqzMQA3UvVtX+0nFsNNzftehYOctA9XHMKRV87iZuiveXkZ4x4vf P54w== 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; bh=E0kqZR236j0E1xdhTDwR2yzhclp0Kx8CM8LyvNqoK9E=; b=CdOWyrggsoFRQVJv3cZdparGoOe1fF29UZjg0PLWtytKBVRnkDyVayNC3VaREdvXUc nAlkikSdSeoDorjH8FzECh9eKpOtXwBXB0I38S+LLCu8wtR8S0NmubwzTetT/Bx4TPv9 5QS/G/PbF3JUsu0ssT3+ODxKX1/YhH9ciw8ue06DRgjrcm9rZviIPUCSajYRPhWj/I8W HNYN/q8PEdtzMs22rDReaWi5Dj1NvvCx0GpFofJClZWxmHP/W7jfxLfSlmV6u+D1xPCt RwuFaQqqXGhRkgyaM99WIZeJKe81C8KfgQlMExWO7yG3YrmQvGnncKkBV7ZDWZ+cD8xu GvAg== X-Gm-Message-State: AA6/9Rk5h4tBzEksyfk6ZqruQ41rKmWfnRBUTQz5mkzB5lkG7Ii5xkVzW/6mz7H+blO2ag== X-Received: by 10.28.131.199 with SMTP id f190mr12873234wmd.30.1474835698015; Sun, 25 Sep 2016 13:34:58 -0700 (PDT) Received: from localhost.localdomain ([5.20.238.37]) by smtp.gmail.com with ESMTPSA id a1sm18673649wju.41.2016.09.25.13.34.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Sep 2016 13:34:57 -0700 (PDT) From: Grazvydas Ignotas To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: clear ring pointer in amdgpu_device on teardown Date: Sun, 25 Sep 2016 23:34:47 +0300 Message-Id: <1474835690-2621-2-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 2.7.4 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is in symmetry to setup done in amdgpu_ring_init. Signed-off-by: Grazvydas Ignotas --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index 777f11b..e1fa873 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c @@ -264,6 +264,8 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring) (void **)&ring->ring); amdgpu_debugfs_ring_fini(ring); + + ring->adev->rings[ring->idx] = NULL; } /*