intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
To: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"chris@chris-wilson.co.uk" <chris@chris-wilson.co.uk>
Subject: Re: [PATCH] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
Date: Fri, 17 Jun 2016 19:02:57 +0000	[thread overview]
Message-ID: <1466190175.2901.67.camel@intel.com> (raw)
In-Reply-To: <1466181591-2984-1-git-send-email-chris@chris-wilson.co.uk>

Em Sex, 2016-06-17 às 17:39 +0100, Chris Wilson escreveu:
> Erratum SKL075: Display Flicker May Occur When Both VT-d And FBC Are
> Enabled
> 
> "Display flickering may occur when both FBC (Frame Buffer
> Compression)
> and VT - d (Intel® Virtualization Technology for Directed I/O) are
> enabled
> and in use by the display controller."

Ouch...

> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_fbc.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_fbc.c
> b/drivers/gpu/drm/i915/intel_fbc.c
> index fddba1eed5ad..e47785467220 100644
> --- a/drivers/gpu/drm/i915/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/intel_fbc.c
> @@ -1230,6 +1230,18 @@ void intel_fbc_init_pipe_state(struct
> drm_i915_private *dev_priv)
>  			dev_priv->fbc.visible_pipes_mask |= (1 <<
> crtc->pipe);
>  }
>  
> +static bool need_vtd_wa(struct drm_i915_private *dev_priv)

Notice we have a function with the exact same name in intel_display.c.

> +{
> +#ifdef CONFIG_INTEL_IOMMU
> +	if (!intel_iommu_gfx_mapped)
> +		return false;
> +
> +	if (INTEL_GEN(dev_priv) == 9)
> +		return true;
> +#endif
> +	return false;
> +}
> +
>  /**
>   * intel_fbc_init - Initialize FBC
>   * @dev_priv: the i915 device
> @@ -1247,6 +1259,12 @@ void intel_fbc_init(struct drm_i915_private
> *dev_priv)
>  	fbc->active = false;
>  	fbc->work.scheduled = false;
>  
> +	if (need_vtd_wa(dev_priv)) {
> +		struct intel_device_info *info =
> +			(struct intel_device_info *)&dev_priv->info;
> +		info->has_fbc = false;
> +	}

I just find this piece above a little not-so-beautiful and possibly
confusing for people debugging failures and/or IGT. Alternatives:

1 - Move the check to intel_fbc_can_choose(), so we can give a nice
no_fbc_reason. Problem: this would not be as efficient as what you
wrote.

2 - Move the check to intel_sanitize_fbc_option(), which is reviewed
but not merged yet. Problem: same as 1.

3 - Patch fbc_supported() and make the line below call fbc_supported()
instead of HAS_FBC(). Problem: we call it many times.

4 - Create dev_priv->fbc.is_supported (or some other meaningful name),
set it at init time, and make fbc_supported() use it (or just replace
fbc_supported() calls with the variable check).

All solutions above would probably require some adjustments to debugfs
and/or IGT (which relies on debugfs), but at least they wouldn't
surprise users or IGT runners with "why does it say SKL is not
supported by FBC?".

> +
>  	if (!HAS_FBC(dev_priv)) {
>  		fbc->no_fbc_reason = "unsupported by this chipset";
>  		return;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-06-17 19:02 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 21:17 [PATCH 0/4] Enable FBC on SKL, v3 Paulo Zanoni
2016-04-04 21:17 ` [PATCH 1/4] drm/i915/fbc: update busy_bits even for GTT and flip flushes Paulo Zanoni
2016-04-04 21:17 ` [PATCH 2/4] drm/i915/fbc: sanitize i915.enable_fbc during FBC init Paulo Zanoni
2016-04-06 14:19   ` Chris Wilson
2016-04-13 19:01     ` Paulo Zanoni
2016-04-25  8:10       ` Daniel Vetter
2016-04-04 21:17 ` [PATCH 3/4] drm/i915: use ORIGIN_CPU for frontbuffer invalidation on WC mmaps Paulo Zanoni
2016-04-25  8:15   ` [Intel-gfx] " Daniel Vetter
2016-04-25  8:20     ` Chris Wilson
2016-04-25  8:27       ` Daniel Vetter
2016-06-09 18:59         ` Paulo Zanoni
2016-06-17 17:46           ` Paulo Zanoni
2016-04-04 21:17 ` [PATCH 4/4] drm/i915/fbc: enable FBC on gen 9+ too Paulo Zanoni
2016-04-13 19:01   ` Paulo Zanoni
2016-04-25  8:28     ` Daniel Vetter
2016-06-17 16:39       ` [PATCH] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake Chris Wilson
2016-06-17 19:02         ` Zanoni, Paulo R [this message]
2016-06-17 19:23           ` chris
2016-06-17 19:34         ` Ville Syrjälä
2016-06-17 19:45         ` [PATCH v2] " Chris Wilson
2016-06-21  7:25           ` [PATCH v3] " Chris Wilson
2016-06-21 13:31             ` Daniel Vetter
2016-06-22 20:34               ` Chris Wilson
2016-06-22 22:18                 ` Zanoni, Paulo R
2016-06-22 22:15             ` Zanoni, Paulo R
2016-06-23  8:41               ` Jani Nikula
2016-04-04 21:18 ` [PATCH igt 1/3] kms_frontbuffer_tracking: prefer the BLT drawing method Paulo Zanoni
2016-04-04 21:18   ` [PATCH igt 2/3] kms_frontbuffer_tracking: recreate the FBs at every subtest Paulo Zanoni
2016-04-04 21:18   ` [PATCH igt 3/3] kms_frontbuffer_tracking: properly handle mixing GTT and WC mmaps Paulo Zanoni
2016-04-06  5:06 ` [PATCH 0/4] Enable FBC on SKL, v3 Thulasimani, Sivakumar
2016-04-06 13:54   ` Zanoni, Paulo R
2016-04-06 16:11     ` Thulasimani, Sivakumar
2016-04-14 14:53 ` ✓ Fi.CI.BAT: success for Enable FBC on SKL (rev4) Patchwork
2016-06-10  5:54 ` ✓ Ro.CI.BAT: success for Enable FBC on SKL (rev5) Patchwork
2016-06-17 16:45 ` ✗ Ro.CI.BAT: failure for Enable FBC on SKL (rev6) Patchwork
2016-06-18  5:48 ` ✗ Ro.CI.BAT: failure for Enable FBC on SKL (rev8) Patchwork
2016-06-21  7:30 ` ✗ Ro.CI.BAT: failure for Enable FBC on SKL (rev9) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2016-08-03 16:06 [PATCH] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake Chris Wilson
2016-08-03 16:27 ` kbuild test robot

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=1466190175.2901.67.camel@intel.com \
    --to=paulo.r.zanoni@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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;
as well as URLs for NNTP newsgroup(s).