From patchwork Wed Nov 28 11:25:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 1815711 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 C8FAB3FC54 for ; Wed, 28 Nov 2012 11:27:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD9D3E63A1 for ; Wed, 28 Nov 2012 03:27:55 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id BD1A4E637F for ; Wed, 28 Nov 2012 03:26:22 -0800 (PST) Received: by mail-we0-f177.google.com with SMTP id x48so4807675wey.36 for ; Wed, 28 Nov 2012 03:26:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=5lYtt/z3MOLuCQtVTyio7pdyLa+ftHVVwVA7VTUbze8=; b=xEr2WYlWuePBg4wrWeiJaJzNYW0LJvVroVULTfj1KF7Gw/FzTBLOkmWtSnluNi60qm 7bI9fnrgpUbwLcVFkSW/0KDY34Y8canIsyaOuvdif46iBQOfoX4usbtaBtqBw5RkO8Dt 5odmT1ssStfVcH8cNUhY+fEs3vkNx2vQgQ2JUmo2zIpccO0bxl/f1hxg/SrTxwfVY1cw 8CH76NRISXvmX9l4mXM6aHOUkNPmJNKfrTdRMaEWl5IvmV0Mib5V2fNWnqDB8x439ziI UWLRoso2Oie33Rgd0cJNiJCiltaluBcZ8krUtZo78Bkf+bZirDLU/+MCtPOT7HABpgqV 0lkQ== Received: by 10.180.88.42 with SMTP id bd10mr24149755wib.8.1354101981824; Wed, 28 Nov 2012 03:26:21 -0800 (PST) Received: from localhost (5ED48CEF.cm-7-5c.dynamic.ziggo.nl. [94.212.140.239]) by mx.google.com with ESMTPS id t17sm7476440wiv.6.2012.11.28.03.26.07 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 28 Nov 2012 03:26:09 -0800 (PST) Received: by localhost (sSMTP sendmail emulation); Wed, 28 Nov 2012 12:26:06 +0100 From: Maarten Lankhorst To: thellstrom@vmware.com, dri-devel@lists.freedesktop.org Subject: [PATCH 2/6] drm/radeon: allow move_notify to be called without reservation Date: Wed, 28 Nov 2012 12:25:40 +0100 Message-Id: <1354101944-10455-2-git-send-email-maarten.lankhorst@canonical.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1354101944-10455-1-git-send-email-maarten.lankhorst@canonical.com> References: <1354101944-10455-1-git-send-email-maarten.lankhorst@canonical.com> 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 The few places that care should have those checks instead. This allows destruction of bo backed memory without a reservation. It's required for being able to rework the delayed destroy path, as it is no longer guaranteed to hold a reservation before unlocking. However any previous wait is still guaranteed to complete, and it's one of the last things to be done before the buffer object is freed. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/radeon/radeon_gart.c | 1 - drivers/gpu/drm/radeon/radeon_object.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index 8690be7..6e24f84 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c @@ -1237,7 +1237,6 @@ void radeon_vm_bo_invalidate(struct radeon_device *rdev, { struct radeon_bo_va *bo_va; - BUG_ON(!radeon_bo_is_reserved(bo)); list_for_each_entry(bo_va, &bo->va, bo_list) { bo_va->valid = false; } diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 7c4b4bb..69c8811 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -520,7 +520,7 @@ void radeon_bo_get_tiling_flags(struct radeon_bo *bo, int radeon_bo_check_tiling(struct radeon_bo *bo, bool has_moved, bool force_drop) { - BUG_ON(!radeon_bo_is_reserved(bo)); + BUG_ON(!radeon_bo_is_reserved(bo) && !force_drop); if (!(bo->tiling_flags & RADEON_TILING_SURFACE)) return 0;