From patchwork Mon Nov 12 14:00:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 1728321 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 10B9BDFE80 for ; Mon, 12 Nov 2012 14:00:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EDDB39F08D for ; Mon, 12 Nov 2012 06:00:36 -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 AF47A9EB03 for ; Mon, 12 Nov 2012 06:00:21 -0800 (PST) Received: by mail-we0-f177.google.com with SMTP id u50so2715708wey.36 for ; Mon, 12 Nov 2012 06:00:20 -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; bh=/cmp6YsynqVD+1c0W8zav4FNVDWhX1DA1KXbBB0T354=; b=ilMgiKc6hkLTAbdDAZaTXMtGC66mwlF7c+4/0IOiV9cUUoEJQRqbRnbEWQSJX59OuC wsXp8Gk+qLHDdlQ/flUIOfUPLPltqPD0LakYa9GEmQ2YtEMNdFTpz4lcsA4nI6cLflWg XKjWZdxcShw/nRxEOsFN4z60JE4wCoPh6qrltjEPyxSYlUeyuBQGkVBDBKSBgX/fxDlC Jf2g8w+dnKQrUuXC0uzacPg9vb4qoQ3ueRPN+bccmUxquGJW+tYoiS6QsPvD4QTWhjEd R5RYoZMUsv0i0y44Zh0p2V6zSACb+qSblVEpR2nmv3QM3aSJt1NTQth6yGN/RzXQOqdX rF0A== Received: by 10.180.86.7 with SMTP id l7mr15123064wiz.5.1352728820716; Mon, 12 Nov 2012 06:00:20 -0800 (PST) Received: from localhost (5ED48CEF.cm-7-5c.dynamic.ziggo.nl. [94.212.140.239]) by mx.google.com with ESMTPS id ey2sm11793144wib.9.2012.11.12.06.00.17 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Nov 2012 06:00:19 -0800 (PST) Received: by localhost (sSMTP sendmail emulation); Mon, 12 Nov 2012 15:00:17 +0100 From: Maarten Lankhorst To: dri-devel@lists.freedesktop.org Subject: [PATCH 01/10] drm/radeon: allow move_notify to be called without reservation Date: Mon, 12 Nov 2012 15:00:02 +0100 Message-Id: <1352728811-21860-1-git-send-email-maarten.lankhorst@canonical.com> X-Mailer: git-send-email 1.8.0 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 allow destruction of bo backed memory without a reservation. 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 65c5555..50aa508 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;