From patchwork Wed Jul 8 20:58:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 6751411 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 5866FC05AC for ; Wed, 8 Jul 2015 20:59:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9178D20647 for ; Wed, 8 Jul 2015 20:59:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BB81E204CF for ; Wed, 8 Jul 2015 20:59:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 41E5E6EBE4; Wed, 8 Jul 2015 13:59:42 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qk0-f178.google.com (mail-qk0-f178.google.com [209.85.220.178]) by gabe.freedesktop.org (Postfix) with ESMTPS id 58D306EBE4 for ; Wed, 8 Jul 2015 13:59:40 -0700 (PDT) Received: by qkeo142 with SMTP id o142so172717421qke.1 for ; Wed, 08 Jul 2015 13:59:39 -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=nHBF+ijjmPE4nJHb0vUV6N70DZjLvADo0++tmNd2ZBQ=; b=zu0l/+al+Gac0VfG6AGGR7JFS/dSr4zG/tC19oPFmHgYAqPKuZNA5uHUNcxN0x5DgZ jWfqca0FhZOZmk4wBlOXlMlDcBvRzBvhJzpfdd6b9QXRYiqR6j+GROj5SjE4CtWwHslm xAkih2k5reqCJNBHKiWXP/NcVOXvPu4vTe4Yo5edEMhgAKbGR5B1yjqPUzHlyo9/wteK mCC34Bvo722QVFpHZ/6lPHgvZnruYeyKo23lJnT+op8DB4q4lPqQPUvBq2+8XtHr83U4 vAZwVicbeAihRmxJCCDSxROr30YmIZAwYqs/wSAH10KP2l8IsEvbcBhmx1LtntweTJxv Cbsw== X-Received: by 10.140.218.5 with SMTP id o5mr20532092qhb.13.1436389179482; Wed, 08 Jul 2015 13:59:39 -0700 (PDT) Received: from localhost.localdomain (r130-pw-tresbarras.ibys.com.br. [189.76.1.243]) by smtp.gmail.com with ESMTPSA id n62sm2099461qha.18.2015.07.08.13.59.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jul 2015 13:59:39 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Wed, 8 Jul 2015 17:58:54 -0300 Message-Id: <1436389139-16282-2-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436389139-16282-1-git-send-email-przanoni@gmail.com> References: <1436389139-16282-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 1/6] drm/i915: make sure we're not changing the FBC CFB with FBC enabled 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.8 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 We used to have this bug in the past, but now that we properly track the size of the CFB, we don't have it anymore. Still, add the WARN just to make sure we don't go back to the bad state. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_fbc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index c271af7..1448746 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -589,6 +589,8 @@ static int intel_fbc_alloc_cfb(struct drm_i915_private *dev_priv, int size, dev_priv->fbc.threshold = ret; + WARN_ON(dev_priv->fbc.enabled); + if (INTEL_INFO(dev_priv)->gen >= 5) I915_WRITE(ILK_DPFC_CB_BASE, dev_priv->fbc.compressed_fb.start); else if (IS_GM45(dev_priv)) {