From patchwork Tue Jun 30 13:53:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 6696191 Return-Path: X-Original-To: patchwork-intel-gfx@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 C39829F3A0 for ; Tue, 30 Jun 2015 13:54:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04A6620495 for ; Tue, 30 Jun 2015 13:54:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2A72120457 for ; Tue, 30 Jun 2015 13:54:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A06ED6E711; Tue, 30 Jun 2015 06:54:22 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qk0-f170.google.com (mail-qk0-f170.google.com [209.85.220.170]) by gabe.freedesktop.org (Postfix) with ESMTPS id D98326E984 for ; Tue, 30 Jun 2015 06:54:12 -0700 (PDT) Received: by qkei195 with SMTP id i195so6523280qke.3 for ; Tue, 30 Jun 2015 06:54:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QMs9O+5MJ7VheN+OIBU7MEjghwA1IVxFZ9k+ffGOXBA=; b=TzK1Ri7KAH114kV68T3h0JRdBFe7gu62DP4wSpbXVb/Pu9ppwZTIPGSXhiJ5tIe9Im Z3J0ydsJYIhQUdR7aJSSY3f6kwDhSiLXj9VIXRay2WFc8Krw8YMJxaKixtfpMh3lWefC zYOQJmLrgizNrMZj0aMAJezYVALqjQiFnPjlO1gKrR3VJ2IPzQspuPnFIw/y2bZi0fCI AHSAfQmyz2oYqogev2Fb657MqTm5gI8MvBcoNPiAD4HdTXKOcKMZH3r472Br6Bxcldg7 E/xQbX7cIpYiPdPEA5BraeOmeXQqW/YVdR/EUZm880Hxqz84EDI90NVSsLlS+C1k4+8b CAOQ== X-Received: by 10.140.83.84 with SMTP id i78mr11748889qgd.14.1435672452215; Tue, 30 Jun 2015 06:54:12 -0700 (PDT) Received: from localhost.localdomain (r130-pw-tresbarras.ibys.com.br. [189.76.1.243]) by mx.google.com with ESMTPSA id e10sm4651585qka.40.2015.06.30.06.54.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Jun 2015 06:54:11 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 30 Jun 2015 10:53:11 -0300 Message-Id: <1435672392-7329-8-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1435672392-7329-1-git-send-email-przanoni@gmail.com> References: <1435672392-7329-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 7/8] drm/i915: reduce struct_mutex coverage at intel_crtc_page_flip() 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-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Paulo Zanoni Neither intel_fbc_disable() nor intel_frontbuffer_flip_prepare() need that lock. That intel_fbc_disable() call over there can also certainly be improved, but let's do it on its own commit. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index eab5aa1..0d98332 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11445,11 +11445,11 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, i915_gem_track_fb(intel_fb_obj(work->old_fb), obj, to_intel_plane(primary)->frontbuffer_bit); + mutex_unlock(&dev->struct_mutex); intel_fbc_disable(dev); intel_frontbuffer_flip_prepare(dev, to_intel_plane(primary)->frontbuffer_bit); - mutex_unlock(&dev->struct_mutex); trace_i915_flip_request(intel_crtc->plane, obj);