From patchwork Fri Feb 13 19:23:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 5826951 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 D298FBF6C3 for ; Fri, 13 Feb 2015 19:24:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2207D20268 for ; Fri, 13 Feb 2015 19:24:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 39EDA20254 for ; Fri, 13 Feb 2015 19:24:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 76FBC72078; Fri, 13 Feb 2015 11:24:43 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qa0-f42.google.com (mail-qa0-f42.google.com [209.85.216.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 8C0FE6E7F9 for ; Fri, 13 Feb 2015 11:24:42 -0800 (PST) Received: by mail-qa0-f42.google.com with SMTP id w8so13651537qac.1 for ; Fri, 13 Feb 2015 11:24:42 -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=0KdbMXwi9/wvkpgGJb6LSLd8cL31oFi1s5kPo1HimGM=; b=Vgez176AOiEJ6iWbFqfOkc1aWkCYQHmLviZnKtGX9NntWZb6bs5zubmT8euFtl8FJ9 8KoeOSCsLe+TsasnELM9LSncKgKOIDQ2MXs9xNGD8jSce6C09Q65PdPniCrFWmymxSWE 55/9xlRDMOh2fZz+VEC/pKAt8k4p24t/zyuYovdVbaA61A6Uf0DlRjyzJHmZKb2C1HtL 0tTYpVUXppJty65cMwanDpdWwdlzLm4hOOLgN99VT+Q1ZW2jYxnJn8t1IqG12EoRMrgo 9NfNNDdUmepDim1rTQSiPQV46cUWojORc3X9kp1eSTPMJtfMIUfJBUE4eAhHozKaxE+a QScQ== X-Received: by 10.140.232.84 with SMTP id d81mr4656190qhc.15.1423855482154; Fri, 13 Feb 2015 11:24:42 -0800 (PST) Received: from localhost.localdomain ([177.220.182.131]) by mx.google.com with ESMTPSA id m5sm3525590qay.2.2015.02.13.11.24.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Feb 2015 11:24:41 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Fri, 13 Feb 2015 17:23:42 -0200 Message-Id: <1423855427-2098-3-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1423855427-2098-1-git-send-email-przanoni@gmail.com> References: <1423855427-2098-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 2/7] drm/i915: HSW+ FBC is tied to pipe A 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 So add code to consider this case. v2: Reorder the series, so drop the possible_framebuffer_bits chunk. Reviewed-by: Rodrigo Vivi (v1) Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_fbc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 69342d0..6406b14 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -475,10 +475,16 @@ static bool set_no_fbc_reason(struct drm_i915_private *dev_priv, static struct drm_crtc *intel_fbc_find_crtc(struct drm_i915_private *dev_priv) { - struct drm_device *dev = dev_priv->dev; struct drm_crtc *crtc = NULL, *tmp_crtc; + enum pipe pipe; + bool pipe_a_only = false; + + if (IS_HASWELL(dev_priv) || INTEL_INFO(dev_priv)->gen >= 8) + pipe_a_only = true; + + for_each_pipe(dev_priv, pipe) { + tmp_crtc = dev_priv->pipe_to_crtc_mapping[pipe]; - for_each_crtc(dev, tmp_crtc) { if (intel_crtc_active(tmp_crtc) && to_intel_crtc(tmp_crtc)->primary_enabled) { if (crtc) { @@ -488,6 +494,9 @@ static struct drm_crtc *intel_fbc_find_crtc(struct drm_i915_private *dev_priv) } crtc = tmp_crtc; } + + if (pipe_a_only) + break; } if (!crtc || crtc->primary->fb == NULL) {