Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 2/2] drm/i915: Remove redundant DIRTYFB frontbuffer flushes
Date: Thu, 22 Apr 2021 21:29:57 +0300	[thread overview]
Message-ID: <20210422182957.10022-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20210422182957.10022-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The frontbuffer tracking code is supposed to handle plane
updates via ORIGIN_FLIP. Right now we're also doing internal
ORIGIN_DIRTYFB flushes for some reason. Can't see the point
so get rid of them.

In fact on GLK+ these are acively harmful and only risk angering
the hardware and causing FBC to scan out corrupted data. The
hardware flip nuke mechanism will take care of things for FBC.
With all the redundant manual nukes removed at least workloads
that don't do any frontbuffer rendering should be safe from
hitting that corruption.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index a10e26380ef3..bd48272311d2 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1718,8 +1718,6 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 	intel_plane_copy_uapi_to_hw_state(intel_state, intel_state,
 					  intel_crtc);
 
-	intel_frontbuffer_flush(to_intel_frontbuffer(fb), ORIGIN_DIRTYFB);
-
 	atomic_or(to_intel_plane(primary)->frontbuffer_bit,
 		  &to_intel_frontbuffer(fb)->bits);
 }
@@ -10633,7 +10631,6 @@ intel_prepare_plane_fb(struct drm_plane *_plane,
 		return ret;
 
 	i915_gem_object_wait_priority(obj, 0, &attr);
-	i915_gem_object_flush_frontbuffer(obj, ORIGIN_DIRTYFB);
 
 	if (!new_plane_state->uapi.fence) { /* implicit fencing */
 		struct dma_fence *fence;
-- 
2.26.3

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

  parent reply	other threads:[~2021-04-22 18:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22 18:29 [Intel-gfx] [PATCH 0/2] drm/i915/fbc: Avoid GLK+ FBC corruption Ville Syrjala
2021-04-22 18:29 ` [Intel-gfx] [PATCH 1/2] drm/i915/fbc: Don't nuke manually around flips Ville Syrjala
2021-04-22 18:29 ` Ville Syrjala [this message]
2021-04-22 18:52 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915/fbc: Avoid GLK+ FBC corruption Patchwork
2021-04-22 19:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-04-22 22:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-04-23  0:42 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915/fbc: Avoid GLK+ FBC corruption (rev2) Patchwork
2021-04-23  1:05 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-04-23  2:28 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=20210422182957.10022-3-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --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