Skip to contentSkip to conversation

drm/amdgpu: Fix memory leaks at amdgpu_init() error path

PATCH Applied Takashi Iwai 13 participants 27 messages Mar 30, 2018 – Sep 25, 2019 18 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu: Fix memory leaks at amdgpu_init() error path

amdgpu driver checks vgacon_text_force() after some initializations but without cleaning up. This will result in leaks.

Move the check of vgacon_text_force() to the beginning of amdgpu_init() for fixing it and also for optimization.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +5 -4
index 50afcf65181a..e55792d3cd12 100644
@@ -905,6 +905,11 @@ static int __init amdgpu_init(void)
 {
 	int r;
 
+	if (vgacon_text_force()) {
+		DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n");
+		return -EINVAL;
+	}
+
 	r = amdgpu_sync_init();
 	if (r)
 		goto error_sync;
@@ -913,10 +918,6 @@ static int __init amdgpu_init(void)
 	if (r)
 		goto error_fence;
 
-	if (vgacon_text_force()) {
-		DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n");
-		return -EINVAL;
-	}
 	DRM_INFO("amdgpu kernel modesetting enabled.\n");
 	driver = &kms_driver;
 	pdriver = &amdgpu_kms_pci_driver;
Signature · 6 lines
2.16.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 2/2 drm/amdgpu: Add modeset module option

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +7 -1
index e55792d3cd12..029d95ecd26b 100644
@@ -78,6 +78,7 @@
 #define KMS_DRIVER_MINOR	23
 #define KMS_DRIVER_PATCHLEVEL	0
 
+int amdgpu_modeset = -1;
 int amdgpu_vram_limit = 0;
 int amdgpu_vis_vram_limit = 0;
 int amdgpu_gart_size = -1; /* auto */
@@ -130,6 +131,9 @@ int amdgpu_lbpw = -1;
 int amdgpu_compute_multipipe = -1;
 int amdgpu_gpu_recovery = -1; /* auto */
 
+MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
+module_param_named(modeset, amdgpu_modeset, int, 0400);
+
 MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes");
 module_param_named(vramlimit, amdgpu_vram_limit, int, 0600);
 
@@ -905,10 +909,12 @@ static int __init amdgpu_init(void)
 {
 	int r;
 
-	if (vgacon_text_force()) {
+	if (vgacon_text_force() && amdgpu_modeset == -1) {
 		DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n");
 		return -EINVAL;
 	}
+	if (amdgpu_modeset == 0)
+		return -EINVAL;
 
 	r = amdgpu_sync_init();
 	if (r)
Signature · 6 lines
2.16.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Christian.

Quoted 32 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 +++++++-
  1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 -0
index e55792d3cd12..029d95ecd26b 100644
@@ -78,6 +78,7 @@
  #define KMS_DRIVER_MINOR	23
  #define KMS_DRIVER_PATCHLEVEL	0
 
+int amdgpu_modeset = -1;
  int amdgpu_vram_limit = 0;
  int amdgpu_vis_vram_limit = 0;
  int amdgpu_gart_size = -1; /* auto */
@@ -130,6 +131,9 @@ int amdgpu_lbpw = -1;
  int amdgpu_compute_multipipe = -1;
  int amdgpu_gpu_recovery = -1; /* auto */
 
+MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
+module_param_named(modeset, amdgpu_modeset, int, 0400);
+
  MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes");
  module_param_named(vramlimit, amdgpu_vram_limit, int, 0600);
 
@@ -905,10 +909,12 @@ static int __init amdgpu_init(void)
  {
  	int r;
 

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c static int __init amdgpu_init(void) · line 920

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +3 -1
-	if (vgacon_text_force()) {
+	if (vgacon_text_force() && amdgpu_modeset == -1) {
  		DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n");
  		return -EINVAL;
  	}
+	if (amdgpu_modeset == 0)
+		return -EINVAL;
 
  	r = amdgpu_sync_init();
  	if (r)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): c95f9e61-c921-42de-9e03-851d785ab5fc-5C7GfCeVMHo@public.gmane.org

#6 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 14 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 7 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

-ilia
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

maintainer
#7 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:

Quoted 25 lines
Quoted 12 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Quoted 4 lines

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

Because it is not well documented and repeated over and over again in drivers.

The problem is that people don't realized that the driver isn't loaded at all without the modeset=0 module option and demand fixing the resulting bad performance without modesetting.

I can't count how often I had to explain that this approach won't work. We could rename it to something like disable_gfx_accel or something like that to make this clear.

Christian.

Quoted 2 lines

-ilia

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): 706f4d0d-4583-2c8a-447d-f6cdd3429ad5-5C7GfCeVMHo@public.gmane.org

#9 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 32 lines · On Sun, 01 Apr 2018 19:58:11 +0200, Christian K6nig wrote:

Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:

Quoted 25 lines
Quoted 12 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Quoted 4 lines

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

Quoted 6 lines

Because it is not well documented and repeated over and over again in drivers.

The problem is that people don't realized that the driver isn't loaded at all without the modeset=0 module option and demand fixing the resulting bad performance without modesetting.

Hm, I don't get it. What this options has to do with performance for a KMS-only driver...?

Quoted 3 lines

I can't count how often I had to explain that this approach won't work. We could rename it to something like disable_gfx_accel or something like that to make this clear.

Maybe it's a different view from a different perspective.
From the distro side, nomodeset and the force reload via modeset
option has been the most reliable way to achieve the purpose, so far. It's easier especially when the system has a hybrid graphics.

It might be not same for developers, though.

thanks,

Takashi
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Am 01.04.2018 um 20:21 schrieb Takashi Iwai:

Quoted 31 lines
Quoted 29 lines · On Sun, 01 Apr 2018 19:58:11 +0200, Christian K6nig wrote:

Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:

Quoted 28 lines
Quoted 11 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

Quoted 8 lines
Quoted 6 lines

Because it is not well documented and repeated over and over again in drivers.

The problem is that people don't realized that the driver isn't loaded at all without the modeset=0 module option and demand fixing the resulting bad performance without modesetting.

Hm, I don't get it. What this options has to do with performance for a KMS-only driver...?

Well exactly that's the point, nothing.

The problem is that the option name is confusing to the end user because the expectation is that "nomodeset" just means that they only can't change the display mode.

Some (unfortunately quite a lot) people don't realize that for KMS drivers this means that the driver isn't even loaded and they also don't get any acceleration.

We had to explain that numerous times now. I think it would be best to give the option a more meaningful name.

Christian.

Quoted 8 lines
Quoted 3 lines

I can't count how often I had to explain that this approach won't work. We could rename it to something like disable_gfx_accel or something like that to make this clear.

Maybe it's a different view from a different perspective.
From the distro side, nomodeset and the force reload via modeset
option has been the most reliable way to achieve the purpose, so far. It's easier especially when the system has a hybrid graphics.

Quoted 6 lines

It might be not same for developers, though.

thanks,

Takashi

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 0ecce204-6af8-2395-ac40-391e3b655bed-5C7GfCeVMHo@public.gmane.org

#13 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 47 lines · Christian König

Am 01.04.2018 um 20:21 schrieb Takashi Iwai:

Quoted 31 lines
Quoted 29 lines · On Sun, 01 Apr 2018 19:58:11 +0200, Christian K6nig wrote:

Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:

Quoted 28 lines
Quoted 11 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

Quoted 8 lines
Quoted 6 lines

Because it is not well documented and repeated over and over again in drivers.

The problem is that people don't realized that the driver isn't loaded at all without the modeset=0 module option and demand fixing the resulting bad performance without modesetting.

Hm, I don't get it. What this options has to do with performance for a KMS-only driver...?

Well exactly that's the point, nothing.

The problem is that the option name is confusing to the end user because the expectation is that "nomodeset" just means that they only can't change the display mode.

Quoted 6 lines

Some (unfortunately quite a lot) people don't realize that for KMS drivers this means that the driver isn't even loaded and they also don't get any acceleration.

We had to explain that numerous times now. I think it would be best to give the option a more meaningful name.

Yeah, agreed with Christian. If we want a generic "pls disable all gfx accel" knob then probably best to put that into the drm core. And just outright fail loading the drm core if that happens, which will prevent all gfx drivers from loading.

That likely means a hole bunch of stuff won't work (usually sound keels over too), but that's what you get for this. Only disabling modesetting without disabling the entire driver doesn't work (never has, except for this UMS+GEM combo only i915 support, and not for long).

And once we have that knob, probably best to phase out all the per-driver options.
-Daniel

Quoted 22 lines

Christian.

Quoted 8 lines
Quoted 3 lines

I can't count how often I had to explain that this approach won't work. We could rename it to something like disable_gfx_accel or something like that to make this clear.

Maybe it's a different view from a different perspective.
From the distro side, nomodeset and the force reload via modeset
option has been the most reliable way to achieve the purpose, so far. It's easier especially when the system has a hybrid graphics.

Quoted 6 lines

It might be not same for developers, though.

thanks,

Takashi

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20180403092948.GQ3881-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org

#15 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Am 03.04.2018 um 11:29 schrieb Daniel Vetter:

Quoted 20 lines · Christian König
Quoted 8 lines

Am 01.04.2018 um 20:21 schrieb Takashi Iwai:
[SNIP]
Well exactly that's the point, nothing.

The problem is that the option name is confusing to the end user because the expectation is that "nomodeset" just means that they only can't change the display mode.

Quoted 6 lines

Some (unfortunately quite a lot) people don't realize that for KMS drivers this means that the driver isn't even loaded and they also don't get any acceleration.

We had to explain that numerous times now. I think it would be best to give the option a more meaningful name.

Yeah, agreed with Christian. If we want a generic "pls disable all gfx accel" knob then probably best to put that into the drm core. And just outright fail loading the drm core if that happens, which will prevent all gfx drivers from loading.

Quoted 7 lines

That likely means a hole bunch of stuff won't work (usually sound keels over too), but that's what you get for this. Only disabling modesetting without disabling the entire driver doesn't work (never has, except for this UMS+GEM combo only i915 support, and not for long).

And once we have that knob, probably best to phase out all the per-driver options.

+ some compability code to keep "nomodeset" working for a while longer and printing a warning that the option is deprecated.

If we approach it like that the whole idea sounds rather reasonable to me.

Christian.

Quoted 2 lines

-Daniel

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#16 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

In reply to Daniel Vetter
Quoted 60 lines · Daniel Vetter
Quoted 47 lines · Christian König

Am 01.04.2018 um 20:21 schrieb Takashi Iwai:

Quoted 31 lines
Quoted 29 lines · On Sun, 01 Apr 2018 19:58:11 +0200, Christian K6nig wrote:

Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:

Quoted 28 lines
Quoted 11 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

Quoted 8 lines
Quoted 6 lines

Because it is not well documented and repeated over and over again in drivers.

The problem is that people don't realized that the driver isn't loaded at all without the modeset=0 module option and demand fixing the resulting bad performance without modesetting.

Hm, I don't get it. What this options has to do with performance for a KMS-only driver...?

Well exactly that's the point, nothing.

The problem is that the option name is confusing to the end user because the expectation is that "nomodeset" just means that they only can't change the display mode.

Quoted 6 lines

Some (unfortunately quite a lot) people don't realize that for KMS drivers this means that the driver isn't even loaded and they also don't get any acceleration.

We had to explain that numerous times now. I think it would be best to give the option a more meaningful name.

Yeah, agreed with Christian. If we want a generic "pls disable all gfx accel" knob then probably best to put that into the drm core. And just outright fail loading the drm core if that happens, which will prevent all gfx drivers from loading.

Quoted 7 lines

That likely means a hole bunch of stuff won't work (usually sound keels over too), but that's what you get for this. Only disabling modesetting without disabling the entire driver doesn't work (never has, except for this UMS+GEM combo only i915 support, and not for long).

And once we have that knob, probably best to phase out all the per-driver options.

Another use-case that the per-driver disables enable is "i915 works but nouveau is broken due to crazy ACPI / PCIe PM / whatever". It seems likely this could happen with amdgpu as well.

The current set of capabilities has served developers fairly well in providing quick debug instructions to mildly-experienced users (i.e. enough to be able to edit kernel cmdline). I definitely wouldn't want to lose that.

The names are horrid. I think everyone agrees. In fact, when the driver is disabled by nomodeset or modeset=0, I think they should print like "driver completely disabled by modeset option" to avoid some of the user confusion Christian is referring to (which I've run into on a number of occasions as well). And/or maybe just refuse the driver load entirely rather than load-but-do-nothing. However being able to help users debug things seems more important than users being occasionally confused by options they added to kernel cmdline.

-ilia
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): CAKb7UvhG5nO9q1M=6fu6mnChObsskxFzgGXQPUJQCk1Q+E9ffQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#18 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 66 lines · Ilia Mirkin
Quoted 65 lines · Daniel Vetter
Quoted 47 lines · Christian König

Am 01.04.2018 um 20:21 schrieb Takashi Iwai:

Quoted 31 lines
Quoted 29 lines · On Sun, 01 Apr 2018 19:58:11 +0200, Christian K6nig wrote:

Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:

Quoted 28 lines
Quoted 11 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

Quoted 8 lines
Quoted 6 lines

Because it is not well documented and repeated over and over again in drivers.

The problem is that people don't realized that the driver isn't loaded at all without the modeset=0 module option and demand fixing the resulting bad performance without modesetting.

Hm, I don't get it. What this options has to do with performance for a KMS-only driver...?

Well exactly that's the point, nothing.

The problem is that the option name is confusing to the end user because the expectation is that "nomodeset" just means that they only can't change the display mode.

Quoted 6 lines

Some (unfortunately quite a lot) people don't realize that for KMS drivers this means that the driver isn't even loaded and they also don't get any acceleration.

We had to explain that numerous times now. I think it would be best to give the option a more meaningful name.

Yeah, agreed with Christian. If we want a generic "pls disable all gfx accel" knob then probably best to put that into the drm core. And just outright fail loading the drm core if that happens, which will prevent all gfx drivers from loading.

That likely means a hole bunch of stuff won't work (usually sound keels over too), but that's what you get for this. Only disabling modesetting without disabling the entire driver doesn't work (never has, except for this UMS+GEM combo only i915 support, and not for long).

Quoted 6 lines
Quoted 2 lines

And once we have that knob, probably best to phase out all the per-driver options.

Another use-case that the per-driver disables enable is "i915 works but nouveau is broken due to crazy ACPI / PCIe PM / whatever". It seems likely this could happen with amdgpu as well.

modprobe.blacklist=amdgpu

works as well as the modeset parameter for this.

Quoted 8 lines

The names are horrid. I think everyone agrees. In fact, when the driver is disabled by nomodeset or modeset=0, I think they should print like "driver completely disabled by modeset option" to avoid some of the user confusion Christian is referring to (which I've run into on a number of occasions as well). And/or maybe just refuse the driver load entirely rather than load-but-do-nothing. However being able to help users debug things seems more important than users being occasionally confused by options they added to kernel cmdline.

FWIW, if a new parameter or other mechanism is added for this, ideally it should allow preventing initialization on a per-GPU basis, instead of only per-driver, for systems with multiple GPUs supported by the same driver.

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): ea3e89e9-0a31-604f-c3f4-2693a0f9ca92-otUistvHUpPR7s880joybQ@public.gmane.org

#20 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 70 lines · Michel Dänzer
Quoted 69 lines · Ilia Mirkin
Quoted 67 lines · Daniel Vetter
Quoted 47 lines · Christian König

Am 01.04.2018 um 20:21 schrieb Takashi Iwai:

Quoted 31 lines
Quoted 29 lines · On Sun, 01 Apr 2018 19:58:11 +0200, Christian K6nig wrote:

Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:

Quoted 28 lines
Quoted 11 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

Quoted 8 lines
Quoted 6 lines

Because it is not well documented and repeated over and over again in drivers.

The problem is that people don't realized that the driver isn't loaded at all without the modeset=0 module option and demand fixing the resulting bad performance without modesetting.

Hm, I don't get it. What this options has to do with performance for a KMS-only driver...?

Well exactly that's the point, nothing.

The problem is that the option name is confusing to the end user because the expectation is that "nomodeset" just means that they only can't change the display mode.

Quoted 6 lines

Some (unfortunately quite a lot) people don't realize that for KMS drivers this means that the driver isn't even loaded and they also don't get any acceleration.

We had to explain that numerous times now. I think it would be best to give the option a more meaningful name.

Yeah, agreed with Christian. If we want a generic "pls disable all gfx accel" knob then probably best to put that into the drm core. And just outright fail loading the drm core if that happens, which will prevent all gfx drivers from loading.

That likely means a hole bunch of stuff won't work (usually sound keels over too), but that's what you get for this. Only disabling modesetting without disabling the entire driver doesn't work (never has, except for this UMS+GEM combo only i915 support, and not for long).

And once we have that knob, probably best to phase out all the per-driver options.

Quoted 7 lines
Quoted 3 lines

Another use-case that the per-driver disables enable is "i915 works but nouveau is broken due to crazy ACPI / PCIe PM / whatever". It seems likely this could happen with amdgpu as well.

modprobe.blacklist=amdgpu

works as well as the modeset parameter for this.

People who build their own kernels run into trouble too. Also does this work uniformly across all systems where it is a module? The appeal of the kernel param is that it's fool-proof.

Quoted 4 lines

FWIW, if a new parameter or other mechanism is added for this, ideally it should allow preventing initialization on a per-GPU basis, instead of only per-driver, for systems with multiple GPUs supported by the same driver.

Oh yeah, that'd be nice. (Optionally though, so that it's still easy to use for the fairly common single gpu case.)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): CAKb7UvibPPu9O0HKbGBz7Zd9av-1YR905zH5VypiYeMRbGasGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#22 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 75 lines · Ilia Mirkin
Quoted 74 lines · Michel Dänzer
Quoted 72 lines · Ilia Mirkin
Quoted 60 lines · Daniel Vetter
Quoted 47 lines · Christian König

Am 01.04.2018 um 20:21 schrieb Takashi Iwai:

Quoted 31 lines
Quoted 29 lines · On Sun, 01 Apr 2018 19:58:11 +0200, Christian K6nig wrote:

Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:

Quoted 28 lines
Quoted 11 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

Quoted 8 lines
Quoted 6 lines

Because it is not well documented and repeated over and over again in drivers.

The problem is that people don't realized that the driver isn't loaded at all without the modeset=0 module option and demand fixing the resulting bad performance without modesetting.

Hm, I don't get it. What this options has to do with performance for a KMS-only driver...?

Well exactly that's the point, nothing.

The problem is that the option name is confusing to the end user because the expectation is that "nomodeset" just means that they only can't change the display mode.

Quoted 6 lines

Some (unfortunately quite a lot) people don't realize that for KMS drivers this means that the driver isn't even loaded and they also don't get any acceleration.

We had to explain that numerous times now. I think it would be best to give the option a more meaningful name.

Yeah, agreed with Christian. If we want a generic "pls disable all gfx accel" knob then probably best to put that into the drm core. And just outright fail loading the drm core if that happens, which will prevent all gfx drivers from loading.

Quoted 7 lines

That likely means a hole bunch of stuff won't work (usually sound keels over too), but that's what you get for this. Only disabling modesetting without disabling the entire driver doesn't work (never has, except for this UMS+GEM combo only i915 support, and not for long).

And once we have that knob, probably best to phase out all the per-driver options.

Another use-case that the per-driver disables enable is "i915 works but nouveau is broken due to crazy ACPI / PCIe PM / whatever". It seems likely this could happen with amdgpu as well.

Quoted 5 lines
Quoted 3 lines

modprobe.blacklist=amdgpu

works as well as the modeset parameter for this.

People who build their own kernels run into trouble too.

There have always been various more or less serious issues with building amdgpu (and radeon) into the kernel. People who do so get to keep all pieces when it breaks.

Quoted 1 line

Also does this work uniformly across all systems where it is a module?

AFAIK yes.

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 957f79ce-80e9-d240-3632-e8b346708646-otUistvHUpPR7s880joybQ@public.gmane.org

#24 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 82 lines · Michel Dänzer
Quoted 75 lines · Ilia Mirkin
Quoted 74 lines · Michel Dänzer
Quoted 72 lines · Ilia Mirkin
Quoted 60 lines · Daniel Vetter
Quoted 47 lines · Christian König

Am 01.04.2018 um 20:21 schrieb Takashi Iwai:

Quoted 31 lines
Quoted 29 lines · On Sun, 01 Apr 2018 19:58:11 +0200, Christian K6nig wrote:

Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:

Quoted 28 lines
Quoted 11 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

Quoted 8 lines
Quoted 6 lines

Because it is not well documented and repeated over and over again in drivers.

The problem is that people don't realized that the driver isn't loaded at all without the modeset=0 module option and demand fixing the resulting bad performance without modesetting.

Hm, I don't get it. What this options has to do with performance for a KMS-only driver...?

Well exactly that's the point, nothing.

The problem is that the option name is confusing to the end user because the expectation is that "nomodeset" just means that they only can't change the display mode.

Quoted 6 lines

Some (unfortunately quite a lot) people don't realize that for KMS drivers this means that the driver isn't even loaded and they also don't get any acceleration.

We had to explain that numerous times now. I think it would be best to give the option a more meaningful name.

Yeah, agreed with Christian. If we want a generic "pls disable all gfx accel" knob then probably best to put that into the drm core. And just outright fail loading the drm core if that happens, which will prevent all gfx drivers from loading.

Quoted 7 lines

That likely means a hole bunch of stuff won't work (usually sound keels over too), but that's what you get for this. Only disabling modesetting without disabling the entire driver doesn't work (never has, except for this UMS+GEM combo only i915 support, and not for long).

And once we have that knob, probably best to phase out all the per-driver options.

Another use-case that the per-driver disables enable is "i915 works but nouveau is broken due to crazy ACPI / PCIe PM / whatever". It seems likely this could happen with amdgpu as well.

Quoted 5 lines
Quoted 3 lines

modprobe.blacklist=amdgpu

works as well as the modeset parameter for this.

People who build their own kernels run into trouble too.

Quoted 8 lines

There have always been various more or less serious issues with building amdgpu (and radeon) into the kernel. People who do so get to keep all pieces when it breaks.

Quoted 1 line

Also does this work uniformly across all systems where it is a module?

AFAIK yes.

Sadly modprobe.blacklist doesn't prevent X/whatever from loading the module anyway.

I use modprobe.blacklist myself all the time for i915 development, but I also have all GUI junk disabled as well so that I can load the module myself when I'm actually ready for it (typically after I've enabled netconsole).

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

#26 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 79 lines · Ville Syrjälä
Quoted 78 lines · Michel Dänzer
Quoted 77 lines · Ilia Mirkin
Quoted 76 lines · Michel Dänzer
Quoted 66 lines · Ilia Mirkin
Quoted 65 lines · Daniel Vetter
Quoted 47 lines · Christian König

Am 01.04.2018 um 20:21 schrieb Takashi Iwai:

Quoted 31 lines
Quoted 29 lines · On Sun, 01 Apr 2018 19:58:11 +0200, Christian K6nig wrote:

Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:

Quoted 28 lines
Quoted 11 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

Quoted 8 lines
Quoted 6 lines

Because it is not well documented and repeated over and over again in drivers.

The problem is that people don't realized that the driver isn't loaded at all without the modeset=0 module option and demand fixing the resulting bad performance without modesetting.

Hm, I don't get it. What this options has to do with performance for a KMS-only driver...?

Well exactly that's the point, nothing.

The problem is that the option name is confusing to the end user because the expectation is that "nomodeset" just means that they only can't change the display mode.

Quoted 6 lines

Some (unfortunately quite a lot) people don't realize that for KMS drivers this means that the driver isn't even loaded and they also don't get any acceleration.

We had to explain that numerous times now. I think it would be best to give the option a more meaningful name.

Yeah, agreed with Christian. If we want a generic "pls disable all gfx accel" knob then probably best to put that into the drm core. And just outright fail loading the drm core if that happens, which will prevent all gfx drivers from loading.

That likely means a hole bunch of stuff won't work (usually sound keels over too), but that's what you get for this. Only disabling modesetting without disabling the entire driver doesn't work (never has, except for this UMS+GEM combo only i915 support, and not for long).

Quoted 6 lines
Quoted 2 lines

And once we have that knob, probably best to phase out all the per-driver options.

Another use-case that the per-driver disables enable is "i915 works but nouveau is broken due to crazy ACPI / PCIe PM / whatever". It seems likely this could happen with amdgpu as well.

modprobe.blacklist=amdgpu

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

works as well as the modeset parameter for this.

People who build their own kernels run into trouble too.

There have always been various more or less serious issues with building amdgpu (and radeon) into the kernel. People who do so get to keep all pieces when it breaks.

fwiw, same roughly applies for i915. We try to make it work, by allowing firmware to be loaded later on and asynchronously. But if you fail to provide firmware the driver simply hangs forever. At least in certain cases, for others we simply never clock gate/shutdown the chip. Also not awesome (and we're closing all corresponding bug reports too).

We don't yet need firmware for basic display support, so you'll get at least a picture to be able to look at dmesg. If you remember to start X without accel, that is :-)

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Also does this work uniformly across all systems where it is a module?

AFAIK yes.

Sadly modprobe.blacklist doesn't prevent X/whatever from loading the module anyway.

A generic "please don't bind anything to this device path" kernel property would be really nice for this. And hopefully something that could be merged into the drivers/base core code.

Plus a generic and all-encompassing no_modeset^Wno_gfx_I_mean_it knob would cover everything I think.
-Daniel

Quoted 4 lines

I use modprobe.blacklist myself all the time for i915 development, but I also have all GUI junk disabled as well so that I can load the module myself when I'm actually ready for it (typically after I've enabled netconsole).

Oh, that's why modprobe.blacklist never works for me. TIL. -Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20180403150235.GV3881-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org

#28 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 113 lines · Daniel Vetter
Quoted 79 lines · Ville Syrjälä
Quoted 78 lines · Michel Dänzer
Quoted 77 lines · Ilia Mirkin
Quoted 76 lines · Michel Dänzer
Quoted 66 lines · Ilia Mirkin
Quoted 65 lines · Daniel Vetter
Quoted 47 lines · Christian König

Am 01.04.2018 um 20:21 schrieb Takashi Iwai:

Quoted 31 lines
Quoted 29 lines · On Sun, 01 Apr 2018 19:58:11 +0200, Christian K6nig wrote:

Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:

Quoted 28 lines
Quoted 11 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide
for enforcing or disabling the driver load. Interestingly, the
amdgpu_mode variable declaration is already found in the header file,
but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

Quoted 8 lines
Quoted 6 lines

Because it is not well documented and repeated over and over again in drivers.

The problem is that people don't realized that the driver isn't loaded at all without the modeset=0 module option and demand fixing the resulting bad performance without modesetting.

Hm, I don't get it. What this options has to do with performance for a KMS-only driver...?

Well exactly that's the point, nothing.

The problem is that the option name is confusing to the end user because the expectation is that "nomodeset" just means that they only can't change the display mode.

Quoted 6 lines

Some (unfortunately quite a lot) people don't realize that for KMS drivers this means that the driver isn't even loaded and they also don't get any acceleration.

We had to explain that numerous times now. I think it would be best to give the option a more meaningful name.

Yeah, agreed with Christian. If we want a generic "pls disable all gfx accel" knob then probably best to put that into the drm core. And just outright fail loading the drm core if that happens, which will prevent all gfx drivers from loading.

That likely means a hole bunch of stuff won't work (usually sound keels over too), but that's what you get for this. Only disabling modesetting without disabling the entire driver doesn't work (never has, except for this UMS+GEM combo only i915 support, and not for long).

Quoted 6 lines
Quoted 2 lines

And once we have that knob, probably best to phase out all the per-driver options.

Another use-case that the per-driver disables enable is "i915 works but nouveau is broken due to crazy ACPI / PCIe PM / whatever". It seems likely this could happen with amdgpu as well.

modprobe.blacklist=amdgpu

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

works as well as the modeset parameter for this.

People who build their own kernels run into trouble too.

There have always been various more or less serious issues with building amdgpu (and radeon) into the kernel. People who do so get to keep all pieces when it breaks.

fwiw, same roughly applies for i915. We try to make it work, by allowing firmware to be loaded later on and asynchronously. But if you fail to provide firmware the driver simply hangs forever. At least in certain cases, for others we simply never clock gate/shutdown the chip. Also not awesome (and we're closing all corresponding bug reports too).

We don't yet need firmware for basic display support, so you'll get at least a picture to be able to look at dmesg. If you remember to start X without accel, that is :-)

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Also does this work uniformly across all systems where it is a module?

AFAIK yes.

Sadly modprobe.blacklist doesn't prevent X/whatever from loading the module anyway.

A generic "please don't bind anything to this device path" kernel property would be really nice for this. And hopefully something that could be merged into the drivers/base core code.

Plus a generic and all-encompassing no_modeset^Wno_gfx_I_mean_it knob would cover everything I think.
-Daniel

Quoted 6 lines
Quoted 4 lines

I use modprobe.blacklist myself all the time for i915 development, but I also have all GUI junk disabled as well so that I can load the module myself when I'm actually ready for it (typically after I've enabled netconsole).

Oh, that's why modprobe.blacklist never works for me. TIL.

The other common reason is snd_hda_intel. That one needs to be blacklisted at the same time, on modern Intel hw at least. Also one must remember to write it as "snd_hda_intel" instead of "snd-hda-intel", otherwise it doesn't do anything.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#29 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

In reply to Ville Syrjälä
Quoted 88 lines · Ville Syrjälä
Quoted 87 lines · Michel Dänzer
Quoted 75 lines · Ilia Mirkin
Quoted 74 lines · Michel Dänzer
Quoted 72 lines · Ilia Mirkin
Quoted 60 lines · Daniel Vetter
Quoted 47 lines · Christian König

Am 01.04.2018 um 20:21 schrieb Takashi Iwai:

Quoted 31 lines
Quoted 29 lines · On Sun, 01 Apr 2018 19:58:11 +0200, Christian K6nig wrote:

Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:

Quoted 28 lines
Quoted 11 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

Quoted 5 lines

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Every other DRM driver has this and this is a well-documented workaround for "graphics are messed up when I install linux", why not allow a uniform experience for the end users who are just trying to get their systems up and running?

Quoted 8 lines
Quoted 6 lines

Because it is not well documented and repeated over and over again in drivers.

The problem is that people don't realized that the driver isn't loaded at all without the modeset=0 module option and demand fixing the resulting bad performance without modesetting.

Hm, I don't get it. What this options has to do with performance for a KMS-only driver...?

Well exactly that's the point, nothing.

The problem is that the option name is confusing to the end user because the expectation is that "nomodeset" just means that they only can't change the display mode.

Quoted 6 lines

Some (unfortunately quite a lot) people don't realize that for KMS drivers this means that the driver isn't even loaded and they also don't get any acceleration.

We had to explain that numerous times now. I think it would be best to give the option a more meaningful name.

Yeah, agreed with Christian. If we want a generic "pls disable all gfx accel" knob then probably best to put that into the drm core. And just outright fail loading the drm core if that happens, which will prevent all gfx drivers from loading.

Quoted 7 lines

That likely means a hole bunch of stuff won't work (usually sound keels over too), but that's what you get for this. Only disabling modesetting without disabling the entire driver doesn't work (never has, except for this UMS+GEM combo only i915 support, and not for long).

And once we have that knob, probably best to phase out all the per-driver options.

Another use-case that the per-driver disables enable is "i915 works but nouveau is broken due to crazy ACPI / PCIe PM / whatever". It seems likely this could happen with amdgpu as well.

Quoted 5 lines
Quoted 3 lines

modprobe.blacklist=amdgpu

works as well as the modeset parameter for this.

People who build their own kernels run into trouble too.

There have always been various more or less serious issues with building amdgpu (and radeon) into the kernel. People who do so get to keep all pieces when it breaks.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Also does this work uniformly across all systems where it is a module?

AFAIK yes.

Sadly modprobe.blacklist doesn't prevent X/whatever from loading the module anyway.

AFAICT xf86-video-amdgpu and modesetting have never even tried loading the kernel module, and neither has xf86-video-ati for years at least.

Signature · 7 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): CAKb7Uvh_CxE=Zg_F0tentwXK64_baxs0TCQ-K9Mh_Mjf+NV_DA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#31 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 19 lines · Ilia Mirkin
Quoted 17 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 7 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

Quoted 8 lines
Quoted 2 lines

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Building amdgpu into the kernel isn't feasible for a generic kernel such as a distro one, because it would require including all microcode into the kernel as well (12M right now, and growing).

If a user decides to build amdgpu into their custom kernel and runs into trouble due to that, that's "doctor, it hurts if I do this" territory.

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
maintainer
#32 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Am 03.04.2018 um 10:36 schrieb Michel Dänzer:

Quoted 25 lines · Ilia Mirkin
Quoted 17 lines
Quoted 15 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

Quoted 7 lines
Quoted 2 lines

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Quoted 6 lines

Building amdgpu into the kernel isn't feasible for a generic kernel such as a distro one, because it would require including all microcode into the kernel as well (12M right now, and growing).

If a user decides to build amdgpu into their custom kernel and runs into trouble due to that, that's "doctor, it hurts if I do this" territory.

Correct, but I agree that even in this situation it would be very helpful to prevent the gfx drivers from loading and fallback to efifb/vesafd (or whatever the platform provides).

It's just that the "nomodeset" and "amdgpu.modeset=0" options are really not well named for this task.

Christian.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): 781c3a0b-e199-c637-410a-521fe5fd5170-5C7GfCeVMHo@public.gmane.org

#34 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 34 lines · On Tue, 03 Apr 2018 10:57:56 +0200, Christian K6nig wrote:

Am 03.04.2018 um 10:36 schrieb Michel Dänzer:

Quoted 25 lines · Ilia Mirkin
Quoted 17 lines
Quoted 15 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

Quoted 7 lines
Quoted 2 lines

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Quoted 6 lines

Building amdgpu into the kernel isn't feasible for a generic kernel such as a distro one, because it would require including all microcode into the kernel as well (12M right now, and growing).

If a user decides to build amdgpu into their custom kernel and runs into trouble due to that, that's "doctor, it hurts if I do this" territory.

Quoted 6 lines

Correct, but I agree that even in this situation it would be very helpful to prevent the gfx drivers from loading and fallback to efifb/vesafd (or whatever the platform provides).

It's just that the "nomodeset" and "amdgpu.modeset=0" options are really not well named for this task.

Agreed with the naming mess. But OTOH, it's already a thing that is too popular to kill. You can add a more suitable option name, but you cannot drop these existing ones easily. It's already in a gray zone of the golden "don't break user-space" rule.

thanks,

Takashi
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

#36 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 40 lines · Takashi Iwai
Quoted 38 lines · On Tue, 03 Apr 2018 10:57:56 +0200, Christian K6nig wrote:

Am 03.04.2018 um 10:36 schrieb Michel Dänzer:

Quoted 25 lines · Ilia Mirkin
Quoted 17 lines
Quoted 15 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

Quoted 7 lines
Quoted 2 lines

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Quoted 6 lines

Building amdgpu into the kernel isn't feasible for a generic kernel such as a distro one, because it would require including all microcode into the kernel as well (12M right now, and growing).

If a user decides to build amdgpu into their custom kernel and runs into trouble due to that, that's "doctor, it hurts if I do this" territory.

Correct, but I agree that even in this situation it would be very helpful to prevent the gfx drivers from loading and fallback to efifb/vesafd (or whatever the platform provides).

Quoted 7 lines
Quoted 2 lines

It's just that the "nomodeset" and "amdgpu.modeset=0" options are really not well named for this task.

Agreed with the naming mess. But OTOH, it's already a thing that is too popular to kill. You can add a more suitable option name, but you cannot drop these existing ones easily. It's already in a gray zone of the golden "don't break user-space" rule.

That's quite a stretch argument, given that amdgpu has never supported the modeset parameter. Also, module parameters aren't UAPI.

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#37 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 45 lines · On Tue, 03 Apr 2018 11:18:34 +0200, Michel D4nzer wrote:
Quoted 43 lines · Takashi Iwai
Quoted 40 lines · On Tue, 03 Apr 2018 10:57:56 +0200, Christian K6nig wrote:

Am 03.04.2018 um 10:36 schrieb Michel Dänzer:

Quoted 25 lines · Ilia Mirkin
Quoted 17 lines
Quoted 15 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

Quoted 7 lines
Quoted 2 lines

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Quoted 6 lines

Building amdgpu into the kernel isn't feasible for a generic kernel such as a distro one, because it would require including all microcode into the kernel as well (12M right now, and growing).

If a user decides to build amdgpu into their custom kernel and runs into trouble due to that, that's "doctor, it hurts if I do this" territory.

Correct, but I agree that even in this situation it would be very helpful to prevent the gfx drivers from loading and fallback to efifb/vesafd (or whatever the platform provides).

It's just that the "nomodeset" and "amdgpu.modeset=0" options are really not well named for this task.

Quoted 7 lines
Quoted 4 lines

Agreed with the naming mess. But OTOH, it's already a thing that is too popular to kill. You can add a more suitable option name, but you cannot drop these existing ones easily. It's already in a gray zone of the golden "don't break user-space" rule.

That's quite a stretch argument, given that amdgpu has never supported the modeset parameter.

Oh I don't mean about my own patch but the foreseen action Christian mentioned.

Quoted 1 line

Also, module parameters aren't UAPI.

Right, but we care not only about UAPI. If the kernel breaks something, it's a regression. It's what Linus suggested many times. The same argument has been applied to proc or sysfs files in the past, and we had to correct back again.

Don't get me wrong: I'm not always objecting to the removal of any module existing options. But if it break a major usage pattern, it's a problem. And the removal of nomodeset option would be a kind of such things, IMO, that's why I mentioned as "a gray zone" in the above.

thanks,

Takashi
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#39 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 65 lines · Takashi Iwai
Quoted 45 lines · On Tue, 03 Apr 2018 11:18:34 +0200, Michel D4nzer wrote:
Quoted 43 lines · Takashi Iwai
Quoted 40 lines · On Tue, 03 Apr 2018 10:57:56 +0200, Christian K6nig wrote:

Am 03.04.2018 um 10:36 schrieb Michel Dänzer:

Quoted 25 lines · Ilia Mirkin
Quoted 17 lines
Quoted 15 lines · Christian König

Am 30.03.2018 um 22:45 schrieb Takashi Iwai:

Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

NAK, modesetting is mandatory for amdgpu and we should probably remove the option to disable it from other DRM drivers without UMS support as well (pretty much all of them now).

If you want to prevent a driver from loading I think the correct way to do so is to give modprobe.blacklist=amdgpu on the kernel commandline.

Quoted 7 lines
Quoted 2 lines

That would remove the possibility to prevent the driver from loading when it is compiled in, but I don't see much of a problem with that.

Having a way to kill the graphics driver is a very useful debugging tool, and also a quick and easy way to get out of an unpleasant situation where graphics are messed up / system hangs / etc. The modprobe blacklist kernel arg only works in certain environments (and only if it's a module).

Quoted 6 lines

Building amdgpu into the kernel isn't feasible for a generic kernel such as a distro one, because it would require including all microcode into the kernel as well (12M right now, and growing).

If a user decides to build amdgpu into their custom kernel and runs into trouble due to that, that's "doctor, it hurts if I do this" territory.

Correct, but I agree that even in this situation it would be very helpful to prevent the gfx drivers from loading and fallback to efifb/vesafd (or whatever the platform provides).

It's just that the "nomodeset" and "amdgpu.modeset=0" options are really not well named for this task.

Quoted 7 lines
Quoted 4 lines

Agreed with the naming mess. But OTOH, it's already a thing that is too popular to kill. You can add a more suitable option name, but you cannot drop these existing ones easily. It's already in a gray zone of the golden "don't break user-space" rule.

That's quite a stretch argument, given that amdgpu has never supported the modeset parameter.

Oh I don't mean about my own patch but the foreseen action Christian mentioned.

Quoted 1 line

Also, module parameters aren't UAPI.

Right, but we care not only about UAPI. If the kernel breaks something, it's a regression. It's what Linus suggested many times. The same argument has been applied to proc or sysfs files in the past, and we had to correct back again.

Quoted 5 lines

Don't get me wrong: I'm not always objecting to the removal of any module existing options. But if it break a major usage pattern, it's a problem. And the removal of nomodeset option would be a kind of such things, IMO, that's why I mentioned as "a gray zone" in the above.

Note that nomodeset and the per-driver modeset parameters are separate things. amdgpu has always supported the former, but has never supported the latter.

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): e4933491-65be-4b31-95de-cf1147dd312c-otUistvHUpPR7s880joybQ@public.gmane.org

#41 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Quoted 8 lines · Michel Dänzer
Quoted 4 lines · Takashi Iwai

Agreed with the naming mess. But OTOH, it's already a thing that is too popular to kill. You can add a more suitable option name, but you cannot drop these existing ones easily. It's already in a gray zone of the golden "don't break user-space" rule.

That's quite a stretch argument, given that amdgpu has never supported the modeset parameter.

That much is clear.

Quoted 1 line

Also, module parameters aren't UAPI.

[citation needed]. I agree with Takashi it's a gray area.

You can have "unsafe" module parameters that taint the kernel when set, see module_param_unsafe and module_param_named_unsafe. Using those should make it clear all bets are off.

BR,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by
#42 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

In reply to a message not in the archive
Quoted 7 lines · Takashi Iwai

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

I'd like to land this patch, I realise people have NAKed it but for consistency across drivers I'm going to ask we land it or something like it.

The main use case for this is actually where you have amdgpu crashes on load, and you want to debug them, people boot with nomodeset and then modprobe amdgpu modeset=1 to get the crash in a running system. This works for numerous other drivers, I'm not sure why amdgpu needs to be the odd one out.

Dave.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#43 lore raw

Re: [PATCH 2/2] drm/amdgpu: Add modeset module option

Am 25.09.19 um 10:07 schrieb Dave Airlie:

Quoted 11 lines · Takashi Iwai
Quoted 6 lines

amdgpu driver lacks of modeset module option other drm drivers provide for enforcing or disabling the driver load. Interestingly, the amdgpu_mode variable declaration is already found in the header file, but the actual implementation seems to have been forgotten.

This patch adds the missing piece.

I'd like to land this patch, I realise people have NAKed it but for consistency across drivers I'm going to ask we land it or something like it.

Quoted 5 lines

The main use case for this is actually where you have amdgpu crashes on load, and you want to debug them, people boot with nomodeset and then modprobe amdgpu modeset=1 to get the crash in a running system. This works for numerous other drivers, I'm not sure why amdgpu needs to be the odd one out.

Because this is essentially the wrong approach.

The correct way to prevent a module from automatically loading is to add modprobe.blacklist=$name to the kernel command line.

The modeset and nomodeset kernel options where used to switch between KMS and UMS and not to disable driver load.

We should have removed those options with the removal of UMS or otherwise it becomes just another ancient cruft we need to carry forward in potentially all drivers.

Regards,
Christian.

Quoted 4 lines

Dave.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Applied
#44 lore raw
In reply to a message not in the archive
Quoted 7 lines · Takashi Iwai

amdgpu driver checks vgacon_text_force() after some initializations but without cleaning up. This will result in leaks.

Move the check of vgacon_text_force() to the beginning of amdgpu_init() for fixing it and also for optimization.

Applied. Thanks!

Alex

Quoted 34 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +5 -5
index 50afcf65181a..e55792d3cd12 100644
@@ -905,6 +905,11 @@ static int __init amdgpu_init(void)
 {
        int r;
 
+       if (vgacon_text_force()) {
+               DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n");
+               return -EINVAL;
+       }
+
        r = amdgpu_sync_init();
        if (r)
                goto error_sync;
@@ -913,10 +918,6 @@ static int __init amdgpu_init(void)
        if (r)
                goto error_fence;
 
-       if (vgacon_text_force()) {
-               DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n");
-               return -EINVAL;
-       }
        DRM_INFO("amdgpu kernel modesetting enabled.\n");
        driver = &kms_driver;
        pdriver = &amdgpu_kms_pci_driver;
--

2.16.2

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx