From patchwork Tue Nov 5 13:09:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 3141331 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 591E29F407 for ; Tue, 5 Nov 2013 13:09:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 017F4205F5 for ; Tue, 5 Nov 2013 13:09:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7617B205EF for ; Tue, 5 Nov 2013 13:09:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 998E5EFB0F; Tue, 5 Nov 2013 05:09:15 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from pegasos-out.vodafone.de (pegasos-out.vodafone.de [80.84.1.38]) by gabe.freedesktop.org (Postfix) with ESMTP id 62C9CEFC85 for ; Tue, 5 Nov 2013 05:09:09 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by pegasos-out.vodafone.de (Rohrpostix1 Daemon) with ESMTP id 085DD2602D3; Tue, 5 Nov 2013 14:09:08 +0100 (CET) X-Virus-Scanned: amavisd-new at vodafone.de Received: from pegasos-out.vodafone.de ([127.0.0.1]) by localhost (rohrpostix1.prod.vfnet.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F1MewBnZC4zv; Tue, 5 Nov 2013 14:09:07 +0100 (CET) Received: from smtp-03.vodafone.de (xsmail-dmz7.prod.vfnet.de [10.215.254.38]) by pegasos-out.vodafone.de (Rohrpostix1 Daemon) with ESMTP id B165E260043; Tue, 5 Nov 2013 14:09:07 +0100 (CET) X-DKIM: OpenDKIM Filter v2.0.2 smtp-03.vodafone.de 930E9E9C4F X-Virus-Scanned: amavisd-new at vodafone.de Received: from smtp-03.vodafone.de ([127.0.0.1]) by localhost (xsmail-dmz7.prod.vfnet.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tcOGdmjB2BYo; Tue, 5 Nov 2013 14:09:05 +0100 (CET) Received: from [192.168.137.27] (aftr-37-24-150-251.unity-media.net [37.24.150.251]) by smtp-03.vodafone.de (Postfix) with ESMTPSA id DD10EE9C43; Tue, 5 Nov 2013 14:09:04 +0100 (CET) Message-ID: <5278EDF0.2000503@vodafone.de> Date: Tue, 05 Nov 2013 14:09:04 +0100 From: =?UTF-8?B?Q2hyaXN0aWFuIEvDtm5pZw==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Subject: Re: [PATCH 1/5] drm/radeon: rework and fix reset detection v2 References: <1383074091-2524-1-git-send-email-deathsimple@vodafone.de> In-Reply-To: Cc: dri-devel X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Am 03.11.2013 13:15, schrieb Rafa? Mi?ecki: > 2013/10/29 Christian König : >> From: Christian König >> >> Stop fiddling with jiffies, always wait for RADEON_FENCE_JIFFIES_TIMEOUT. >> Consolidate the two wait sequence implementations into just one function. >> Activate all waiters and remember if the reset was already done instead of >> trying to reset from only one thread. > With this patch I can't suspend my Samsung with: > 01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] > nee ATI Blackcomb [Radeon HD 6900M series] [1002:6720] > anymore. > > The backlight goes off, activity LED goes off and then nothing. > Machine is still running and other lights (power, wifi, keyboard, > touchpad) are still working. Seems like a lockup to me. Does the attached patch help? Cheers, Christian. From ae595cb2728002781c952b43bdab471be2466428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Mon, 4 Nov 2013 16:50:51 +0100 Subject: [PATCH] drm/radeon: fix radeon_fence_wait_empty_locked MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't block forever if there is nothing to wait for. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_fence.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c index b8f68b2..281d14c 100644 --- a/drivers/gpu/drm/radeon/radeon_fence.c +++ b/drivers/gpu/drm/radeon/radeon_fence.c @@ -510,6 +510,9 @@ int radeon_fence_wait_empty_locked(struct radeon_device *rdev, int ring) int r; seq[ring] = rdev->fence_drv[ring].sync_seq[ring]; + if (!seq[ring]) + return 0; + r = radeon_fence_wait_seq(rdev, seq, false, false); if (r) { if (r == -EDEADLK) -- 1.8.1.2