On Tue, 11 Oct 2011 21:43:50 -0700
Ben Widawsky <[email protected]> wrote:

> Simple refactor.
> 
> Signed-off-by: Ben Widawsky <[email protected]>
> ---
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c |   78 
> +++++++++++++++++-----------
>  1 files changed, 47 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c 
> b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index cc69861..5f01227 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -954,6 +954,50 @@ i915_gem_execbuffer_retire_commands(struct drm_device 
> *dev,
>  }
>  
>  static int
> +i915_gem_set_constant_offset(struct intel_ring_buffer *ring, int mode)
> +{
> +     struct drm_device *dev = ring->dev;
> +     struct drm_i915_private *dev_priv = dev->dev_private;
> +     uint32_t mask = I915_EXEC_CONSTANTS_MASK;
> +     int ret;
> +
> +     switch (mode) {
> +     case I915_EXEC_CONSTANTS_REL_GENERAL:
> +     case I915_EXEC_CONSTANTS_ABSOLUTE:
> +     case I915_EXEC_CONSTANTS_REL_SURFACE:
> +             if (ring == &dev_priv->ring[RCS] &&
> +                 mode != dev_priv->relative_constants_mode) {
> +                     if (INTEL_INFO(dev)->gen < 4)
> +                             return -EINVAL;
> +
> +                     if (INTEL_INFO(dev)->gen > 5 &&
> +                         mode == I915_EXEC_CONSTANTS_REL_SURFACE)
> +                             return -EINVAL;
> +
> +                     /* The HW changed the meaning on this bit on gen6 */
> +                     if (INTEL_INFO(dev)->gen >= 6)

NAK
This bit belongs in patch 5. I will fix this after I get more feedback
on the series. I've already nak'd patch 5.

Ben
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to