From patchwork Tue Jul 4 15:18:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9825241 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6B7BF60237 for ; Tue, 4 Jul 2017 15:19:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D6C927F3E for ; Tue, 4 Jul 2017 15:19:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5211827FB0; Tue, 4 Jul 2017 15:19:14 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable 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 EF92727F3E for ; Tue, 4 Jul 2017 15:19:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E79A56E366; Tue, 4 Jul 2017 15:18:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 001BA6E35E for ; Tue, 4 Jul 2017 15:18:46 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id j85so26982609wmj.0 for ; Tue, 04 Jul 2017 08:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+ZZNnUGa6wGJighHDJehEQhnu7PLksBF7kXTsRlI0Us=; b=HpCVee8oSlKrZUbNJA1w/4p7CRGLvrtD90FHYe8uhXGMVNR9a/C3IMpCp801HbhZ4h 3AScQMFn5rNrmKeACTpI3mUT43iGcBWhkp/H80d3xEBMN6viPbKknmonQw48tszCY+Nf tmhtCKCWPb0JjDOenziqbJ3alDM/L+hwBFQe0= 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; bh=+ZZNnUGa6wGJighHDJehEQhnu7PLksBF7kXTsRlI0Us=; b=ql2CDbjD7gLsIi2aGBANttN8S27niIi7tHDzQkC8rap9XE3v8KHigvDNDOb4tARUne mNV/oZjCXdbxB3FGgkavHZB88A8ODwp+f1uXlrq7ATZ+lYKYz7XLXqtSljIMWUZMoBYh ipogHe/S945uB531Q+JqkXxKszl+G7atFPVliwos9YoDR2SBn4GgYAJ0ZehRC4Op2mzD OWyeiD+7WI3BTYCLq+6jmqluFkIjrALarK0TVwQd+q8Hs0Gr28c4vNxXx5Y29rQz2iiW BEgqg5OreQjLKw8/BTtkndNOV6yl7/q80Hqu4aubScc9xWjTpKNDHikW65hTOEhspKUw M9rg== X-Gm-Message-State: AKS2vOxyM6+fFEpjKXMmxUVUs2k77YiS7zQnmi6df07V96oEYHYJG5+u tF3spS0fyuOqheX5xWg= X-Received: by 10.80.155.19 with SMTP id o19mr18680766edi.27.1499181525429; Tue, 04 Jul 2017 08:18:45 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5640:0:960b:2678:e223:c1c6]) by smtp.gmail.com with ESMTPSA id 2sm23676308edt.36.2017.07.04.08.18.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jul 2017 08:18:44 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 05/13] drm/fb-helper: Drop locking from the vsync wait ioctl code Date: Tue, 4 Jul 2017 17:18:25 +0200 Message-Id: <20170704151833.17304-6-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170704151833.17304-1-daniel.vetter@ffwll.ch> References: <20170704151833.17304-1-daniel.vetter@ffwll.ch> Cc: Daniel Vetter , Intel Graphics Development , Thierry Reding , Daniel Vetter 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Like with the drm-native vblank wait ioctl we can entirely rely on the spinlocks in drm_vblank.c, no need at all to take expensive mutexes. The only reason we had to take mode_config.mutex was to protect the fbdev helper's data-structures, but that's now done by fb_helper->lock. Cc: John Stultz Cc: Thierry Reding Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_fb_helper.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 14b3f885a01f..13330c22e6bf 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -1342,7 +1342,6 @@ int drm_fb_helper_ioctl(struct fb_info *info, unsigned int cmd, goto unlock; } - mutex_lock(&dev->mode_config.mutex); switch (cmd) { case FBIO_WAITFORVSYNC: /* @@ -1382,7 +1381,6 @@ int drm_fb_helper_ioctl(struct fb_info *info, unsigned int cmd, } unlock: - mutex_unlock(&dev->mode_config.mutex); mutex_unlock(&fb_helper->lock); return ret; }