From patchwork Fri Sep 11 13:48:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Lee, Shawn C" X-Patchwork-Id: 11770645 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 0DDC3112E for ; Fri, 11 Sep 2020 13:48:47 +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 DD1CB22283 for ; Fri, 11 Sep 2020 13:48:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD1CB22283 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 8F8546EA54; Fri, 11 Sep 2020 13:48:44 +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 5E4D56EA54 for ; Fri, 11 Sep 2020 13:48:43 +0000 (UTC) IronPort-SDR: aw5tt4PqZuhxCk6e6PBFrL5rX+GPgJxWZpZa604uflGmZlWn7SefTdhVk2J5agtwowrc+7/FqN Kiqw8195nlLQ== X-IronPort-AV: E=McAfee;i="6000,8403,9740"; a="156209150" X-IronPort-AV: E=Sophos;i="5.76,415,1592895600"; d="scan'208";a="156209150" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2020 06:48:41 -0700 IronPort-SDR: Kg7UcH83KObDeBQ02A6vF8OBVcrnP+reFvJ/eG7juPWIp8B8yTGzMxL+x+vYbrmtA6KGiS1/7f Nc5wSytS/FaA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,415,1592895600"; d="scan'208";a="449990953" Received: from shawnle1-build-machine.itwn.intel.com ([10.5.253.9]) by orsmga004.jf.intel.com with ESMTP; 11 Sep 2020 06:48:37 -0700 From: Lee Shawn C To: intel-gfx@lists.freedesktop.org Date: Fri, 11 Sep 2020 21:48:27 +0800 Message-Id: <20200911134827.5542-1-shawn.c.lee@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200827055129.26566-1-shawn.c.lee@intel.com> References: <20200827055129.26566-1-shawn.c.lee@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v2] drm/i915/fbc: disable FBC on Nightfury board X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cooper Chiou , William Tseng , Jani Nikula Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Customer report random display flicker issue on Nightfury board. And we found this problem might be caused by VT-d and FBC are both enabled. According to sighting report, it recommend to turn FBC off to workaround this kind of issue. This change refer to DMI BOARD_VENDOR and BOARD_NAME information to disable FBC. Cc: Ville Syrjälä Cc: Rodrigo Vivi Cc: Mika Kuoppala Cc: Jani Nikula Cc: William Tseng Cc: Cooper Chiou Signed-off-by: Lee Shawn C v2: fix typo. --- drivers/gpu/drm/i915/display/intel_fbc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c index 327af428d73f..20660fdbab36 100644 --- a/drivers/gpu/drm/i915/display/intel_fbc.c +++ b/drivers/gpu/drm/i915/display/intel_fbc.c @@ -39,6 +39,7 @@ */ #include +#include #include "i915_drv.h" #include "i915_trace.h" @@ -1439,6 +1440,24 @@ static int intel_sanitize_fbc_option(struct drm_i915_private *dev_priv) return 0; } +static int intel_fbc_vtd_callback(const struct dmi_system_id *id) +{ + DRM_DEBUG_KMS("Disabling FBC to prevent screen flicker on %s device\n", id->ident); + return 1; +} + +static const struct dmi_system_id intel_fbc_vtd_detect[] = { + { + .callback = intel_fbc_vtd_callback, + .ident = "Google Nightfury", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Google"), + DMI_MATCH(DMI_BOARD_NAME, "Nightfury"), + }, + }, + { } +}; + static bool need_fbc_vtd_wa(struct drm_i915_private *dev_priv) { /* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt */ @@ -1450,6 +1469,9 @@ static bool need_fbc_vtd_wa(struct drm_i915_private *dev_priv) return true; } + if (dmi_check_system(intel_fbc_vtd_detect)) + return true; + return false; }