public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [RFC 01/15] drm/i915: Test plane mask for sprite watermark updates properly
Date: Wed, 20 May 2015 19:12:13 -0700	[thread overview]
Message-ID: <1432174347-19138-2-git-send-email-matthew.d.roper@intel.com> (raw)
In-Reply-To: <1432174347-19138-1-git-send-email-matthew.d.roper@intel.com>

Our atomic transaction maintains a bitmask of planes that we need to
update sprite watermarks for once vblank evasion is complete.  When we
actually go to make use of that bitmask, we've been comparing against
the plane index rather than the plane mask; we need to update our
comparison to check '(1 << index)' rather than 'index' directly.

This bug was introduced by

        commit 32b7eeec4d1e861230b09d437e95d76c86ff4a68
        Author: Matt Roper <matthew.d.roper@intel.com>
        Date:   Wed Dec 24 07:59:06 2014 -0800

            drm/i915: Refactor work that can sleep out of commit (v7)

However we've been "lucky" and haven't actually run into problems caused
by this yet due to another bug in the code...we forgot to actually
remove the calls to intel_update_sprite_watermarks() from the low-level
plane programming functions that run under evasion.  We'll fix that
problem in a subsequent patch.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c97b496..1d70349 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13238,7 +13238,8 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc)
 		intel_post_enable_primary(crtc);
 
 	drm_for_each_legacy_plane(p, &dev->mode_config.plane_list)
-		if (intel_crtc->atomic.update_sprite_watermarks & drm_plane_index(p))
+		if (intel_crtc->atomic.update_sprite_watermarks &
+		    (1 << drm_plane_index(p)))
 			intel_update_sprite_watermarks(p, crtc, 0, 0, 0,
 						       false, false);
 
-- 
1.8.5.1

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

  reply	other threads:[~2015-05-21  2:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21  2:12 [RFC 00/15] Atomic watermark updates Matt Roper
2015-05-21  2:12 ` Matt Roper [this message]
2015-05-21  2:12 ` [RFC 02/15] drm/i915: Drop parameters to intel_update_sprite_watermarks() Matt Roper
2015-05-21  2:12 ` [RFC 03/15] drm/i915: Update sprite watermarks outside vblank evasion Matt Roper
2015-05-21 13:48   ` Ville Syrjälä
2015-05-21 14:11   ` Damien Lespiau
2015-05-21  2:12 ` [RFC 04/15] drm/i915: Make atomic use in-flight state for CRTC active value (v2) Matt Roper
2015-05-21  2:12 ` [RFC 05/15] drm/i915: Lookup CRTC for plane directly Matt Roper
2015-05-21 14:04   ` Ville Syrjälä
2015-05-21 15:48     ` Daniel Vetter
2015-05-21  2:12 ` [RFC 06/15] drm/i915: Eliminate usage of plane_wm_parameters from ILK-style WM code Matt Roper
2015-05-21  2:12 ` [RFC 07/15] drm/i915: Eliminate usage of pipe_wm_parameters from ILK-style WM Matt Roper
2015-05-21  2:12 ` [RFC 08/15] drm/i915: Refactor ilk_update_wm (v3) Matt Roper
2015-05-21  2:12 ` [RFC 09/15] drm/i915: Allow ILK watermark computation to use atomic state Matt Roper
2015-05-21  2:12 ` [RFC 10/15] drm/i915: Move active watermarks into CRTC state Matt Roper
2015-05-21  2:12 ` [RFC 11/15] drm/i915: Calculate pipe watermark values during atomic check Matt Roper
2015-05-21  2:12 ` [RFC 12/15] drm/i915: Actually use pre-computer watermark values (!!SQUASHME) Matt Roper
2015-05-21 13:08   ` Ville Syrjälä
2015-05-21  2:12 ` [RFC 13/15] drm/i915: Introduce intel_schedule_vblank_job() Matt Roper
2015-05-21 13:20   ` Ville Syrjälä
2015-05-21 15:52     ` Daniel Vetter
2015-05-21  2:12 ` [RFC 14/15] drm/i915: Program atomic watermarks via vblank job Matt Roper
2015-05-25 15:57   ` G, Pallavi
2015-05-21  2:12 ` [RFC 15/15] drm/i915: Add intermediate watermarks Matt Roper

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=1432174347-19138-2-git-send-email-matthew.d.roper@intel.com \
    --to=matthew.d.roper@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