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: 1866421 Return-Path: X-Original-To: patchwork-intel-gfx@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 CACA6DF2EE for ; Wed, 12 Dec 2012 13:58:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ACBAFE657E for ; Wed, 12 Dec 2012 05:58:26 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ea0-f177.google.com (mail-ea0-f177.google.com [209.85.215.177]) by gabe.freedesktop.org (Postfix) with ESMTP id D87DBE652E for ; Wed, 12 Dec 2012 05:13:09 -0800 (PST) Received: by mail-ea0-f177.google.com with SMTP id c10so221424eaa.36 for ; Wed, 12 Dec 2012 05:13:09 -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=OMe/uDC9ENFcGfvPrzvSTPMe0cp+I1VLoVoJ91DcHuszboE8pQ9mY/t/xpQz3zzkx+ spJgx70AvN/Ok5XWfuExOGNyBFH0nKqzhC/uRmWF78tITZPwccLcL5Rrzaa2hxFWkTeF 4gLeRNXzw/0GsiL/N/Me0bRhc6rMQcPj9osl5FnSzHrMKroEXMG7ypJhrCdfmt3Vurfq hIdjbaLPBiYxnWoig85yEq1heqaCLxlU2peoDrGkVtd12tkDf1jpI/DCWV37XcdSNua2 A0+h3RRbGymeNP//huQj62dheQ/oTwwkCsYeK972AXSpaYze2seal3BTCFmKGFo/zXOg YjYQ== 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 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: ALoCoQnqbVLp0XCktF6iLRHsaP4W/XdKbk8id/wYpUfWjsmFUE+BB4TzbIGgp8R3JAJ+RQrSZGde Cc: Nouveau Dev , Intel Graphics Development , Radeon Dev , Daniel Vetter Subject: [Intel-gfx] [PATCH 34/37] drm/ttm: fix fence locking in ttm_buffer_object_transfer X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=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;