[PATCH 1/2] drm/i915: enable semaphores on per-device defaults

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Nov 2011 11:22:09 -0200, Eugeni Dodonov <eugeni.dodonov at intel.com> 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 <daniel.vetter at ffwll.ch>
> CC: Ben Widawsky <ben at bwidawsk.net>
> CC: Keith Packard <keithp at keithp.com>
> CC: Jesse Barnes <jbarnes at virtuousgeek.org>
> CC: Chris Wilson <chris at chris-wilson.co.uk>
> 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 <eugeni.dodonov at intel.com>
>  
> +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 <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux