[Intel-gfx] [PATCH 7/8] drm/i915/skl: Disallow tiling changes during page flip
Rodrigo Vivi
rodrigo.vivi at intel.com
Mon May 11 11:19:59 PDT 2015
From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
It would require watermark reprogramming which we do not want to do.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Sonika Jindal <sonika.jindal at intel.com>
Cc: Damien Lespiau <damien.lespiau at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he at intel.com)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 489a134..a2b7259 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10896,6 +10896,15 @@ void intel_check_page_flip(struct drm_device *dev, int pipe)
spin_unlock(&dev->event_lock);
}
+static bool intel_is_y_tiled(uint64_t fb_modifier)
+{
+ if (fb_modifier == I915_FORMAT_MOD_Y_TILED ||
+ fb_modifier == I915_FORMAT_MOD_Yf_TILED)
+ return true;
+
+ return false;
+}
+
static int intel_crtc_page_flip(struct drm_crtc *crtc,
struct drm_framebuffer *fb,
struct drm_pending_vblank_event *event,
@@ -11025,6 +11034,14 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
+ intel_crtc->dspaddr_offset;
if (mmio_flip) {
+ /* Temporarily embedding knowledge of disallowed tiling mode
+ * transition which would require watermark reprogramming.
+ */
+ if (intel_is_y_tiled(old_fb->modifier[0]) !=
+ intel_is_y_tiled(fb->modifier[0])) {
+ ret = -EINVAL;
+ goto cleanup_unpin;
+ }
ret = intel_queue_mmio_flip(dev, crtc, fb, obj, ring,
page_flip_flags);
if (ret)
--
2.1.0
More information about the Intel-gfx
mailing list