From patchwork Wed Dec 12 13:07:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1866871 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 E697EDF2EE for ; Wed, 12 Dec 2012 14:10:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C85EEE65C1 for ; Wed, 12 Dec 2012 06:10:41 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C6F9E64DB for ; Wed, 12 Dec 2012 05:13:58 -0800 (PST) Received: by mail-ee0-f49.google.com with SMTP id c4so429476eek.36 for ; Wed, 12 Dec 2012 05:13:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=AzhYlMNg2Pz03ANaaBPfnBm2j9CZtZfg3pRUwVzGnho=; b=bz2UZeP73a8hWweLV3/YUnOSqNZpJHIIMRUuquVEXlHNmR7ly/ajRrO/R5orw8ZPO6 VMY2qqHAT/OHfg0PmZs8KY/sUIZcXv3y3ewRRFFa3OYdAIaWT+iA9do5SGv00ghovXkg 3zcG5bB9H0eqZpNUL5mzzAWhEaDROq8JsL+xo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=AzhYlMNg2Pz03ANaaBPfnBm2j9CZtZfg3pRUwVzGnho=; b=gr0WYtta2DbKg34gQViA//NMrksfVbrPWygoA5mmL/Uu2rHI79eJXT21Pm76TW67aZ QZp84RYEHxQvLMq4D5jN4lzzWu9axSejAUNfSaJTdidX/dk+3ooYBlX+98NbEUV1AYeV 4h1DJND9m77fd9NQIdjI6EnwxEqMjik/hrEv2SvPH/ETMvS09JE27oTAa8c/g5UFsWrN VjmuKsjVZyetfGJuNHEaJaq1Bh9ZkqaF/KzyPws39pfA2rhVZKK9cAL4Auvq9docpgdg RexdM64sdPniU5l33BodgI1GFLUhkFS20ZDSfbxcZDwwPrPiSC3vsFgMYW4x5jTz8iFt FS/Q== Received: by 10.14.221.65 with SMTP id q41mr2702450eep.30.1355317676444; Wed, 12 Dec 2012 05:07:56 -0800 (PST) Received: from biers.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id r1sm55868541eeo.2.2012.12.12.05.07.55 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 05:07:55 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 34/37] drm/ttm: fix fence locking in ttm_buffer_object_transfer Date: Wed, 12 Dec 2012 14:07:14 +0100 Message-Id: <1355317637-16742-35-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1355317637-16742-1-git-send-email-daniel.vetter@ffwll.ch> References: <1355317637-16742-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQliLMmviwhTLh/pyLSYOBcBDMTjdvR+ZPpE9/gsMtEfwiCDyni0etrcOR8tNaRkcDjpq1RM Cc: Nouveau Dev , Intel Graphics Development , Radeon Dev , Daniel Vetter 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 Noticed while reviewing the fence locking in the radone pageflip handler. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/ttm/ttm_bo_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index b9c4e51..5c8b207 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -441,7 +441,9 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo, fbo->vm_node = NULL; atomic_set(&fbo->cpu_writers, 0); + spin_lock(&bdev->fence_lock); fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj); + spin_unlock(&bdev->fence_lock); kref_init(&fbo->list_kref); kref_init(&fbo->kref); fbo->destroy = &ttm_transfered_destroy;