From patchwork Wed Jun 21 18:28:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9802599 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 5E2A06038C for ; Wed, 21 Jun 2017 18:28:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 550C728521 for ; Wed, 21 Jun 2017 18:28:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 498B328534; Wed, 21 Jun 2017 18:28:38 +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=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 C0FF4283DA for ; Wed, 21 Jun 2017 18:28:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D0A1389930; Wed, 21 Jun 2017 18:28:29 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94A968991E for ; Wed, 21 Jun 2017 18:28:28 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id 77so28695639wrb.3 for ; Wed, 21 Jun 2017 11:28:28 -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=8gvYVVcOK8mXus7SJm63qvwrHMyl9OfFKgwOsDuDH1Y=; b=g3N1MVbmr9q3/sn33FXjHqAUxeDQiQuGJ7H4IScOMDdS33J8rP/l33pt8/gUUHfcdd Lum464JWhA1Us67/vysWEpsxo1pIV5Z8P28tZ7Nrbe6aMWEPV5e+u11WETlyPf5NHPFF EAa5/gOQk3IZz78GTVANarJNJTkXdn2jg/7Qg= 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=8gvYVVcOK8mXus7SJm63qvwrHMyl9OfFKgwOsDuDH1Y=; b=ttE1si1uCZCFNc5iE6A3NhUSzLxb4zR9QwOvXdRQO0ecvpPNEEy3ixj/gllb3msqLE sF/lNBMWssRQWUzlrPL0EcHdTqDHvsuyodm/136RYBvgcbTLevITTot0diA0rYSLU9km Q9lrfzwGPPBdR7okstr4B9XsZYI9dagweF+poNL6YgZI+ZOmBNEyMbAGHsRkTsU/qymd T1GFyGjPkocZCPqRLj4jDJ3Fejzoi+btkGcqYtjcfmbil9bFWAKM9vPIwqEi/+BKkn78 B4OWMT9KD9UXfvF2XuNQaamNTComdc96mJ+bqlFYmXCKz86ID4fqhBz4/M/sdP9P0vjr ugeQ== X-Gm-Message-State: AKS2vOwNgqEmL+7gRvBCS/nGzZ7qnfXV2/jfPJyGOHfVZ8hRNloM+jG1 pe8i4pE+Dkx2swhY X-Received: by 10.80.173.24 with SMTP id y24mr25373971edc.16.1498069707290; Wed, 21 Jun 2017 11:28:27 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5640:0:960b:2678:e223:c1c6]) by smtp.gmail.com with ESMTPSA id f48sm8272021ede.45.2017.06.21.11.28.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jun 2017 11:28:26 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Wed, 21 Jun 2017 20:28:08 +0200 Message-Id: <20170621182815.14602-6-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170621182815.14602-1-daniel.vetter@ffwll.ch> References: <20170621182815.14602-1-daniel.vetter@ffwll.ch> Cc: Daniel Vetter , Intel Graphics Development , Thierry Reding , John Stultz , Daniel Vetter Subject: [Intel-gfx] [PATCH 05/12] drm/fb-helper: Drop locking from the vsync wait ioctl code X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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; }