From patchwork Mon Dec 8 16:09:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 5457321 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A3B919F1C5 for ; Mon, 8 Dec 2014 16:10:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA9432015A for ; Mon, 8 Dec 2014 16:10:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id F312620155 for ; Mon, 8 Dec 2014 16:10:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 52C296E7A1; Mon, 8 Dec 2014 08:10:34 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qa0-f52.google.com (mail-qa0-f52.google.com [209.85.216.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 9E7C56E7AC for ; Mon, 8 Dec 2014 08:10:32 -0800 (PST) Received: by mail-qa0-f52.google.com with SMTP id dc16so3484732qab.39 for ; Mon, 08 Dec 2014 08:10:32 -0800 (PST) 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=Gu02g388eV7uyY2FgK7Vkrv8eBKe4HqNWX/KZgomOj8=; b=OoQggeyt2D0dyAXpnbp3rzQFaym4H9FK3gZKip+oDCOU/H2+Bieom5HXfOTkgrp3eL rrbYNECKqom7jNaTFH/sS5WIeZyOejXxIBoRvAL6GffKU7bJPUz2v8xe3WniBkeiwwmO QCj2zV8ySgMYSs6RWwLV16h/zKZ91wUnbVNzCQ9y9utqm7kod/1CPKU0wmA77Vu/I80i RtaWaDHLBdqv08ryO/cO4fZr111waaMfHTNdQ05selbaAohRnzgtmn5lbDAXNjYFcU7L jMBaYBGZb9IH8qRSrofztU2Pm0i/maFD0H2n2PKl/Th3Fw+I8gQlYIYgoyVXH2AZvN1e IIrA== X-Received: by 10.224.4.133 with SMTP id 5mr54281779qar.37.1418055032348; Mon, 08 Dec 2014 08:10:32 -0800 (PST) Received: from localhost.localdomain ([187.95.104.42]) by mx.google.com with ESMTPSA id d9sm38189123qam.26.2014.12.08.08.10.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Dec 2014 08:10:31 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Mon, 8 Dec 2014 14:09:13 -0200 Message-Id: <1418054960-1403-5-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1418054960-1403-1-git-send-email-przanoni@gmail.com> References: <1418054960-1403-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 04/11] drm/i915: don't keep reassigning FBC_UNSUPPORTED 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 This may save a few picoseconds on !HAS_FBC platforms. And it also satisfies my OCD. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_fbc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 4647d57..f3d5764 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -516,10 +516,8 @@ void intel_fbc_update(struct drm_device *dev) const struct drm_display_mode *adjusted_mode; unsigned int max_width, max_height; - if (!HAS_FBC(dev)) { - set_no_fbc_reason(dev_priv, FBC_UNSUPPORTED); + if (!HAS_FBC(dev)) return; - } if (i915.enable_fbc < 0) { if (set_no_fbc_reason(dev_priv, FBC_CHIP_DEFAULT)) @@ -684,6 +682,7 @@ void intel_fbc_init(struct drm_i915_private *dev_priv) { if (!HAS_FBC(dev_priv)) { dev_priv->fbc.enabled = false; + dev_priv->fbc.no_fbc_reason = FBC_UNSUPPORTED; return; }