Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44debe7a authored by Daniel Vetter's avatar Daniel Vetter
Browse files

vgacon: dummy implementation for vgacon_text_force



This allows us to ditch a ton of ugly #ifdefs from a bunch of drm modeset
drivers.

v2: Make the dummy function actually return a sane value, spotted by
Ville.

v3: Because the patch is still in limbo there's no more drivers to
convert, noticed by Emil.

v4: Rebase once more, because hooray. I'll just go ahead an apply this
one later on to drm-misc.

Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent aa2e2996
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -539,12 +539,10 @@ static struct pci_driver amdgpu_kms_pci_driver = {

static int __init amdgpu_init(void)
{
#ifdef CONFIG_VGA_CONSOLE
	if (vgacon_text_force()) {
		DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n");
		return -EINVAL;
	}
#endif
	DRM_INFO("amdgpu kernel modesetting enabled.\n");
	driver = &kms_driver;
	pdriver = &amdgpu_kms_pci_driver;
+0 −2
Original line number Diff line number Diff line
@@ -218,10 +218,8 @@ static struct drm_driver driver = {

static int __init ast_init(void)
{
#ifdef CONFIG_VGA_CONSOLE
	if (vgacon_text_force() && ast_modeset == -1)
		return -EINVAL;
#endif

	if (ast_modeset == 0)
		return -EINVAL;
+0 −2
Original line number Diff line number Diff line
@@ -162,10 +162,8 @@ static struct pci_driver cirrus_pci_driver = {

static int __init cirrus_init(void)
{
#ifdef CONFIG_VGA_CONSOLE
	if (vgacon_text_force() && cirrus_modeset == -1)
		return -EINVAL;
#endif

	if (cirrus_modeset == 0)
		return -EINVAL;
+0 −2
Original line number Diff line number Diff line
@@ -1750,10 +1750,8 @@ static int __init i915_init(void)
	if (i915.modeset == 0)
		driver.driver_features &= ~DRIVER_MODESET;

#ifdef CONFIG_VGA_CONSOLE
	if (vgacon_text_force() && i915.modeset == -1)
		driver.driver_features &= ~DRIVER_MODESET;
#endif

	if (!(driver.driver_features & DRIVER_MODESET)) {
		/* Silently fail loading to not upset userspace. */
+0 −2
Original line number Diff line number Diff line
@@ -116,10 +116,8 @@ static struct pci_driver mgag200_pci_driver = {

static int __init mgag200_init(void)
{
#ifdef CONFIG_VGA_CONSOLE
	if (vgacon_text_force() && mgag200_modeset == -1)
		return -EINVAL;
#endif

	if (mgag200_modeset == 0)
		return -EINVAL;
Loading