From patchwork Mon Mar 21 19:26:55 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: 8636001 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 635309F3D1 for ; Mon, 21 Mar 2016 20:54:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9796F202F8 for ; Mon, 21 Mar 2016 20:54:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A79652010E for ; Mon, 21 Mar 2016 20:54:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 929B66E736; Mon, 21 Mar 2016 20:51:39 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 9EFA06E060 for ; Mon, 21 Mar 2016 19:27:07 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 21 Mar 2016 12:27:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,373,1455004800"; d="scan'208";a="673356228" Received: from smuhhunt-mobl2.amr.corp.intel.com (HELO panetone.amr.corp.intel.com) ([10.254.185.116]) by FMSMGA003.fm.intel.com with ESMTP; 21 Mar 2016 12:27:06 -0700 From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Mon, 21 Mar 2016 16:26:55 -0300 Message-Id: <1458588418-31129-3-git-send-email-paulo.r.zanoni@intel.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1458588418-31129-1-git-send-email-paulo.r.zanoni@intel.com> References: <1458588418-31129-1-git-send-email-paulo.r.zanoni@intel.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [RFC xf86-video-intel] sna: Call dirtyfb for all non-tear-free cases 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 The sna_mode_wants_tear_free() function tries to detect FBC and PSR based on Kernel module parameters. Currently it fails to detect FBC due to the default enable_fbc value being -1. While this can easily be fixed in the Kernel, I had a conversation with Daniel and he expressed unhappiness with that solution, claiming that yet another different code path just for a feature that should be transparent is not a good way to go, and that we should do proper frontbuffer rendering. So with this patch, we'll have the DDX issuing dirtyfb calls even if TearFree is not enabled, fixing FBC when i915.enable_fbc=-1. This fixes a bug that happens on SKL with FBC enabled: if you run lightdm, your login/password won't appear as you type on your keyboard. You have to move the mouse over the input box for them to be displayed. Cc: Chris Wilson Signed-off-by: Paulo Zanoni --- src/sna/sna_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index b245594..84e8e55 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -654,7 +654,7 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int probe) } scrn->currentMode = scrn->modes; - if (!setup_tear_free(sna) && sna_mode_wants_tear_free(sna)) + if (!setup_tear_free(sna)) sna->kgem.needs_dirtyfb = sna->kgem.has_dirtyfb; xf86SetGamma(scrn, zeros);