From patchwork Wed Mar 4 21:10:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Vesely X-Patchwork-Id: 5940421 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F407C9F380 for ; Wed, 4 Mar 2015 21:10:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 31BCE202F8 for ; Wed, 4 Mar 2015 21:10:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 013662034F for ; Wed, 4 Mar 2015 21:10:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AE79D6E2D7; Wed, 4 Mar 2015 13:10:07 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f44.google.com (mail-qg0-f44.google.com [209.85.192.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 946E46E6CB for ; Wed, 4 Mar 2015 13:10:05 -0800 (PST) Received: by qgdz60 with SMTP id z60so1971165qgd.5 for ; Wed, 04 Mar 2015 13:10:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id; bh=VTYozUi/QUz2qAymhjLtGUOx51Qzy6ddXaYk9ja5E1E=; b=O9t9bBF0L6k6UuQe+C4Jciaf6vdITrpNoXSOBwSFWQn61Co9rJwoWvXwHNu73HltYI KE5r2Np/FGEs7S5/RGXTBucRF1wvz924lLLgz1wUMiVQt5y/wBLa9br1rIyoISgt9Kpy SSmIO+lwOKeSSEXITdRc0+WNRzXrgy6ig14zbhaFu4ynfqnFo2VC5CaUTmuAeXKSyrVV ic6T+odWjHy88+PjPUD8iodLRUasbGrbAqNAi10SSHvvXVdUDyMgf7TaydNwhKzt5PA6 EE6+tYFAjm2SXn89XZJeywy8iKusDP1hAPnwQgOCwLePhlhLOIeMOcslaDEwXpC2px2Z hoGQ== X-Gm-Message-State: ALoCoQkhEXzdmhpn6p0Cz9CWOD4DyDViUdlDbz+iC8T8PzSGF/Sn1ib3rg54ebJe8fYKqPQiIbkk X-Received: by 10.55.54.15 with SMTP id d15mr10873973qka.66.1425503404979; Wed, 04 Mar 2015 13:10:04 -0800 (PST) Received: from adriatix.rutgers.edu ([198.151.130.130]) by mx.google.com with ESMTPSA id q5sm2848064qat.6.2015.03.04.13.10.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 13:10:04 -0800 (PST) From: Jan Vesely To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Michel Danzer Subject: [PATCH 1/1] drm/radeon: Fix cleanup error path. Date: Wed, 4 Mar 2015 16:10:03 -0500 Message-Id: <1425503403-5277-1-git-send-email-jan.vesely@rutgers.edu> X-Mailer: git-send-email 2.1.0 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, 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 cleanup: target is called before fence_get Fixes hangs on GPU reset on Turks GPU. regression introduced by: commit dd7cfd641228abb2669d8d047d5ec377b1835900 Author: Maarten Lankhorst Date: Tue Jan 21 13:07:31 2014 +0100 drm/ttm: kill fence_lock No users are left, kill it off! :D Conversion to the reservation api is next on the list, after that the functionality can be restored with rcu. Signed-off-by: Maarten Lankhorst CC: stable@vger.kernel.org Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94081 Signed-off-by: Jan Vesely --- drivers/gpu/drm/radeon/radeon_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index 00ead8c..89a8c48 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -573,6 +573,7 @@ vblank_cleanup: drm_vblank_put(crtc->dev, radeon_crtc->crtc_id); pflip_cleanup: + fence_put(work->fence); if (unlikely(radeon_bo_reserve(new_rbo, false) != 0)) { DRM_ERROR("failed to reserve new rbo in error path\n"); goto cleanup; @@ -584,7 +585,6 @@ pflip_cleanup: cleanup: drm_gem_object_unreference_unlocked(&work->old_rbo->gem_base); - fence_put(work->fence); kfree(work); return r; }