public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip()
@ 2014-10-24 23:11 Damien Lespiau
  2014-10-24 23:11 ` [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code Damien Lespiau
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Damien Lespiau @ 2014-10-24 23:11 UTC (permalink / raw)
  To: intel-gfx

use_mmio_flip() makes sure we only enable MMIO flips on gen5+. So we
don't need to take into account older devices.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 7d891e5..5133ef9 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9567,12 +9567,11 @@ static void intel_do_mmio_flip(struct intel_crtc *intel_crtc)
 	reg = DSPCNTR(intel_crtc->plane);
 	dspcntr = I915_READ(reg);
 
-	if (INTEL_INFO(dev)->gen >= 4) {
-		if (obj->tiling_mode != I915_TILING_NONE)
-			dspcntr |= DISPPLANE_TILED;
-		else
-			dspcntr &= ~DISPPLANE_TILED;
-	}
+	if (obj->tiling_mode != I915_TILING_NONE)
+		dspcntr |= DISPPLANE_TILED;
+	else
+		dspcntr &= ~DISPPLANE_TILED;
+
 	I915_WRITE(reg, dspcntr);
 
 	I915_WRITE(DSPSURF(intel_crtc->plane),
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code
  2014-10-24 23:11 [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip() Damien Lespiau
@ 2014-10-24 23:11 ` Damien Lespiau
  2014-10-27  9:16   ` Daniel Vetter
  2014-10-24 23:11 ` [PATCH 3/4] drm/i915: Add space between variable declarations and code Damien Lespiau
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Damien Lespiau @ 2014-10-24 23:11 UTC (permalink / raw)
  To: intel-gfx

SKL will specialize it.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/4] drm/i915: Add space between variable declarations and code
  2014-10-24 23:11 [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip() Damien Lespiau
  2014-10-24 23:11 ` [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code Damien Lespiau
@ 2014-10-24 23:11 ` Damien Lespiau
  2014-10-25  9:03   ` Chris Wilson
  2014-10-24 23:11 ` [PATCH 4/4] drm/i915/skl: Implement do_mmio_flip for SKL Damien Lespiau
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Damien Lespiau @ 2014-10-24 23:11 UTC (permalink / raw)
  To: intel-gfx

OCD kicks in again...

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 07440ad..dd071c6 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9561,6 +9561,7 @@ static void ilk_do_mmio_flip(struct intel_crtc *intel_crtc)
 	struct drm_i915_gem_object *obj = intel_fb->obj;
 	u32 dspcntr;
 	u32 reg;
+
 	reg = DSPCNTR(intel_crtc->plane);
 	dspcntr = I915_READ(reg);
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 4/4] drm/i915/skl: Implement do_mmio_flip for SKL
  2014-10-24 23:11 [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip() Damien Lespiau
  2014-10-24 23:11 ` [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code Damien Lespiau
  2014-10-24 23:11 ` [PATCH 3/4] drm/i915: Add space between variable declarations and code Damien Lespiau
@ 2014-10-24 23:11 ` Damien Lespiau
  2014-10-25 10:37   ` shuang.he
  2014-10-25  9:01 ` [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip() Chris Wilson
  2014-10-25  9:05 ` Chris Wilson
  4 siblings, 1 reply; 18+ messages in thread
From: Damien Lespiau @ 2014-10-24 23:11 UTC (permalink / raw)
  To: intel-gfx

Nothing special to note. We mirror what is done for other platforms, but
using the SKL plane registers.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index dd071c6..c09d009 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9552,6 +9552,28 @@ static bool use_mmio_flip(struct intel_engine_cs *ring,
 		return ring != obj->ring;
 }
 
+static void skl_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;
+	struct intel_framebuffer *intel_fb =
+		to_intel_framebuffer(intel_crtc->base.primary->fb);
+	struct drm_i915_gem_object *obj = intel_fb->obj;
+	const int pipe = intel_crtc->pipe;
+	u32 val;
+
+	val = I915_READ(PLANE_CTL(pipe, 0));
+
+	val &= ~PLANE_CTL_TILED_MASK;
+	if (obj->tiling_mode == I915_TILING_X)
+		val |= PLANE_CTL_TILED_X;
+
+	I915_WRITE(PLANE_CTL(pipe, 0), val);
+
+	I915_WRITE(PLANE_SURF(pipe, 0), intel_crtc->unpin_work->gtt_offset);
+	POSTING_READ(PLANE_SURF(pipe, 0));
+}
+
 static void ilk_do_mmio_flip(struct intel_crtc *intel_crtc)
 {
 	struct drm_device *dev = intel_crtc->base.dev;
@@ -12701,7 +12723,9 @@ static void intel_init_display(struct drm_device *dev)
 		break;
 	}
 
-	if (INTEL_INFO(dev)->gen >= 5)
+	if (INTEL_INFO(dev)->gen >= 9)
+		dev_priv->display.do_mmio_flip = skl_do_mmio_flip;
+	else if (INTEL_INFO(dev)->gen >= 5)
 		dev_priv->display.do_mmio_flip = ilk_do_mmio_flip;
 
 	intel_panel_init_backlight_funcs(dev);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip()
  2014-10-24 23:11 [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip() Damien Lespiau
                   ` (2 preceding siblings ...)
  2014-10-24 23:11 ` [PATCH 4/4] drm/i915/skl: Implement do_mmio_flip for SKL Damien Lespiau
@ 2014-10-25  9:01 ` Chris Wilson
  2014-10-25  9:04   ` Chris Wilson
  2014-10-25  9:05 ` Chris Wilson
  4 siblings, 1 reply; 18+ messages in thread
From: Chris Wilson @ 2014-10-25  9:01 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: intel-gfx

On Sat, Oct 25, 2014 at 12:11:11AM +0100, Damien Lespiau wrote:
> use_mmio_flip() makes sure we only enable MMIO flips on gen5+. So we
> don't need to take into account older devices.

Honestly, I prefer to keep the gen test here (around touching gen
specifc portions of common registers). It stops it later biting
back if we relax mmioflip to run on older gen.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/4] drm/i915: Add space between variable declarations and code
  2014-10-24 23:11 ` [PATCH 3/4] drm/i915: Add space between variable declarations and code Damien Lespiau
@ 2014-10-25  9:03   ` Chris Wilson
  2014-10-25 11:05     ` [PATCH 3/4 v2] " Damien Lespiau
  0 siblings, 1 reply; 18+ messages in thread
From: Chris Wilson @ 2014-10-25  9:03 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: intel-gfx

On Sat, Oct 25, 2014 at 12:11:13AM +0100, Damien Lespiau wrote:
> OCD kicks in again...
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 07440ad..dd071c6 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9561,6 +9561,7 @@ static void ilk_do_mmio_flip(struct intel_crtc *intel_crtc)
>  	struct drm_i915_gem_object *obj = intel_fb->obj;
>  	u32 dspcntr;
>  	u32 reg;
> +
>  	reg = DSPCNTR(intel_crtc->plane);

ocd would have moved it into the variable block and made it const. ;-)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip()
  2014-10-25  9:01 ` [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip() Chris Wilson
@ 2014-10-25  9:04   ` Chris Wilson
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Wilson @ 2014-10-25  9:04 UTC (permalink / raw)
  To: Damien Lespiau, intel-gfx

On Sat, Oct 25, 2014 at 10:01:12AM +0100, Chris Wilson wrote:
> On Sat, Oct 25, 2014 at 12:11:11AM +0100, Damien Lespiau wrote:
> > use_mmio_flip() makes sure we only enable MMIO flips on gen5+. So we
> > don't need to take into account older devices.
> 
> Honestly, I prefer to keep the gen test here (around touching gen
> specifc portions of common registers). It stops it later biting
> back if we relax mmioflip to run on older gen.

On the other hand, DSPSURF is gen4+. Ok, might as put a comment in there
that it is gen4+ specific and remove the check.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip()
  2014-10-24 23:11 [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip() Damien Lespiau
                   ` (3 preceding siblings ...)
  2014-10-25  9:01 ` [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip() Chris Wilson
@ 2014-10-25  9:05 ` Chris Wilson
  4 siblings, 0 replies; 18+ messages in thread
From: Chris Wilson @ 2014-10-25  9:05 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: intel-gfx

On Sat, Oct 25, 2014 at 12:11:11AM +0100, Damien Lespiau wrote:
> use_mmio_flip() makes sure we only enable MMIO flips on gen5+. So we
> don't need to take into account older devices.

Since the series accomplishes everything I just whined about in the
first patch, I guess I have to:

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/4] drm/i915/skl: Implement do_mmio_flip for SKL
  2014-10-24 23:11 ` [PATCH 4/4] drm/i915/skl: Implement do_mmio_flip for SKL Damien Lespiau
@ 2014-10-25 10:37   ` shuang.he
  0 siblings, 0 replies; 18+ messages in thread
From: shuang.he @ 2014-10-25 10:37 UTC (permalink / raw)
  To: shuang.he, intel-gfx, damien.lespiau

Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
-------------------------------------Summary-------------------------------------
Platform: baseline_drm_intel_nightly_pass_rate->patch_applied_pass_rate
BYT: pass/total=273/273->273/273
PNV: pass/total=271/271->271/271
ILK: pass/total=269/271->271/271
IVB: pass/total=271/271->271/271
SNB: pass/total=271/271->271/271
HSW: pass/total=271/271->271/271
BDW: pass/total=271/271->271/271
-------------------------------------Detailed-------------------------------------
test_platform: test_suite, test_case, result_with_drm_intel_nightly->result_with_patch_applied
ILK: Intel_gpu_tools, igt_gem_concurrent_blit_gtt-bcs-gpu-read-after-write-forked, TIMEOUT->PASS
ILK: Intel_gpu_tools, igt_gem_concurrent_blit_gttX-bcs-gpu-read-after-write-forked, TIMEOUT->PASS

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 3/4 v2] drm/i915: Add space between variable declarations and code
  2014-10-25  9:03   ` Chris Wilson
@ 2014-10-25 11:05     ` Damien Lespiau
  0 siblings, 0 replies; 18+ messages in thread
From: Damien Lespiau @ 2014-10-25 11:05 UTC (permalink / raw)
  To: intel-gfx

OCD kicks in again...

v2: Chris out-OCDed me and asked for a const.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 07440ad..052c6ae 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9559,9 +9559,9 @@ static void ilk_do_mmio_flip(struct intel_crtc *intel_crtc)
 	struct intel_framebuffer *intel_fb =
 		to_intel_framebuffer(intel_crtc->base.primary->fb);
 	struct drm_i915_gem_object *obj = intel_fb->obj;
+	const u32 reg = DSPCNTR(intel_crtc->plane);
 	u32 dspcntr;
-	u32 reg;
-	reg = DSPCNTR(intel_crtc->plane);
+
 	dspcntr = I915_READ(reg);
 
 	if (obj->tiling_mode != I915_TILING_NONE)
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code
  2014-10-24 23:11 ` [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code Damien Lespiau
@ 2014-10-27  9:16   ` Daniel Vetter
  2014-10-27 11:08     ` Damien Lespiau
  0 siblings, 1 reply; 18+ messages in thread
From: Daniel Vetter @ 2014-10-27  9:16 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: intel-gfx

On Sat, Oct 25, 2014 at 12:11:12AM +0100, Damien Lespiau wrote:
> SKL will specialize it.
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

So with atomic I'd expect that we'd have one giant mmio_flip driver
function and that just calls into the relevant platform/plane update
hooks. Gustavo&Ville are working on that monster.

Now this here seems to add another incarnation. Can't I have just one
please?

Thanks, Daniel
> ---
>  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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code
  2014-10-27  9:16   ` Daniel Vetter
@ 2014-10-27 11:08     ` Damien Lespiau
  2014-10-27 14:25       ` Daniel Vetter
  0 siblings, 1 reply; 18+ messages in thread
From: Damien Lespiau @ 2014-10-27 11:08 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx, gustavo.padovan

On Mon, Oct 27, 2014 at 10:16:06AM +0100, Daniel Vetter wrote:
> On Sat, Oct 25, 2014 at 12:11:12AM +0100, Damien Lespiau wrote:
> > SKL will specialize it.
> > 
> > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> 
> So with atomic I'd expect that we'd have one giant mmio_flip driver
> function and that just calls into the relevant platform/plane update
> hooks. Gustavo&Ville are working on that monster.
> 
> Now this here seems to add another incarnation. Can't I have just one
> please?

I'd be happy to have that, but are we talking before 3.19? SKL doesn't
flip at all without MMIO flips, so we'll need to have of of those by
3.19.

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code
  2014-10-27 11:08     ` Damien Lespiau
@ 2014-10-27 14:25       ` Daniel Vetter
  2014-10-27 14:38         ` Ander Conselvan de Oliveira
  0 siblings, 1 reply; 18+ messages in thread
From: Daniel Vetter @ 2014-10-27 14:25 UTC (permalink / raw)
  To: Damien Lespiau, Ville Syrjälä,
	ander.conselvan.de.oliveira
  Cc: intel-gfx, gustavo.padovan

On Mon, Oct 27, 2014 at 11:08:20AM +0000, Damien Lespiau wrote:
> On Mon, Oct 27, 2014 at 10:16:06AM +0100, Daniel Vetter wrote:
> > On Sat, Oct 25, 2014 at 12:11:12AM +0100, Damien Lespiau wrote:
> > > SKL will specialize it.
> > > 
> > > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > 
> > So with atomic I'd expect that we'd have one giant mmio_flip driver
> > function and that just calls into the relevant platform/plane update
> > hooks. Gustavo&Ville are working on that monster.
> > 
> > Now this here seems to add another incarnation. Can't I have just one
> > please?
> 
> I'd be happy to have that, but are we talking before 3.19? SKL doesn't
> flip at all without MMIO flips, so we'll need to have of of those by
> 3.19.

It shouldn't be a lot of fuzz really since it will more or less amount to
calling the same low-level plane update functions for all of them. Or I'm
confused about all this. Also I think Ander is starting to rework
mmio_flip this week.

Ville, Ander?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code
  2014-10-27 14:25       ` Daniel Vetter
@ 2014-10-27 14:38         ` Ander Conselvan de Oliveira
  2014-10-27 14:47           ` Ville Syrjälä
  0 siblings, 1 reply; 18+ messages in thread
From: Ander Conselvan de Oliveira @ 2014-10-27 14:38 UTC (permalink / raw)
  To: Daniel Vetter, Damien Lespiau, Ville Syrjälä,
	ander.conselvan.de.oliveira
  Cc: intel-gfx, gustavo.padovan

On 10/27/2014 04:25 PM, Daniel Vetter wrote:
> On Mon, Oct 27, 2014 at 11:08:20AM +0000, Damien Lespiau wrote:
>> On Mon, Oct 27, 2014 at 10:16:06AM +0100, Daniel Vetter wrote:
>>> On Sat, Oct 25, 2014 at 12:11:12AM +0100, Damien Lespiau wrote:
>>>> SKL will specialize it.
>>>>
>>>> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
>>>
>>> So with atomic I'd expect that we'd have one giant mmio_flip driver
>>> function and that just calls into the relevant platform/plane update
>>> hooks. Gustavo&Ville are working on that monster.
>>>
>>> Now this here seems to add another incarnation. Can't I have just one
>>> please?
>>
>> I'd be happy to have that, but are we talking before 3.19? SKL doesn't
>> flip at all without MMIO flips, so we'll need to have of of those by
>> 3.19.
>
> It shouldn't be a lot of fuzz really since it will more or less amount to
> calling the same low-level plane update functions for all of them. Or I'm
> confused about all this. Also I think Ander is starting to rework
> mmio_flip this week.

I did send a patch [1] related to mmio flip last week, but I wasn't 
aware of the grand plan for that "giant mmio_flip driver function". I'm 
learning the details as I go, so I should probably look into that, but 
at least for now I wasn't planning to much more than that patch.

Paulo gave me some comments (off-list, due to the mailman issues) that I 
plan to fix and then send a v2.

  [1] 
http://lists.freedesktop.org/archives/intel-gfx/2014-October/053792.html

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code
  2014-10-27 14:38         ` Ander Conselvan de Oliveira
@ 2014-10-27 14:47           ` Ville Syrjälä
  2014-10-27 14:53             ` Damien Lespiau
  0 siblings, 1 reply; 18+ messages in thread
From: Ville Syrjälä @ 2014-10-27 14:47 UTC (permalink / raw)
  To: Ander Conselvan de Oliveira
  Cc: ander.conselvan.de.oliveira, gustavo.padovan, intel-gfx

On Mon, Oct 27, 2014 at 04:38:04PM +0200, Ander Conselvan de Oliveira wrote:
> On 10/27/2014 04:25 PM, Daniel Vetter wrote:
> > On Mon, Oct 27, 2014 at 11:08:20AM +0000, Damien Lespiau wrote:
> >> On Mon, Oct 27, 2014 at 10:16:06AM +0100, Daniel Vetter wrote:
> >>> On Sat, Oct 25, 2014 at 12:11:12AM +0100, Damien Lespiau wrote:
> >>>> SKL will specialize it.
> >>>>
> >>>> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> >>>
> >>> So with atomic I'd expect that we'd have one giant mmio_flip driver
> >>> function and that just calls into the relevant platform/plane update
> >>> hooks. Gustavo&Ville are working on that monster.
> >>>
> >>> Now this here seems to add another incarnation. Can't I have just one
> >>> please?
> >>
> >> I'd be happy to have that, but are we talking before 3.19? SKL doesn't
> >> flip at all without MMIO flips, so we'll need to have of of those by
> >> 3.19.
> >
> > It shouldn't be a lot of fuzz really since it will more or less amount to
> > calling the same low-level plane update functions for all of them. Or I'm
> > confused about all this. Also I think Ander is starting to rework
> > mmio_flip this week.
> 
> I did send a patch [1] related to mmio flip last week, but I wasn't 
> aware of the grand plan for that "giant mmio_flip driver function". I'm 
> learning the details as I go, so I should probably look into that, but 
> at least for now I wasn't planning to much more than that patch.
> 
> Paulo gave me some comments (off-list, due to the mailman issues) that I 
> plan to fix and then send a v2.
> 
>   [1] 
> http://lists.freedesktop.org/archives/intel-gfx/2014-October/053792.html

Yeah so this a step in the direction Daniel mentioned. The other part is
making the primary plane update func more sane, and split it to
check/commit phases, which is what Gustavo is working on.

Once all that's done we can add the vblank evade to the primary plane
update commit hook. And then there shouldn't be much difference in the mmio
flip vs. plane update anymore so we should be able to just call the primary
plane funcs for mmio flip, with the commit done from the wq.

And the end result is then quite close to what we want for nuclear flip.
Then we "just" expand it to cover multiple planes in one go and we're
almost there :)

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code
  2014-10-27 14:47           ` Ville Syrjälä
@ 2014-10-27 14:53             ` Damien Lespiau
  2014-10-28  7:25               ` Daniel Vetter
  0 siblings, 1 reply; 18+ messages in thread
From: Damien Lespiau @ 2014-10-27 14:53 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: ander.conselvan.de.oliveira, intel-gfx, gustavo.padovan

On Mon, Oct 27, 2014 at 04:47:53PM +0200, Ville Syrjälä wrote:
> On Mon, Oct 27, 2014 at 04:38:04PM +0200, Ander Conselvan de Oliveira wrote:
> > On 10/27/2014 04:25 PM, Daniel Vetter wrote:
> > > On Mon, Oct 27, 2014 at 11:08:20AM +0000, Damien Lespiau wrote:
> > >> On Mon, Oct 27, 2014 at 10:16:06AM +0100, Daniel Vetter wrote:
> > >>> On Sat, Oct 25, 2014 at 12:11:12AM +0100, Damien Lespiau wrote:
> > >>>> SKL will specialize it.
> > >>>>
> > >>>> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > >>>
> > >>> So with atomic I'd expect that we'd have one giant mmio_flip driver
> > >>> function and that just calls into the relevant platform/plane update
> > >>> hooks. Gustavo&Ville are working on that monster.
> > >>>
> > >>> Now this here seems to add another incarnation. Can't I have just one
> > >>> please?
> > >>
> > >> I'd be happy to have that, but are we talking before 3.19? SKL doesn't
> > >> flip at all without MMIO flips, so we'll need to have of of those by
> > >> 3.19.
> > >
> > > It shouldn't be a lot of fuzz really since it will more or less amount to
> > > calling the same low-level plane update functions for all of them. Or I'm
> > > confused about all this. Also I think Ander is starting to rework
> > > mmio_flip this week.
> > 
> > I did send a patch [1] related to mmio flip last week, but I wasn't 
> > aware of the grand plan for that "giant mmio_flip driver function". I'm 
> > learning the details as I go, so I should probably look into that, but 
> > at least for now I wasn't planning to much more than that patch.
> > 
> > Paulo gave me some comments (off-list, due to the mailman issues) that I 
> > plan to fix and then send a v2.
> > 
> >   [1] 
> > http://lists.freedesktop.org/archives/intel-gfx/2014-October/053792.html
> 
> Yeah so this a step in the direction Daniel mentioned. The other part is
> making the primary plane update func more sane, and split it to
> check/commit phases, which is what Gustavo is working on.
> 
> Once all that's done we can add the vblank evade to the primary plane
> update commit hook. And then there shouldn't be much difference in the mmio
> flip vs. plane update anymore so we should be able to just call the primary
> plane funcs for mmio flip, with the commit done from the wq.
> 
> And the end result is then quite close to what we want for nuclear flip.
> Then we "just" expand it to cover multiple planes in one go and we're
> almost there :)

Sounds like a wonderful future, but in the meantime, it'd be nice to
have flips working on SKL. Maybe with a comment on top of the vfunc
explaning it should be removed once we have MMIO updates for flips built
on top the plane vfuncs?

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code
  2014-10-27 14:53             ` Damien Lespiau
@ 2014-10-28  7:25               ` Daniel Vetter
  2014-10-28  7:42                 ` Damien Lespiau
  0 siblings, 1 reply; 18+ messages in thread
From: Daniel Vetter @ 2014-10-28  7:25 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: ander.conselvan.de.oliveira, intel-gfx, gustavo.padovan

On Mon, Oct 27, 2014 at 02:53:49PM +0000, Damien Lespiau wrote:
> On Mon, Oct 27, 2014 at 04:47:53PM +0200, Ville Syrjälä wrote:
> > On Mon, Oct 27, 2014 at 04:38:04PM +0200, Ander Conselvan de Oliveira wrote:
> > > On 10/27/2014 04:25 PM, Daniel Vetter wrote:
> > > > On Mon, Oct 27, 2014 at 11:08:20AM +0000, Damien Lespiau wrote:
> > > >> On Mon, Oct 27, 2014 at 10:16:06AM +0100, Daniel Vetter wrote:
> > > >>> On Sat, Oct 25, 2014 at 12:11:12AM +0100, Damien Lespiau wrote:
> > > >>>> SKL will specialize it.
> > > >>>>
> > > >>>> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > > >>>
> > > >>> So with atomic I'd expect that we'd have one giant mmio_flip driver
> > > >>> function and that just calls into the relevant platform/plane update
> > > >>> hooks. Gustavo&Ville are working on that monster.
> > > >>>
> > > >>> Now this here seems to add another incarnation. Can't I have just one
> > > >>> please?
> > > >>
> > > >> I'd be happy to have that, but are we talking before 3.19? SKL doesn't
> > > >> flip at all without MMIO flips, so we'll need to have of of those by
> > > >> 3.19.
> > > >
> > > > It shouldn't be a lot of fuzz really since it will more or less amount to
> > > > calling the same low-level plane update functions for all of them. Or I'm
> > > > confused about all this. Also I think Ander is starting to rework
> > > > mmio_flip this week.
> > > 
> > > I did send a patch [1] related to mmio flip last week, but I wasn't 
> > > aware of the grand plan for that "giant mmio_flip driver function". I'm 
> > > learning the details as I go, so I should probably look into that, but 
> > > at least for now I wasn't planning to much more than that patch.
> > > 
> > > Paulo gave me some comments (off-list, due to the mailman issues) that I 
> > > plan to fix and then send a v2.
> > > 
> > >   [1] 
> > > http://lists.freedesktop.org/archives/intel-gfx/2014-October/053792.html
> > 
> > Yeah so this a step in the direction Daniel mentioned. The other part is
> > making the primary plane update func more sane, and split it to
> > check/commit phases, which is what Gustavo is working on.
> > 
> > Once all that's done we can add the vblank evade to the primary plane
> > update commit hook. And then there shouldn't be much difference in the mmio
> > flip vs. plane update anymore so we should be able to just call the primary
> > plane funcs for mmio flip, with the commit done from the wq.
> > 
> > And the end result is then quite close to what we want for nuclear flip.
> > Then we "just" expand it to cover multiple planes in one go and we're
> > almost there :)
> 
> Sounds like a wonderful future, but in the meantime, it'd be nice to
> have flips working on SKL. Maybe with a comment on top of the vfunc
> explaning it should be removed once we have MMIO updates for flips built
> on top the plane vfuncs?

Can't we copypaste the mmioflip for skl for now with a big comment stating
that this should all disappear? The current mmio flip is for gen4+ too
after all ...

I don't some temporary hacks too much, but going overboard with the design
with vfuncs and stuff seems like too much.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code
  2014-10-28  7:25               ` Daniel Vetter
@ 2014-10-28  7:42                 ` Damien Lespiau
  0 siblings, 0 replies; 18+ messages in thread
From: Damien Lespiau @ 2014-10-28  7:42 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: ander.conselvan.de.oliveira, intel-gfx, gustavo.padovan

On Tue, Oct 28, 2014 at 08:25:38AM +0100, Daniel Vetter wrote:
> Can't we copypaste the mmioflip for skl for now with a big comment stating
> that this should all disappear? The current mmio flip is for gen4+ too
> after all ...

We totally can!

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-10-28  7:42 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-24 23:11 [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip() Damien Lespiau
2014-10-24 23:11 ` [PATCH 2/4] drm/i915: Introduce a vfunc for platform-specfic MMIO flip code Damien Lespiau
2014-10-27  9:16   ` Daniel Vetter
2014-10-27 11:08     ` Damien Lespiau
2014-10-27 14:25       ` Daniel Vetter
2014-10-27 14:38         ` Ander Conselvan de Oliveira
2014-10-27 14:47           ` Ville Syrjälä
2014-10-27 14:53             ` Damien Lespiau
2014-10-28  7:25               ` Daniel Vetter
2014-10-28  7:42                 ` Damien Lespiau
2014-10-24 23:11 ` [PATCH 3/4] drm/i915: Add space between variable declarations and code Damien Lespiau
2014-10-25  9:03   ` Chris Wilson
2014-10-25 11:05     ` [PATCH 3/4 v2] " Damien Lespiau
2014-10-24 23:11 ` [PATCH 4/4] drm/i915/skl: Implement do_mmio_flip for SKL Damien Lespiau
2014-10-25 10:37   ` shuang.he
2014-10-25  9:01 ` [PATCH 1/4] drm/i915: Remove unnecessary test on the gen in intel_do_mmio_flip() Chris Wilson
2014-10-25  9:04   ` Chris Wilson
2014-10-25  9:05 ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox