diff mbox

[26/43] drm/i915/bdw: Always use MMIO flips with Execlists

Message ID 1406217891-8912-27-git-send-email-thomas.daniel@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Daniel July 24, 2014, 4:04 p.m. UTC
From: Oscar Mateo <oscar.mateo@intel.com>

The normal flip function places things in the ring in the legacy
way, so we either fix that or force MMIO flips always as we do in
this patch.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c |    2 ++
 drivers/gpu/drm/i915/intel_lrc.c     |    3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Daniel Vetter Aug. 11, 2014, 8:34 p.m. UTC | #1
On Thu, Jul 24, 2014 at 05:04:34PM +0100, Thomas Daniel wrote:
> From: Oscar Mateo <oscar.mateo@intel.com>
> 
> The normal flip function places things in the ring in the legacy
> way, so we either fix that or force MMIO flips always as we do in
> this patch.
> 
> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    2 ++
>  drivers/gpu/drm/i915/intel_lrc.c     |    3 ++-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 5ed6a1a..8129af4 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9482,6 +9482,8 @@ static bool use_mmio_flip(struct intel_engine_cs *ring,
>  		return false;
>  	else if (i915.use_mmio_flip > 0)
>  		return true;
> +	else if (i915.enable_execlists)
> +		return true;
>  	else
>  		return ring != obj->ring;
>  }
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index cd834b3..0a04c03 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -83,7 +83,8 @@ int intel_sanitize_enable_execlists(struct drm_device *dev, int enable_execlists
>  	if (enable_execlists == 0)
>  		return 0;
>  
> -	if (HAS_LOGICAL_RING_CONTEXTS(dev) && USES_PPGTT(dev))
> +	if (HAS_LOGICAL_RING_CONTEXTS(dev) && USES_PPGTT(dev) &&
> +			i915.use_mmio_flip >= 0)

Almost every patch gets the alignment wrong somewhere. Not terribly
amused.
-Daniel

>  		return 1;
>  
>  	return 0;
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5ed6a1a..8129af4 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9482,6 +9482,8 @@  static bool use_mmio_flip(struct intel_engine_cs *ring,
 		return false;
 	else if (i915.use_mmio_flip > 0)
 		return true;
+	else if (i915.enable_execlists)
+		return true;
 	else
 		return ring != obj->ring;
 }
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index cd834b3..0a04c03 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -83,7 +83,8 @@  int intel_sanitize_enable_execlists(struct drm_device *dev, int enable_execlists
 	if (enable_execlists == 0)
 		return 0;
 
-	if (HAS_LOGICAL_RING_CONTEXTS(dev) && USES_PPGTT(dev))
+	if (HAS_LOGICAL_RING_CONTEXTS(dev) && USES_PPGTT(dev) &&
+			i915.use_mmio_flip >= 0)
 		return 1;
 
 	return 0;