On Mon, 21 Nov 2011 11:22:09 -0200, Eugeni Dodonov <[email protected]> 
wrote:
> We should enable semaphores on IVB by default, and on SNB in cases where
> dma remapping is disabled or iommu is not enabled.
> 
> v2: adapt patch according to the feedback, and put it in line with Keith's
> rc6 enabling patch.
> 
> v3: move the generation check into intel_enable_semaphores function, and
> fix variable type for i915_semaphores.
> 
> CC: Daniel Vetter <[email protected]>
> CC: Ben Widawsky <[email protected]>
> CC: Keith Packard <[email protected]>
> CC: Jesse Barnes <[email protected]>
> CC: Chris Wilson <[email protected]>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42696
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40564
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38862
> Signed-off-by: Eugeni Dodonov <[email protected]>
>  
> +static bool
> +intel_enable_semaphores(struct drm_device *dev)
> +{
> +     if (INTEL_INFO(dev)->gen < 6)
> +             return 0;
> +
> +     if (i915_semaphores >= 0)
> +             return i915_semaphores;
> +
> +     if (INTEL_INFO(dev)->gen >= 7)
> +             return 1;
> +#ifdef CONFIG_INTEL_IOMMU
> +     /* On gen6, we only enable semaphores if dma remapping is disabled,
> +      * or if there is no iommu.
> +      */
> +     if (INTEL_INFO(dev)->gen == 6)
> +             return no_iommu || dmar_disabled;
> +#endif
> +
> +     return 1;
> +}

Now this function can be written more compactly by just removing the
gen >= 7 check. Otherwise,
Reviewed-by: Chris Wilson <[email protected]>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to