From patchwork Tue Jun 30 13:53:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 6696151 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7E402C05AC for ; Tue, 30 Jun 2015 13:54:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A063C20618 for ; Tue, 30 Jun 2015 13:54:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B78DB20495 for ; Tue, 30 Jun 2015 13:54:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B88FC6E6FF; Tue, 30 Jun 2015 06:54:09 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qg0-f43.google.com (mail-qg0-f43.google.com [209.85.192.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 920B76E6F9 for ; Tue, 30 Jun 2015 06:54:06 -0700 (PDT) Received: by qget71 with SMTP id t71so4065727qge.2 for ; Tue, 30 Jun 2015 06:54:05 -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=vR0ozEkQ7qBzZWHdI6majl9KKJ8pndbeFLhZxySH1xc=; b=YuqXWeDA4w46Dovo0NAkkBi3pQUMChTSme30KOm3n7n+CihXPBePyB3oaQDMLLoYO4 LfiStpK+k85khpVJVMvXM/tSF45fyYUNhi4HXO4DC44zXaZkFACjvobHFszODbZhT1oZ 8R0WHLYN9I2RH7Xajh02dDc2mlrsmi8BJxMe0lAlFwBYtIN98fn8dP+GVODvi2SIxef6 PnY/EjoyGWz1f+9RNRmzBFTC7x6fMp63zAVxmLo8T1rpW7BXGau7Xbgk0UOq/5tfJqHa laM0VSNpb1lhDKSp8EznqGPYn0biin++aNBKtu8+QW0JANYTODqtZ2v/JvVTIZSS8Key g6fQ== X-Received: by 10.55.27.89 with SMTP id b86mr43275906qkb.20.1435672445826; Tue, 30 Jun 2015 06:54:05 -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.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Jun 2015 06:54:05 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 30 Jun 2015 10:53:07 -0300 Message-Id: <1435672392-7329-4-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 3/8] drm/i915: remove unneded locks on debugs FBC functions 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 The first one is helpless against a single variable read. The second one is not needed anymore now that we have fbc.lock. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_debugfs.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 5248ed9..4de083b 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1646,9 +1646,7 @@ static int i915_fbc_fc_get(void *data, u64 *val) if (INTEL_INFO(dev)->gen < 7 || !HAS_FBC(dev)) return -ENODEV; - drm_modeset_lock_all(dev); *val = dev_priv->fbc.false_color; - drm_modeset_unlock_all(dev); return 0; } @@ -1662,7 +1660,6 @@ static int i915_fbc_fc_set(void *data, u64 val) if (INTEL_INFO(dev)->gen < 7 || !HAS_FBC(dev)) return -ENODEV; - drm_modeset_lock_all(dev); mutex_lock(&dev_priv->fbc.lock); reg = I915_READ(ILK_DPFC_CONTROL); @@ -1673,7 +1670,6 @@ static int i915_fbc_fc_set(void *data, u64 val) (reg & ~FBC_CTL_FALSE_COLOR)); mutex_unlock(&dev_priv->fbc.lock); - drm_modeset_unlock_all(dev); return 0; }