diff mbox

[2/3] drm/i915: Selection of MMIO vs CS flip at page flip time

Message ID 1401356415-13406-3-git-send-email-sourab.gupta@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

sourab.gupta@intel.com May 29, 2014, 9:40 a.m. UTC
From: Sourab Gupta <sourab.gupta@intel.com>

This patch enables the selection of MMIO flip vs CS flip at
page flip time. Earlier, this selection was done only at the
init time, so, once .queue_flip was set, it was used forever.
This patch enables this selection of flip mechanism at a time
when page flips is being issued.

Signed-off-by: Sourab Gupta <sourab.gupta@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c75a925..9dda965 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9427,7 +9427,13 @@  static int intel_crtc_page_flip(struct drm_crtc *crtc,
 	work->gtt_offset =
 		i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset;
 
-	ret = dev_priv->display.queue_flip(dev, crtc, fb, obj, ring, page_flip_flags);
+	if (intel_use_mmio_flip(dev))
+		ret = intel_queue_mmio_flip(dev, crtc,
+				fb, obj, ring, page_flip_flags);
+	else
+		ret = dev_priv->display.queue_flip(dev, crtc,
+				fb, obj, ring, page_flip_flags);
+
 	if (ret)
 		goto cleanup_unpin;
 
@@ -11652,9 +11658,6 @@  static void intel_init_display(struct drm_device *dev)
 		break;
 	}
 
-	if (intel_use_mmio_flip(dev))
-		dev_priv->display.queue_flip = intel_queue_mmio_flip;
-
 	intel_panel_init_backlight_funcs(dev);
 }