All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael H. Nguyen" <michael.h.nguyen@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4 7/7] drm/i915: Tidy up execbuffer command parsing code
Date: Fri, 21 Nov 2014 17:17:50 -0800	[thread overview]
Message-ID: <546FE43E.7090600@intel.com> (raw)
In-Reply-To: <20141112093729.GJ8220@nuc-i3427.alporthouse.com>

Hi Chris,

>>
>> +static struct drm_i915_gem_object*
>> +i915_gem_execbuffer_parse(struct intel_engine_cs *ring,
>> +			  struct drm_i915_gem_exec_object2 *shadow_exec_entry,
>> +			  struct eb_vmas *eb,
>> +			  struct drm_i915_gem_object *batch_obj,
>> +			  u32 batch_start_offset,
>> +			  u32 batch_len,
>> +			  bool is_master,
>> +			  u32 *flags)
>> +{
>> +	struct drm_i915_private *dev_priv = to_i915(batch_obj->base.dev);
>> +	struct drm_i915_gem_object *shadow_batch_obj;
>> +	int ret;
>> +
>> +	shadow_batch_obj = i915_gem_batch_pool_get(&dev_priv->mm.batch_pool,
>> +						   batch_obj->base.size);
>> +	if (IS_ERR(shadow_batch_obj))
>> +		return shadow_batch_obj;
>> +
>> +	shadow_batch_obj->madv = I915_MADV_WILLNEED;
>> +
>> +	ret = i915_gem_obj_ggtt_pin(shadow_batch_obj, 4096, 0);
>> +	if (ret)
>> +		goto err;
>
> Pardon? This feels an implementation issue of i915_parse_cmds() and should
> be resolved there. Presumably you are not actually reading back through
> the GTT? That would be insane...
>
>> +	ret = i915_parse_cmds(ring,
>> +			      batch_obj,
>> +			      shadow_batch_obj,
>> +			      batch_start_offset,
>> +			      batch_len,
>> +			      is_master);
>> +	i915_gem_object_ggtt_unpin(shadow_batch_obj);
>
> Yet pin+unpin around the parser seems to serve no other purpose.
Are you suggesting to remove the pin/unpin calls? If so, isn't pinning 
needed to ensure the backing store pages are available in vmap_batch()? 
i.e. obj->pages->sgl is populated w/ physical pages.

Or, are you suggesting to move the pin/unpin calls inside 
i915_parse_cmds() ?

Thx,
Mike
> -Chris
>


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

  reply	other threads:[~2014-11-22  1:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 22:22 [PATCH v4 0/7] Command parser batch buffer copy bradley.d.volkin
2014-11-07 22:22 ` [PATCH v4 1/7] drm/i915: Implement a framework for batch buffer pools bradley.d.volkin
2014-11-12  8:44   ` Daniel Vetter
2014-11-12  9:46     ` Chris Wilson
2014-11-12 16:33       ` Daniel Vetter
2014-11-12 16:38         ` Chris Wilson
2014-11-22  1:28           ` Michael H. Nguyen
2014-11-24  9:18             ` Daniel Vetter
2014-11-12  9:42   ` Chris Wilson
2014-11-07 22:22 ` [PATCH v4 2/7] drm/i915: Use batch pools with the command parser bradley.d.volkin
2014-11-12  9:49   ` Chris Wilson
2014-11-07 22:22 ` [PATCH v4 3/7] drm/i915: Add a batch pool debugfs file bradley.d.volkin
2014-11-07 22:22 ` [PATCH v4 4/7] drm/i915: Add batch pool details to i915_gem_objects debugfs bradley.d.volkin
2014-11-07 22:22 ` [PATCH v4 5/7] drm/i915: Use batch length instead of object size in command parser bradley.d.volkin
2014-11-07 22:22 ` [PATCH v4 6/7] drm/i915: Mark shadow batch buffers as purgeable bradley.d.volkin
2014-11-12  8:46   ` Daniel Vetter
2014-11-07 22:22 ` [PATCH v4 7/7] drm/i915: Tidy up execbuffer command parsing code bradley.d.volkin
2014-11-07 22:25   ` [PATCH v4 7/7] drm/i915: Tidy up execbuffer command shuang.he
2014-11-12  9:37   ` [PATCH v4 7/7] drm/i915: Tidy up execbuffer command parsing code Chris Wilson
2014-11-22  1:17     ` Michael H. Nguyen [this message]
2014-11-24  9:20       ` Daniel Vetter
2014-11-12  8:51 ` [PATCH v4 0/7] Command parser batch buffer copy 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=546FE43E.7090600@intel.com \
    --to=michael.h.nguyen@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 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.