aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2015-03-18 18:04:47 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-20 06:48:22 -0400
commit08fd59fcc8c0f9732214fb93ad5cb09f67cb1124 (patch)
tree8bc245df2caf0f086a4780180d6ba3863f38e9d1
parent9ca3ba011b9f1bf7fc73a4e7dc0c9edec2aeb149 (diff)
drm/i915: Move vblank wait determination to 'check' phase
Determining whether we'll need to wait for vblanks is something we should determine during the atomic 'check' phase, not the 'commit' phase. Note that we only set these bits in the branch of 'check' where intel_crtc->active is true so that we don't try to wait on a disabled CRTC. The whole 'wait for vblank after update' flag should go away in the future, once we start handling watermarks in a proper atomic manner. This regression has been introduced in commit 2fdd7def16dd7580f297827930126c16b152ec11 Author: Matt Roper <matthew.d.roper@intel.com> Date: Wed Mar 4 10:49:04 2015 -0800 drm/i915: Don't clobber plane state on internal disables Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Root-cause-analysis-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89550 Testcase: igt/pm_rpm/legacy-planes Testcase: igt/pm_rpm/legacy-planes-dpms Testcase: igt/pm_rpm/universal-planes Testcase: igt/pm_rpm/universal-planes-dpms Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_sprite.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 03c2d4c11518..cd531fa997de 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -750,13 +750,6 @@ ivb_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc)
750 I915_WRITE(SPRSURF(pipe), 0); 750 I915_WRITE(SPRSURF(pipe), 0);
751 751
752 intel_flush_primary_plane(dev_priv, intel_crtc->plane); 752 intel_flush_primary_plane(dev_priv, intel_crtc->plane);
753
754 /*
755 * Avoid underruns when disabling the sprite.
756 * FIXME remove once watermark updates are done properly.
757 */
758 intel_crtc->atomic.wait_vblank = true;
759 intel_crtc->atomic.update_sprite_watermarks |= (1 << drm_plane_index(plane));
760} 753}
761 754
762static int 755static int
@@ -941,13 +934,6 @@ ilk_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc)
941 I915_WRITE(DVSSURF(pipe), 0); 934 I915_WRITE(DVSSURF(pipe), 0);
942 935
943 intel_flush_primary_plane(dev_priv, intel_crtc->plane); 936 intel_flush_primary_plane(dev_priv, intel_crtc->plane);
944
945 /*
946 * Avoid underruns when disabling the sprite.
947 * FIXME remove once watermark updates are done properly.
948 */
949 intel_crtc->atomic.wait_vblank = true;
950 intel_crtc->atomic.update_sprite_watermarks |= (1 << drm_plane_index(plane));
951} 937}
952 938
953/** 939/**
@@ -1266,6 +1252,16 @@ finish:
1266 plane->state->fb->modifier[0] != 1252 plane->state->fb->modifier[0] !=
1267 state->base.fb->modifier[0]) 1253 state->base.fb->modifier[0])
1268 intel_crtc->atomic.update_wm = true; 1254 intel_crtc->atomic.update_wm = true;
1255
1256 if (!state->visible) {
1257 /*
1258 * Avoid underruns when disabling the sprite.
1259 * FIXME remove once watermark updates are done properly.
1260 */
1261 intel_crtc->atomic.wait_vblank = true;
1262 intel_crtc->atomic.update_sprite_watermarks |=
1263 (1 << drm_plane_index(plane));
1264 }
1269 } 1265 }
1270 1266
1271 return 0; 1267 return 0;