Re: [PATCH 053/190] drm/i915: Convert i915_semaphores_is_enabled over to early sanitize

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

 



On 11/01/16 09:17, Chris Wilson wrote:
Rather than recomputing whether semaphores are enabled, we can do that
computation once during early initialisation as the i915.semaphores
module parameter is now read-only.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
  drivers/gpu/drm/i915/i915_debugfs.c     |  2 +-
  drivers/gpu/drm/i915/i915_dma.c         |  2 +-
  drivers/gpu/drm/i915/i915_drv.c         | 25 -----------------------
  drivers/gpu/drm/i915/i915_drv.h         |  1 -
  drivers/gpu/drm/i915/i915_gem.c         | 35 ++++++++++++++++++++++++++++++---
  drivers/gpu/drm/i915/i915_gem_context.c |  2 +-
  drivers/gpu/drm/i915/i915_gpu_error.c   |  2 +-
  drivers/gpu/drm/i915/intel_ringbuffer.c | 20 +++++++++----------
  8 files changed, 46 insertions(+), 43 deletions(-)

LGTM.

Reviewed-by: Dave Gordon <david.s.gordon@xxxxxxxxx>

[aside]
The conditions below seem to exclude a lot of systems. It looks like semaphores can only be used on GEN 6 (if no IOMMU) and GEN 7. Nothing before or after that range, as GEN9+ supports execlist only.

So is it even worth continuing to support semaphores at all? Especially as we have customers who say that the scheduler gives more performance gain than semaphores ...
[/aside]

.Dave.

+static bool i915_gem_sanitize_semaphore(struct drm_i915_private *dev_priv,
+					int param_value)
+{
+	if (INTEL_INFO(dev_priv)->gen < 6)
+		return false;
+
+	if (param_value >= 0)
+		return param_value;
+
+	/* TODO: make semaphores and Execlists play nicely together */
+	if (i915.enable_execlists)
+		return false;
+
+	/* Until we get further testing... */
+	if (IS_GEN8(dev_priv))
+		return false;
+
+#ifdef CONFIG_INTEL_IOMMU
+	/* Enable semaphores on SNB when IO remapping is off */
+	if (INTEL_INFO(dev_priv)->gen == 6 && intel_iommu_gfx_mapped)
+		return false;
+#endif
+
+	return true;
+}

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




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