From patchwork Fri Dec 23 12:23:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zanoni, Paulo R" X-Patchwork-Id: 9487367 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5DF75600CB for ; Fri, 23 Dec 2016 12:24:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4361E26247 for ; Fri, 23 Dec 2016 12:24:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3691F26E82; Fri, 23 Dec 2016 12:24:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D8B7F26247 for ; Fri, 23 Dec 2016 12:24:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 354246E023; Fri, 23 Dec 2016 12:24:09 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id ECF978901F for ; Fri, 23 Dec 2016 12:24:07 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 23 Dec 2016 04:24:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,393,1477983600"; d="scan'208";a="801638949" Received: from przanoni-mobl.amr.corp.intel.com ([10.254.176.247]) by FMSMGA003.fm.intel.com with ESMTP; 23 Dec 2016 04:24:06 -0800 From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Fri, 23 Dec 2016 10:23:58 -0200 Message-Id: <1482495839-27041-1-git-send-email-paulo.r.zanoni@intel.com> X-Mailer: git-send-email 2.7.4 Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 1/2] drm/i915: enable FBC on gen9+ too 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-Virus-Scanned: ClamAV using ClamSMTP Gen9+ platforms have been seeing a lot of screen flickerings and underruns, so I never felt comfortable in enabling FBC on these platforms since I didn't want to throw yet another feature on top of the already complex problem. We now have code that automatically disables FBC if we ever get an underrun, and the screen flickerings seem to be mostly gone, so it may be a good time to try to finally enable FBC by default on the newer platforms. Besides, BDW FBC has been working fine over the year, which gives me a little more confidence now. For a little more information, please refer to commit a98ee79317b4 ("drm/i915/fbc: enable FBC by default on HSW and BDW"). v2: Enable not only on SKL, but for everything new (Daniel). v3: Rebase after the intel_sanitize_fbc_option() change. v4: New rebase after 8 months, drop expired R-B tags. Signed-off-by: Paulo Zanoni Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_fbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Daniel gave me a R-B for this patch maaaaany months ago, but I think we can consider it as expired now. QA just went through a round of testing and confirmed 100% pass rate for SKL/KBL/BXT (VIZ-7181). Besides, we do have at least one user with FBC enabled on SKL and reporting possible issues, as we saw on #98213, which is already fixed. The problem that I've been discussing with Chris and Daniel is not a user visible bug since it just keeps FBC deactivated if the client doesn't issue the dirtyfb calls, and from what I can see, current user space is fine. I have a pending patch for an improvement on the CRTC-choosing code, but that's not a bug fix and doesn't change how HSW+ behaves. It's patch 2 of this series. I think we can also consider reenabling FBC on HSW due to the confirmation I got some time ago that the HSW regression is gone (both bugs from c7f7e2feffb0 have confirmed that some patches that are alredy merged fixed the problem without reverting HSW support). But I won't propose this until we get to understand what's going on with bug #99169. diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 9aec63b..26a81a9 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -1317,7 +1317,7 @@ static int intel_sanitize_fbc_option(struct drm_i915_private *dev_priv) if (!HAS_FBC(dev_priv)) return 0; - if (IS_BROADWELL(dev_priv)) + if (IS_BROADWELL(dev_priv) || INTEL_GEN(dev_priv) >= 9) return 1; return 0;