SKL will specialize it. Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_display.c | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 627b7e7..d979549 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -492,6 +492,7 @@ struct drm_i915_display_funcs { struct drm_i915_gem_object *obj, struct intel_engine_cs *ring, uint32_t flags); + void (*do_mmio_flip)(struct intel_crtc *crtc); void (*update_primary_plane)(struct drm_crtc *crtc, struct drm_framebuffer *fb, int x, int y); diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 5133ef9..07440ad 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -9552,7 +9552,7 @@ static bool use_mmio_flip(struct intel_engine_cs *ring, return ring != obj->ring; } -static void intel_do_mmio_flip(struct intel_crtc *intel_crtc) +static void ilk_do_mmio_flip(struct intel_crtc *intel_crtc) { struct drm_device *dev = intel_crtc->base.dev; struct drm_i915_private *dev_priv = dev->dev_private; @@ -9561,9 +9561,6 @@ static void intel_do_mmio_flip(struct intel_crtc *intel_crtc) struct drm_i915_gem_object *obj = intel_fb->obj; u32 dspcntr; u32 reg; - - intel_mark_page_flip_active(intel_crtc); - reg = DSPCNTR(intel_crtc->plane); dspcntr = I915_READ(reg); @@ -9579,6 +9576,15 @@ static void intel_do_mmio_flip(struct intel_crtc *intel_crtc) POSTING_READ(DSPSURF(intel_crtc->plane)); } +static void intel_do_mmio_flip(struct intel_crtc *intel_crtc) +{ + struct drm_device *dev = intel_crtc->base.dev; + struct drm_i915_private *dev_priv = dev->dev_private; + + intel_mark_page_flip_active(intel_crtc); + dev_priv->display.do_mmio_flip(intel_crtc); +} + static int intel_postpone_flip(struct drm_i915_gem_object *obj) { struct intel_engine_cs *ring; @@ -12694,6 +12700,9 @@ static void intel_init_display(struct drm_device *dev) break; } + if (INTEL_INFO(dev)->gen >= 5) + dev_priv->display.do_mmio_flip = ilk_do_mmio_flip; + intel_panel_init_backlight_funcs(dev); mutex_init(&dev_priv->pps_mutex); -- 1.8.3.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx