From patchwork Wed May 22 16:41:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 10956349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4AD141390 for ; Wed, 22 May 2019 16:42:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C6DA28C76 for ; Wed, 22 May 2019 16:42:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 309F728C9C; Wed, 22 May 2019 16:42:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C788428C85 for ; Wed, 22 May 2019 16:42:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4064389C14; Wed, 22 May 2019 16:42:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5B4CC89BFD for ; Wed, 22 May 2019 16:42:45 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id i3so2905777wml.4 for ; Wed, 22 May 2019 09:42:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9DKrzunIyydueP1ABArbsyU6wbPwjgNS2c0Kr6npnPM=; b=ANpm5zRzG3CsjTBcn7WbueFIuKt+brX8Aht04mfPJeTUA7AnKEdj393QIr7aaS+7Cn h080c0GWApsZn2trO/+Ez2x0QgLo3USP8oemRlMX90bb10LH7V4vz1RaQMJzQBCMMA4z b2SdhsFF48RmOQDvv8wgIbvsu+TL7AEdovuy96oMg4vit14/4hayX1XBFXpowC18gaWV yMTxEptyTBHREdR1qHqsf9rD6ufXJLSyzBmRoL9sQ6KjYxxxtTZpO0wsoVsvMjGsyYC/ m04vVbjxU5DRDRRhzn8XOLVoQfmiPKeReoNYTVngpnGq/2LbKkYUW9sEt3qDNcCXivfU CYFw== X-Gm-Message-State: APjAAAVS7MBDyAt7eTrfmTlvzBRGRJBhNpoCS1DxLZ+n9ZnEA8KCxzaL 4h6YTt+MNIXlLCLG/9E3mM7onQyG X-Google-Smtp-Source: APXvYqwV9jyQPgH+Ni5KCSKizkyNxbz2D0yFCaqOi32oy5VqFVjA7Kwax01ltoajKvOzqwKd6D3W7Q== X-Received: by 2002:a1c:2dd2:: with SMTP id t201mr8200833wmt.136.1558543363722; Wed, 22 May 2019 09:42:43 -0700 (PDT) Received: from arch-x1c3.cbg.collabora.co.uk ([2a00:5f00:102:0:9665:9cff:feee:aa4d]) by smtp.gmail.com with ESMTPSA id l18sm24576684wrv.38.2019.05.22.09.42.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 09:42:43 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/5] drm/vmgfx: kill off unused init_mutex Date: Wed, 22 May 2019 17:41:16 +0100 Message-Id: <20190522164119.24139-2-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190522164119.24139-1-emil.l.velikov@gmail.com> References: <20190522164119.24139-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9DKrzunIyydueP1ABArbsyU6wbPwjgNS2c0Kr6npnPM=; b=Ug446RUhhuSVanuiILd+TW7vv9oc1fRcofmEvW3KjnmHcgRSyfUOJWJpHqRCqAtgk5 v2HoP6/qgvYxmD89yCXDJ1HWuiXCMvZ8CwH6tsb7lYBqils/cVkso6OcOqfGLYYdU/nc ni10whoByNa4iA8XFbNNS4HyrvpOYoZ4V7QDZz57kZY/g0NgRtA+C8rEpNDF/S6QMAR7 Yfsw8b95sNcMqXJGKMxzWyW7yuDXv3MEWNClkpKBMDYL39nxxbFQdXMbLssT3Ws7w7E7 0G97xCcqsSS7z2i9E60gfhGyKPEJz3uXa+cuLr+aq4ITl0no4fFrljYmhYYqXAscep+z bYUQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Hellstrom , kernel@collabora.com, VMware Graphics Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Emil Velikov According to the docs - prevents firstopen/lastclose races. Yet never used in practise. Cc: "VMware Graphics" Cc: Thomas Hellstrom Cc: Daniel Vetter Signed-off-by: Emil Velikov Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 5 ----- 2 files changed, 6 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index a38f06909fb6..d3f108f7e52d 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -664,7 +664,6 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) INIT_LIST_HEAD(&dev_priv->res_lru[i]); } - mutex_init(&dev_priv->init_mutex); init_waitqueue_head(&dev_priv->fence_queue); init_waitqueue_head(&dev_priv->fifo_queue); dev_priv->fence_queue_waiters = 0; diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h index 96983c47fb40..9be2176cc260 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h @@ -484,11 +484,6 @@ struct vmw_private { spinlock_t resource_lock; struct idr res_idr[vmw_res_max]; - /* - * Block lastclose from racing with firstopen. - */ - - struct mutex init_mutex; /* * A resource manager for kernel-only surfaces and