drm/i915: Expand force_probe to block probe of devices as well.
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 3 Jan 2023 19:47:01 +0000 (14:47 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:32:33 +0000 (17:32 +0100)
commit36fa6187753a9b52f2bbf2f3ba628f6bad314510
tree5f04986ef2d7b57d9a88923ec9a30c902d2fcc44
parent86d73b1f98a81f3ecfc19dfe6f8d50daf5707330
drm/i915: Expand force_probe to block probe of devices as well.

[ Upstream commit 157821fb3e9aaa07cf408686b08d117bf27b7de1 ]

There are new cases where we want to block i915 probe, such
as when experimenting or developing the new Xe driver.

But also, with the new hybrid cards, users or developers might
want to use i915 only on integrated and fully block the probe
of the i915 for the discrete. Or vice versa.

There are even older development and validation reasons,
like when you use some distro where the modprobe.blacklist is
not present.

But in any case, let's introduce a more granular control, but without
introducing yet another parameter, but using the existent force_probe
one.

Just by adding a ! in the begin of the id in the force_probe, like
in this case where we would block the probe for Alder Lake:

$ insmod i915.ko force_probe='!46a6'

v2: Take care of '*' and  '!*' cases as pointed out by
    Gustavo and Jani.

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230103194701.1492984-1-rodrigo.vivi@intel.com
Stable-dep-of: 79c901c93562 ("drm/i915: taint kernel when force probing unsupported devices")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/i915/Kconfig
drivers/gpu/drm/i915/i915_params.c
drivers/gpu/drm/i915/i915_pci.c