drm/i915: taint kernel when force probing unsupported devices
authorJani Nikula <jani.nikula@intel.com>
Thu, 4 May 2023 10:35:08 +0000 (13:35 +0300)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Thu, 11 May 2023 11:11:59 +0000 (14:11 +0300)
commit79c901c93562bdf1c84ce6c1b744fbbe4389a6eb
tree5101a11a6a3f88ba2578f8a26a152ed3677a048e
parent0ff80028e2702c7c3d78b69705dc47c1ccba8c39
drm/i915: taint kernel when force probing unsupported devices

For development and testing purposes, the i915.force_probe module
parameter and DRM_I915_FORCE_PROBE kconfig option allow probing of
devices that aren't supported by the driver.

The i915.force_probe module parameter is "unsafe" and setting it taints
the kernel. However, using the kconfig option does not.

Always taint the kernel when force probing a device that is not
supported.

v2: Drop "depends on EXPERT" to avoid build breakage (kernel test robot)

Fixes: 7ef5ef5cdead ("drm/i915: add force_probe module parameter to replace alpha_support")
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Dave Airlie <airlied@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230504103508.1818540-1-jani.nikula@intel.com
(cherry picked from commit 3312bb4ad09ca6423bd4a5b15a94588a8962fb8e)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/Kconfig
drivers/gpu/drm/i915/i915_pci.c