From patchwork Wed Sep 4 08:44:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaurav K Singh X-Patchwork-Id: 11129627 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4A54D14F7 for ; Wed, 4 Sep 2019 08:41:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3240622DBF for ; Wed, 4 Sep 2019 08:41:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3240622DBF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BCB9895E7; Wed, 4 Sep 2019 08:41:10 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id B6916895E7 for ; Wed, 4 Sep 2019 08:41:08 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2019 01:41:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,465,1559545200"; d="scan'208";a="176866629" Received: from gksingh.iind.intel.com ([10.66.179.29]) by orsmga008.jf.intel.com with ESMTP; 04 Sep 2019 01:41:07 -0700 From: Gaurav K Singh To: intel-gfx@lists.freedesktop.org Date: Wed, 4 Sep 2019 14:14:22 +0530 Message-Id: <1567586662-6853-1-git-send-email-gaurav.k.singh@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [Intel-gfx] [PATCH] drm/i915: Fix corruption lines on the screen on Gen9 chromebooks X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 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" On Gen9 chromebooks, we are seeing the screen shows several large blue horizontal stripes over the top. Also, corruption happens when we switch from a chrome browser tab to VT2 mode(by pressing Ctrl+Alt+F2) and then back to chrome tab. As per the display workaround #1200, FBC needs wait for vblank before enabling and before disabling FBC. Signed-off-by: Gaurav K Singh --- drivers/gpu/drm/i915/display/intel_fbc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c index 16ed44bfd734..71f2568ea5a3 100644 --- a/drivers/gpu/drm/i915/display/intel_fbc.c +++ b/drivers/gpu/drm/i915/display/intel_fbc.c @@ -1097,6 +1097,8 @@ void intel_fbc_enable(struct intel_crtc *crtc, if (fbc->crtc == crtc) { WARN_ON(!crtc_state->enable_fbc); WARN_ON(fbc->active); + if (IS_GEN9(dev_priv)) + intel_wait_for_vblank(dev_priv, crtc->pipe); } goto out; } @@ -1137,8 +1139,11 @@ void intel_fbc_disable(struct intel_crtc *crtc) return; mutex_lock(&fbc->lock); - if (fbc->crtc == crtc) + if (fbc->crtc == crtc) { __intel_fbc_disable(dev_priv); + if (IS_GEN9(dev_priv)) + intel_wait_for_vblank(dev_priv, crtc->pipe); + } mutex_unlock(&fbc->lock); }