]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/i915: Remove i915.semaphores modparam
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 20 Nov 2017 20:55:04 +0000 (20:55 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 20 Nov 2017 21:59:09 +0000 (21:59 +0000)
Having disabled the broken semaphores on Sandybridge, there is no need
for a modparam any more, so remove it in favour of a simple
HAS_LEGACY_SEMAPHORES() guard.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171120205504.21892-5-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_params.c
drivers/gpu/drm/i915/i915_params.h
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_ringbuffer.c

index c608fd96771cc35efa6d8ade4b036ba155c327c6..8dbcb03b5f54b92abe92137152282ac3a95b0701 100644 (file)
@@ -321,7 +321,7 @@ static int i915_getparam(struct drm_device *dev, void *data,
                value = USES_PPGTT(dev_priv);
                break;
        case I915_PARAM_HAS_SEMAPHORES:
-               value = i915_modparams.semaphores;
+               value = HAS_LEGACY_SEMAPHORES(dev_priv);
                break;
        case I915_PARAM_HAS_SECURE_BATCHES:
                value = capable(CAP_SYS_ADMIN);
@@ -1063,11 +1063,6 @@ static void intel_sanitize_options(struct drm_i915_private *dev_priv)
                                            i915_modparams.enable_ppgtt);
        DRM_DEBUG_DRIVER("ppgtt mode: %i\n", i915_modparams.enable_ppgtt);
 
-       i915_modparams.semaphores =
-               intel_sanitize_semaphores(dev_priv, i915_modparams.semaphores);
-       DRM_DEBUG_DRIVER("use GPU semaphores? %s\n",
-                        yesno(i915_modparams.semaphores));
-
        intel_uc_sanitize_options(dev_priv);
 
        intel_gvt_sanitize_options(dev_priv);
index 5ce778c26bb8898c21f9e908bb993e834a8f0e0e..9a0654e10a554b9ff660f4b8cfeaeed937a7d8fb 100644 (file)
@@ -3139,6 +3139,8 @@ intel_info(const struct drm_i915_private *dev_priv)
 #define HAS_BLT(dev_priv)      HAS_ENGINE(dev_priv, BCS)
 #define HAS_VEBOX(dev_priv)    HAS_ENGINE(dev_priv, VECS)
 
+#define HAS_LEGACY_SEMAPHORES(dev_priv) IS_GEN7(dev_priv)
+
 #define HAS_LLC(dev_priv)      ((dev_priv)->info.has_llc)
 #define HAS_SNOOP(dev_priv)    ((dev_priv)->info.has_snoop)
 #define HAS_EDRAM(dev_priv)    (!!((dev_priv)->edram_cap & EDRAM_ENABLED))
@@ -3302,8 +3304,6 @@ intel_ggtt_update_needs_vtd_wa(struct drm_i915_private *dev_priv)
 int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv,
                                int enable_ppgtt);
 
-bool intel_sanitize_semaphores(struct drm_i915_private *dev_priv, int value);
-
 /* i915_drv.c */
 void __printf(3, 4)
 __i915_printk(struct drm_i915_private *dev_priv, const char *level,
index d53bb8e872ba6025d8d160f9abe56e23289d55c9..792e6dc7e19b197fe964217ec47611964d9d0625 100644 (file)
@@ -4997,17 +4997,6 @@ out:
        return ret;
 }
 
-bool intel_sanitize_semaphores(struct drm_i915_private *dev_priv, int value)
-{
-       if (!IS_GEN7(dev_priv))
-               return false;
-
-       if (value >= 0)
-               return value;
-
-       return true;
-}
-
 static int __intel_engines_record_defaults(struct drm_i915_private *i915)
 {
        struct i915_gem_context *ctx;
index 0704d9af261bc29f399ae70278b240dae9a2f236..6ca56e482d793cfcd1f6e9bf0713debf3c1e91f3 100644 (file)
@@ -574,7 +574,7 @@ mi_set_context(struct drm_i915_gem_request *req, u32 flags)
        enum intel_engine_id id;
        const int num_rings =
                /* Use an extended w/a on gen7 if signalling from other rings */
-               (i915_modparams.semaphores && IS_GEN7(dev_priv)) ?
+               (HAS_LEGACY_SEMAPHORES(dev_priv) && IS_GEN7(dev_priv)) ?
                INTEL_INFO(dev_priv)->num_rings - 1 :
                0;
        int len;
index d61c1787c1641e84aeca1944c1df1a4f46fac287..3328147b486305f2f0b687fdd1ea792c6bd68a80 100644 (file)
@@ -46,10 +46,6 @@ i915_param_named_unsafe(panel_ignore_lid, int, 0600,
        "Override lid status (0=autodetect, 1=autodetect disabled [default], "
        "-1=force lid closed, -2=force lid open)");
 
-i915_param_named_unsafe(semaphores, int, 0400,
-       "Use semaphores for inter-ring sync "
-       "(default: -1 (use per-chip defaults))");
-
 i915_param_named_unsafe(enable_rc6, int, 0400,
        "Enable power-saving render C-state 6. "
        "Different stages can be selected via bitmask values "
index 0aef3d7178ebf04d4ced7a19677a4ae24d3693f2..8321bd86cba546fdbf9de366f887fdae20b7d73a 100644 (file)
@@ -31,7 +31,6 @@
        param(char *, vbt_firmware, NULL) \
        param(int, modeset, -1) \
        param(int, panel_ignore_lid, 1) \
-       param(int, semaphores, -1) \
        param(int, lvds_channel_mode, 0) \
        param(int, panel_use_ssc, -1) \
        param(int, vbt_sdvo_panel_type, -1) \
index ef8e101ebd987447e4a448adb5f779ed95b16abf..22c095035539c1be4a0462499060ed7cac05e224 100644 (file)
@@ -1713,7 +1713,7 @@ void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)
                           I915_READ(RING_MI_MODE(engine->mmio_base)),
                           I915_READ(RING_MI_MODE(engine->mmio_base)) & (MODE_IDLE) ? " [idle]" : "");
        }
-       if (i915_modparams.semaphores) {
+       if (HAS_LEGACY_SEMAPHORES(dev_priv)) {
                drm_printf(m, "\tSYNC_0: 0x%08x\n",
                           I915_READ(RING_SYNC_0(engine->mmio_base)));
                drm_printf(m, "\tSYNC_1: 0x%08x\n",
index 5465e708545ff0f05663dd3f07c1e981458b05e2..bfa11a84e476e51fd01e0b766dd84c062e36f706 100644 (file)
@@ -1712,7 +1712,7 @@ static void intel_ring_init_semaphores(struct drm_i915_private *dev_priv,
 {
        int i;
 
-       if (!i915_modparams.semaphores)
+       if (!HAS_LEGACY_SEMAPHORES(dev_priv))
                return;
 
        GEM_BUG_ON(INTEL_GEN(dev_priv) < 6);
@@ -1823,7 +1823,7 @@ static void intel_ring_default_vfuncs(struct drm_i915_private *dev_priv,
 
        engine->emit_breadcrumb = i9xx_emit_breadcrumb;
        engine->emit_breadcrumb_sz = i9xx_emit_breadcrumb_sz;
-       if (i915_modparams.semaphores) {
+       if (HAS_LEGACY_SEMAPHORES(dev_priv)) {
                int num_rings;
 
                engine->emit_breadcrumb = gen6_sema_emit_breadcrumb;