Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Shawn C <shawn.c.lee@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Cooper Chiou <cooper.chiou@intel.com>,
	William Tseng <william.tseng@intel.com>,
	Jani Nikula <jani.nikula@intel.com>
Subject: [Intel-gfx] [PATCH v2] drm/i915/fbc: disable FBC on Nightfury board
Date: Fri, 11 Sep 2020 21:48:27 +0800	[thread overview]
Message-ID: <20200911134827.5542-1-shawn.c.lee@intel.com> (raw)
In-Reply-To: <20200827055129.26566-1-shawn.c.lee@intel.com>

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ä <ville.syrjala@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: William Tseng <william.tseng@intel.com>
Cc: Cooper Chiou <cooper.chiou@intel.com>
Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>

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 <drm/drm_fourcc.h>
+#include <linux/dmi.h>
 
 #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;
 }
 
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-09-11 13:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27  5:51 [Intel-gfx] [PATCH] drm/i915/fbc: disable FBC on Nightfury board Lee Shawn C
2020-08-27  6:31 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-08-27  8:28 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-09-11 13:48 ` Lee Shawn C [this message]
2020-09-11 14:21 ` [Intel-gfx] [PATCH] " Ville Syrjälä
2020-09-15 13:18   ` Lee, Shawn C
2020-09-15 13:35     ` Ville Syrjälä
2020-09-21 13:15       ` Lee, Shawn C
2020-09-11 14:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/fbc: disable FBC on Nightfury board (rev2) Patchwork
2020-09-11 17:47 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200911134827.5542-1-shawn.c.lee@intel.com \
    --to=shawn.c.lee@intel.com \
    --cc=cooper.chiou@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=william.tseng@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox