From patchwork Mon Aug 24 09:43:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 7063001 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 942929F358 for ; Mon, 24 Aug 2015 09:43:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AFD0E2061E for ; Mon, 24 Aug 2015 09:43:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6001220619 for ; Mon, 24 Aug 2015 09:43:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B8EC76E4F7; Mon, 24 Aug 2015 02:43:42 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from pegasos-out.vodafone.de (pegasos-out.vodafone.de [80.84.1.38]) by gabe.freedesktop.org (Postfix) with ESMTP id 950C96E5E1 for ; Mon, 24 Aug 2015 02:43:41 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by pegasos-out.vodafone.de (Rohrpostix2 Daemon) with ESMTP id 9491155712 for ; Mon, 24 Aug 2015 11:43:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at vodafone.de X-Spam-Score: -0.044 X-Spam-Level: X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Authentication-Results: rohrpostix2.prod.vfnet.de (amavisd-new); dkim=pass header.i=@vodafone.de Received: from pegasos-out.vodafone.de ([127.0.0.1]) by localhost (rohrpostix2.prod.vfnet.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y8CnkXQtreND for ; Mon, 24 Aug 2015 11:43:39 +0200 (CEST) Received: from smtp-04.vodafone.de (smtp-04.vodafone.de [10.215.254.39]) by pegasos-out.vodafone.de (Rohrpostix2 Daemon) with ESMTP id E47CE55711 for ; Mon, 24 Aug 2015 11:43:38 +0200 (CEST) X-DKIM: OpenDKIM Filter v2.6.8 pegasos-out.vodafone.de E47CE55711 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafone.de; s=mail; t=1440409418; bh=lerc/UnbB+ku+FCqeVeDxAsxPVgY7F2K6c9gmmf5MR0=; h=From:To:Subject:Date; b=kyjJN3U+/duMRpoaEojlT1cedWtrQabjOv2Y0yUWANXvqpKny98lKej5SNFRWb4V7 ravCjFT99D2ZktgmNYZmUMSYZtRS9feMMq+FMYT7OY/u6skaBX5rfEwaX6FRy60pAD CFOu+rv/o8GAVT4hI3JdrGXixyMaBAQhi3QKmYKM= X-Virus-Scanned: amavisd-new at vodafone.de Received: from smtp-04.vodafone.de ([127.0.0.1]) by localhost (xsmail-dmz8.prod.vfnet.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sGG97odyazYd for ; Mon, 24 Aug 2015 11:43:35 +0200 (CEST) From: =?UTF-8?q?Christian=20K=C3=B6nig?= To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] amdgpu: remove sequence mutex Date: Mon, 24 Aug 2015 11:43:29 +0200 Message-Id: <1440409410-7907-1-git-send-email-deathsimple@vodafone.de> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Christian König It's not used any more. Signed-off-by: Christian König --- amdgpu/amdgpu_cs.c | 10 ---------- amdgpu/amdgpu_internal.h | 3 --- 2 files changed, 13 deletions(-) diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c index 41071fd..ae78a4c 100644 --- a/amdgpu/amdgpu_cs.c +++ b/amdgpu/amdgpu_cs.c @@ -58,10 +58,6 @@ int amdgpu_cs_ctx_create(amdgpu_device_handle dev, gpu_context->dev = dev; - r = pthread_mutex_init(&gpu_context->sequence_mutex, NULL); - if (r) - goto error; - /* Create the context */ memset(&args, 0, sizeof(args)); args.in.op = AMDGPU_CTX_OP_ALLOC_CTX; @@ -75,7 +71,6 @@ int amdgpu_cs_ctx_create(amdgpu_device_handle dev, return 0; error: - pthread_mutex_destroy(&gpu_context->sequence_mutex); free(gpu_context); return r; } @@ -96,8 +91,6 @@ int amdgpu_cs_ctx_free(amdgpu_context_handle context) if (NULL == context) return -EINVAL; - pthread_mutex_destroy(&context->sequence_mutex); - /* now deal with kernel side */ memset(&args, 0, sizeof(args)); args.in.op = AMDGPU_CTX_OP_FREE_CTX; @@ -195,8 +188,6 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context, chunk_data[i].ib_data.flags = ib->flags; } - pthread_mutex_lock(&context->sequence_mutex); - if (user_fence) { i = cs.in.num_chunks++; @@ -249,7 +240,6 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context, ibs_request->seq_no = cs.out.handle; error_unlock: - pthread_mutex_unlock(&context->sequence_mutex); free(dependencies); return r; } diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h index 7161db0..a6051ef 100644 --- a/amdgpu/amdgpu_internal.h +++ b/amdgpu/amdgpu_internal.h @@ -108,9 +108,6 @@ struct amdgpu_bo_list { struct amdgpu_context { struct amdgpu_device *dev; - /** Mutex for accessing fences and to maintain command submissions - in good sequence. */ - pthread_mutex_t sequence_mutex; /* context id*/ uint32_t id; };