From patchwork Sun Sep 25 20:34:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 9349921 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 7E519607F0 for ; Sun, 25 Sep 2016 20:35:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 713DC2885B for ; Sun, 25 Sep 2016 20:35:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6596628C7B; Sun, 25 Sep 2016 20:35:14 +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 264CC2885B for ; Sun, 25 Sep 2016 20:35:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A63B86E270; Sun, 25 Sep 2016 20:35:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8F1DB6E266; Sun, 25 Sep 2016 20:35:00 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id l132so11177688wmf.1; Sun, 25 Sep 2016 13:35:00 -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=cqlmHhTF8Ps+PZYPICIokC7qRHHnnOBg+87VbrtZvXo=; b=vDWIIM46dlIXxXf70Q4hzr8gPVE0cyg8PoN/3P/97MRfykFKdqbiXSqwQgkT/g58ig i69OzGnljkXcObgAYKVI6quNSecgmQEmnK9rSI1FNr7x0i+96BCOL71FEWw1IH+H/Ta/ vdjutNNOC+YzyjhYNu/PdzwXH6S6i7DK3EkiynAPTv8rlDRl4spPerSUDdVgq09XVjYj 7BkaiIor2zy5vOPtOVEI08TKB9J1GQPBmU/DWOsk5Y9gnZ7EOMALA/PCBpxXNeWeDqcK Usj52IjUq0Qh5qJtv7Nxi0Ykf1U9K9hDLcGZkNGUNPLQXjhNPhzDuZgGnWMyT8B+AsZU hDNw== 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=cqlmHhTF8Ps+PZYPICIokC7qRHHnnOBg+87VbrtZvXo=; b=YAJg3DGvCf+tjsa0w6nOn0twudEU6Ozn4yKLBLnSHYd+dQSoGTELMYXFb4V35cLI0S wN4fftiuC2joxjGy2daj4+0j80QOTpUmtMNmPlRgB6/pdaNb0X+hjm8OfnwoNlQIxTgb 84sdiBu0syC30KjuwFCeMepy/G6SXVDZhZFmykvDQDBYw1jmud3bxGCZou02uWvJoyv0 H1CRuXA8D8FS32/YQnfJa6z+ZsdcJ+c3Nr/SUevkostzSO3v0sIVX4e4rZzzrzrfnPw5 jjB07p8TEvHyDv0j9VlvYNzG+DkjiSUw6fVPVJv0eLqneIG5ewg0sPorJKkqXdec/uvQ sdww== X-Gm-Message-State: AA6/9RkZv3GOXBDpNo6Xe+/HX0UhgF5btnqsgvPkS7b+74w+dlMof7wb95gIlTxMmdSEhA== X-Received: by 10.28.49.214 with SMTP id x205mr10676343wmx.130.1474835699052; Sun, 25 Sep 2016 13:34:59 -0700 (PDT) Received: from localhost.localdomain ([5.20.238.37]) by smtp.gmail.com with ESMTPSA id a1sm18673649wju.41.2016.09.25.13.34.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Sep 2016 13:34:58 -0700 (PDT) From: Grazvydas Ignotas To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: disable CRTCs before teardown Date: Sun, 25 Sep 2016 23:34:48 +0300 Message-Id: <1474835690-2621-3-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 Some code called by drm_crtc_force_disable_all() wants to wait for all fences, so only do fence teardown after CRTCs are disabled. Signed-off-by: Grazvydas Ignotas --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 99a15ca..1a1bc79 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1822,11 +1822,11 @@ void amdgpu_device_fini(struct amdgpu_device *adev) DRM_INFO("amdgpu: finishing device.\n"); adev->shutdown = true; + drm_crtc_force_disable_all(adev->ddev); /* evict vram memory */ amdgpu_bo_evict_vram(adev); amdgpu_ib_pool_fini(adev); amdgpu_fence_driver_fini(adev); - drm_crtc_force_disable_all(adev->ddev); amdgpu_fbdev_fini(adev); r = amdgpu_fini(adev); kfree(adev->ip_block_status);