All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <benjamin.widawsky@intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915/bdw: Use the GEN8 SRM when qeueing a flip
Date: Mon, 7 Apr 2014 13:59:17 -0700	[thread overview]
Message-ID: <20140407205917.GD18726@intel.com> (raw)
In-Reply-To: <1396898674-22510-4-git-send-email-damien.lespiau@intel.com>

On Mon, Apr 07, 2014 at 08:24:34PM +0100, Damien Lespiau wrote:
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 22 +++++++++++++++++++---
>  1 file changed, 19 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 3697433..a646ed4 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8821,8 +8821,16 @@ static int intel_gen7_queue_flip(struct drm_device *dev,
>  	}
>  
>  	len = 4;
> -	if (ring->id == RCS)
> +	if (ring->id == RCS) {
>  		len += 6;
> +		/*
> +		 * On Gen 8, SRM is now taking an extra dword to accommodate
> +		 * 48bits addresses, and we need a NOOP for the batch size to
> +		 * stay even.
> +		 */
> +		if (IS_GEN8(dev))
> +			len += 2;
> +	}
>  
>  	/*
>  	 * BSpec MI_DISPLAY_FLIP for IVB:
> @@ -8857,10 +8865,18 @@ static int intel_gen7_queue_flip(struct drm_device *dev,
>  		intel_ring_emit(ring, ~(DERRMR_PIPEA_PRI_FLIP_DONE |
>  					DERRMR_PIPEB_PRI_FLIP_DONE |
>  					DERRMR_PIPEC_PRI_FLIP_DONE));
> -		intel_ring_emit(ring, MI_STORE_REGISTER_MEM(1) |
> -				MI_SRM_LRM_GLOBAL_GTT);
> +		if (IS_GEN8(dev))
> +			intel_ring_emit(ring, MI_STORE_REGISTER_MEM_GEN8(1) |
> +					      MI_SRM_LRM_GLOBAL_GTT);
> +		else
> +			intel_ring_emit(ring, MI_STORE_REGISTER_MEM(1) |
> +					      MI_SRM_LRM_GLOBAL_GTT);
>  		intel_ring_emit(ring, DERRMR);
>  		intel_ring_emit(ring, ring->scratch.gtt_offset + 256);
> +		if (IS_GEN8(dev)) {
> +			intel_ring_emit(ring, 0);
> +			intel_ring_emit(ring, MI_NOOP);
> +		}
>  	}
>  
>  	intel_ring_emit(ring, MI_DISPLAY_FLIP_I915 | plane_bit);

Cool. This explains the bad DERRMR values I was seeing in in error
states. I'm honestly didn't check if we actually need an SRM for BDW
still, but I'll assume you did check.

I also think it's worth to make a intel_gen8_queue_flip, but since I
don't touch this code much, I'll leave it to you to decide.

The series is:
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>

minus the above mentioned fact of whether it's needed.

-- 
Ben Widawsky, Intel Open Source Technology Center

  reply	other threads:[~2014-04-07 23:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-07 19:24 [PATCH 0/3] GEN8 SRM changes Damien Lespiau
2014-04-07 19:24 ` [PATCH 1/3] drm/i915: Protect the argument expansion in LRI and SRM macros Damien Lespiau
2014-04-07 20:47   ` Ben Widawsky
2014-04-09 12:57     ` Daniel Vetter
2014-04-07 19:24 ` [PATCH 2/3] drm/i915/bdw: Provide a gen8 version of SRM Damien Lespiau
2014-04-07 19:24 ` [PATCH 3/3] drm/i915/bdw: Use the GEN8 SRM when qeueing a flip Damien Lespiau
2014-04-07 20:59   ` Ben Widawsky [this message]
2014-04-07 22:20     ` Damien Lespiau
2014-04-08  6:24       ` Chris Wilson
2014-04-08  6:54         ` Damien Lespiau
2014-04-09 12:59     ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140407205917.GD18726@intel.com \
    --to=benjamin.widawsky@intel.com \
    --cc=damien.lespiau@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.