Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Enforce that CS packets are qword aligned
Date: Mon, 24 Jul 2017 09:06:28 +0100	[thread overview]
Message-ID: <9af1c079-eadd-dbb3-eec7-81feda52f2ff@linux.intel.com> (raw)
In-Reply-To: <20170721161101.1618-1-chris@chris-wilson.co.uk>



On 21/07/2017 17:11, Chris Wilson wrote:
> We require the caller to ensure that the packets they wish to emit into
> the CS ring are qword aligned (i.e. have an even number of dwords).
> Double check this.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index aa59290cb8bf..0b06f66507a0 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -1397,6 +1397,9 @@ u32 *intel_ring_begin(struct drm_i915_gem_request *req,
>   	unsigned int total_bytes;
>   	u32 *cs;
>   
> +	/* Packets must be qword aligned. */
> +	GEM_BUG_ON(num_dwords & 1);
> +
>   	total_bytes = bytes + req->reserved_space;
>   	GEM_BUG_ON(total_bytes > ring->effective_size);
>   
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

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

  parent reply	other threads:[~2017-07-24  8:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21 16:11 [PATCH] drm/i915: Enforce that CS packets are qword aligned Chris Wilson
2017-07-21 16:23 ` Chris Wilson
2017-07-21 16:56 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-07-24  8:06 ` Tvrtko Ursulin [this message]
2017-07-25 12:57   ` [PATCH] " Chris Wilson

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=9af1c079-eadd-dbb3-eec7-81feda52f2ff@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox