From patchwork Tue Apr 16 16:26:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 2449921 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 194A63FD8C for ; Tue, 16 Apr 2013 16:26:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E7699E64A6 for ; Tue, 16 Apr 2013 09:26:52 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qe0-f51.google.com (mail-qe0-f51.google.com [209.85.128.51]) by gabe.freedesktop.org (Postfix) with ESMTP id 9AA70E6367 for ; Tue, 16 Apr 2013 09:26:17 -0700 (PDT) Received: by mail-qe0-f51.google.com with SMTP id 1so373191qec.10 for ; Tue, 16 Apr 2013 09:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=LQBW3j8Py5SKkmeTM20vbfs20jIkHN/RYKaogDSOfTE=; b=GHyJEmne3Ex0kzldQGfCMzlunO3NiwfsgfuRmLs6Xjke8ZQ3fmLjdbftNjTPoJXZYP FRkdGmeQMNX/0V60qbh7Z8BjXiQYQhUbuSb2ikQN1sv4iTUZUoZzDl0H4jDRk4plxv8f wpAMEqAvi933PbNiEryBJRuXFGaaVwog93xDWgF6qzfpXF7+7AP2h5rUhAo5dRIFlhV1 o6arhIr1BMwCI21sbcYpBVne2kKVz2PcQ0LTREQGZQxovY6JqlXZrullct4VZAdiF8ot 7SEt81eIDuhAFOGISiP+XfGXvkWdKnrUcZYjVek9wbPSnx27vMbuKsemw9LLYb+FAG0z AMpA== X-Received: by 10.49.94.71 with SMTP id da7mr3597582qeb.29.1366129577015; Tue, 16 Apr 2013 09:26:17 -0700 (PDT) Received: from localhost.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by mx.google.com with ESMTPS id z2sm4123179qad.4.2013.04.16.09.26.16 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 16 Apr 2013 09:26:16 -0700 (PDT) From: alexdeucher@gmail.com To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/radeon: Always flush the VM Date: Tue, 16 Apr 2013 12:26:09 -0400 Message-Id: <1366129569-8059-1-git-send-email-alexdeucher@gmail.com> X-Mailer: git-send-email 1.7.7.5 Cc: Alex Deucher , Jerome Glisse , stable@vger.kernel.org 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: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Jerome Glisse This is slightly cleaned up version of Jerome's patch. There seems to be an issue tracking the last flush of the VM which results in hangs in certain cases when VM is used. For now just flush the VM for every IB. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=62959 https://bugs.freedesktop.org/show_bug.cgi?id=62997 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Christian König --- drivers/gpu/drm/radeon/radeon_ring.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index 31e47d8..e17faa7 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c @@ -180,7 +180,8 @@ int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib, radeon_semaphore_free(rdev, &ib->semaphore, NULL); } /* if we can't remember our last VM flush then flush now! */ - if (ib->vm && !ib->vm->last_flush) { + /* XXX figure out why we have to flush for every IB */ + if (ib->vm /*&& !ib->vm->last_flush*/) { radeon_ring_vm_flush(rdev, ib->ring, ib->vm); } if (const_ib) {