]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915: deprecate the i915.modeset module parameter
authorJani Nikula <jani.nikula@intel.com>
Wed, 28 Aug 2024 11:19:09 +0000 (14:19 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 29 Aug 2024 14:53:02 +0000 (17:53 +0300)
The i915.modeset parameter doesn't really provide any useful benefit
over the nomodeset kernel parameter. Anything that i915.modeset does can
be achieved via nomodeset or not probing i915 at all.

Unfortunately, the i915.modeset parameter is widely referenced on
various forums, and removing it is not that simple. Start off by
deprecating it in the module parameter documentation, and logging a
warning message on non-default values.

Cc: Daniel Veter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/2c63e2048eed64f728478fbcfc84f51c7f3212e6.1724843853.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_module.c
drivers/gpu/drm/i915/i915_params.c

index 3397c2368ed8d51b21371da159a5bbe3f60183a1..7ed6d70389af97e22b0806684c28519154ebb0dd 100644 (file)
@@ -29,6 +29,12 @@ static int i915_check_nomodeset(void)
         * nomodeset boot option.
         */
 
+       if (i915_modparams.modeset == 0)
+               pr_warn("i915.modeset=0 is deprecated. Please use the 'nomodeset' kernel parameter instead.\n");
+       else if (i915_modparams.modeset != -1)
+               pr_warn("i915.modeset=%d is deprecated. Please remove it and the 'nomodeset' kernel parameter instead.\n",
+                       i915_modparams.modeset);
+
        if (i915_modparams.modeset == 0)
                use_kms = false;
 
index 316e55f3e87bd7db6d75185676336e5de745cc76..37746dd619fd8ab05ba6d877c240e42cd86c621f 100644 (file)
@@ -64,8 +64,7 @@ struct i915_params i915_modparams __read_mostly = {
  */
 
 i915_param_named(modeset, int, 0400,
-       "Use kernel modesetting [KMS] (0=disable, "
-       "1=on, -1=force vga console preference [default])");
+       "Deprecated. Use the 'nomodeset' kernel parameter instead.");
 
 i915_param_named_unsafe(reset, uint, 0400,
        "Attempt GPU resets (0=disabled, 1=full gpu reset, 2=engine reset [default])");