From patchwork Thu Aug 27 05:51:29 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: 11739983 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 1260A14E5 for ; Thu, 27 Aug 2020 05:52:52 +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 E5024207BC for ; Thu, 27 Aug 2020 05:52:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5024207BC 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 532D76E048; Thu, 27 Aug 2020 05:52:50 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id F0B476E048 for ; Thu, 27 Aug 2020 05:52:48 +0000 (UTC) IronPort-SDR: F2VVkImzM80x7k4agGCUL6i4Ph/lLbP9aY+aT3hYat6x4rM5nQMvy+e7wvIZ4Vr0igvsQBkErn PqKPf12NBFow== X-IronPort-AV: E=McAfee;i="6000,8403,9725"; a="135975488" X-IronPort-AV: E=Sophos;i="5.76,358,1592895600"; d="scan'208";a="135975488" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2020 22:52:48 -0700 IronPort-SDR: 3aQ8uKRyT+7A86EePfEdv9tiAmJsj8QhZSvB1LUk0TUza/bBsaq8Nbg/qERW0+cXKXd08JwjiZ CiNaCDB1WMFQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,358,1592895600"; d="scan'208";a="403301003" Received: from shawnle1-build-machine.itwn.intel.com ([10.5.253.9]) by fmsmga001.fm.intel.com with ESMTP; 26 Aug 2020 22:52:47 -0700 From: Lee Shawn C To: intel-gfx@lists.freedesktop.org Date: Thu, 27 Aug 2020 13:51:29 +0800 Message-Id: <20200827055129.26566-1-shawn.c.lee@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] 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 drm/i915/fbc: disable FBC on Nightfury board 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 --- 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; }