On Fri, Jul 17, 2015 at 03:33:14PM +0100, john.c.harri...@intel.com wrote:
> From: John Harrison <john.c.harri...@intel.com>
> 
> Split the execbuffer() function in half. The first half collects and validates
> all the information requried to process the batch buffer. It also does all the
> object pinning, relocations, active list management, etc - basically anything
> that must be done upfront before the IOCTL returns and allows the user land 
> side
> to start changing/freeing things. The second half does the actual ring
> submission.
> 
> This change implements the split but leaves the back half being called 
> directly
> from the end of the front half.
> 
> Change-Id: I5e1c77639ce526ab2401b0323186c518bf13da0a
> For: VIZ-1587
> Signed-off-by: John Harrison <john.c.harri...@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h            |  11 +++
>  drivers/gpu/drm/i915/i915_gem.c            |   2 +
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c | 130 
> ++++++++++++++++++++---------
>  drivers/gpu/drm/i915/intel_lrc.c           |  58 +++++++++----
>  drivers/gpu/drm/i915/intel_lrc.h           |   1 +
>  5 files changed, 147 insertions(+), 55 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 289ddd6..28d51ac 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1684,10 +1684,18 @@ struct i915_execbuffer_params {
>       struct drm_device               *dev;
>       struct drm_file                 *file;
>       uint32_t                        dispatch_flags;
> +     uint32_t                        args_flags;
>       uint32_t                        args_batch_start_offset;
> +     uint32_t                        args_batch_len;
> +     uint32_t                        args_num_cliprects;
> +     uint32_t                        args_DR1;
> +     uint32_t                        args_DR4;
>       uint32_t                        batch_obj_vm_offset;
>       struct intel_engine_cs          *ring;
>       struct drm_i915_gem_object      *batch_obj;
> +     struct drm_clip_rect            *cliprects;
> +     uint32_t                        instp_mask;
> +     int                             instp_mode;
>       struct intel_context            *ctx;
>       struct drm_i915_gem_request     *request;
>  };
> @@ -1929,6 +1937,7 @@ struct drm_i915_private {
>               int (*execbuf_submit)(struct i915_execbuffer_params *params,
>                                     struct drm_i915_gem_execbuffer2 *args,
>                                     struct list_head *vmas);
> +             int (*execbuf_final)(struct i915_execbuffer_params *params);

No need for this vfunc since you only call this from specialized and not
generic code.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to