Skip to contentSkip to conversation

drm/amdgpu: add missing documentation on new module parameters

PATCH In review Alex Deucher 3 participants 7 messages Jul 3, 2019 – Jul 8, 2019 5 messages not in the archive

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

PATCH 1/2 drm/amdgpu: add missing documentation on new module parameters

New parameters added for navi lack documentation.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +13 -0
index 3913a75924c6..7941a5368fb5 100644
@@ -581,14 +581,27 @@ MODULE_PARM_DESC(async_gfx_ring,
 	"Asynchronous GFX rings that could be configured with either different priorities (HP3D ring and LP3D ring), or equal priorities (0 = disabled, 1 = enabled (default))");
 module_param_named(async_gfx_ring, amdgpu_async_gfx_ring, int, 0444);
 
+/**
+ * DOC: mcbp (int)
+ * It is used to enable mid command buffer preemption. (0 = disabled (default), 1 = enabled)
+ */
 MODULE_PARM_DESC(mcbp,
 	"Enable Mid-command buffer preemption (0 = disabled (default), 1 = enabled)");
 module_param_named(mcbp, amdgpu_mcbp, int, 0444);
 
+/**
+ * DOC: discovery (int)
+ * Allow driver to discover hardware IP information from IP Discovery table at the top of VRAM.
+ */
 MODULE_PARM_DESC(discovery,
 	"Allow driver to discover hardware IPs from IP Discovery table at the top of VRAM");
 module_param_named(discovery, amdgpu_discovery, int, 0444);
 
+/**
+ * DOC: mes (int)
+ * Enable Micro Engine Scheduler. This is a new hw scheduling engine for gfx, sdma, and compute.
+ * (0 = disabled (default), 1 = enabled)
+ */
 MODULE_PARM_DESC(mes,
 	"Enable Micro Engine Scheduler (0 = disabled (default), 1 = enabled)");
 module_param_named(mes, amdgpu_mes, int, 0444);
Signature · 6 lines
2.20.1

_______________________________________________
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): 20190703151341.5916-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw

PATCH 2/2 drm/amdgpu: enable IP discovery by default on navi

Use the IP discovery table rather than hardcoding the settings in the driver.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -1
index 7941a5368fb5..6f7772eeeb78 100644
@@ -140,7 +140,7 @@ uint amdgpu_smu_memory_pool_size = 0;
 uint amdgpu_dc_feature_mask = 0;
 int amdgpu_async_gfx_ring = 1;
 int amdgpu_mcbp = 0;
-int amdgpu_discovery = 0;
+int amdgpu_discovery = -1;
 int amdgpu_mes = 0;
 
 struct amdgpu_mgpu_info mgpu_info = {
@@ -592,6 +592,7 @@ module_param_named(mcbp, amdgpu_mcbp, int, 0444);
 /**
  * DOC: discovery (int)
  * Allow driver to discover hardware IP information from IP Discovery table at the top of VRAM.
+ * (-1 = auto (default), 0 = disabled, 1 = enabled)
  */
 MODULE_PARM_DESC(discovery,
 	"Allow driver to discover hardware IPs from IP Discovery table at the top of VRAM");
Signature · 6 lines
2.20.1

_______________________________________________
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): 20190703151341.5916-2-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#4 lore raw

Re: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

Ping on this series.

Alex

Quoted 31 lines · Alex Deucher

Use the IP discovery table rather than hardcoding the settings in the driver.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index 7941a5368fb5..6f7772eeeb78 100644
@@ -140,7 +140,7 @@ uint amdgpu_smu_memory_pool_size = 0;
 uint amdgpu_dc_feature_mask = 0;
 int amdgpu_async_gfx_ring = 1;
 int amdgpu_mcbp = 0;
-int amdgpu_discovery = 0;
+int amdgpu_discovery = -1;
 int amdgpu_mes = 0;
 
 struct amdgpu_mgpu_info mgpu_info = {
@@ -592,6 +592,7 @@ module_param_named(mcbp, amdgpu_mcbp, int, 0444);
 /**
  * DOC: discovery (int)
  * Allow driver to discover hardware IP information from IP Discovery table at the top of VRAM.
+ * (-1 = auto (default), 0 = disabled, 1 = enabled)
  */
 MODULE_PARM_DESC(discovery,
        "Allow driver to discover hardware IPs from IP Discovery table at the top of VRAM");
--
Quoted 2 lines

2.20.1

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

#5 lore raw

Re: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

In reply to a message not in the archive

Hi Alex,

I see there are many 'auto' module params for amdgpu, could you please explain about the historical intention of using value '-1'? and shall we check 'amdgpu_discovery' against '-1' for all the code paths in amdgpu_device.c and navi10_reg_init.c?

BR,
Xiaojie

________________________________________
From: amd-gfx <[email protected]> on behalf of Alex Deucher <[email protected]>
Sent: Wednesday, July 3, 2019 11:13 PM
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

Use the IP discovery table rather than hardcoding the settings in the driver.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -1
index 7941a5368fb5..6f7772eeeb78 100644
@@ -140,7 +140,7 @@ uint amdgpu_smu_memory_pool_size = 0;
 uint amdgpu_dc_feature_mask = 0;
 int amdgpu_async_gfx_ring = 1;
 int amdgpu_mcbp = 0;
-int amdgpu_discovery = 0;
+int amdgpu_discovery = -1;
 int amdgpu_mes = 0;
 
 struct amdgpu_mgpu_info mgpu_info = {
@@ -592,6 +592,7 @@ module_param_named(mcbp, amdgpu_mcbp, int, 0444);
 /**
  * DOC: discovery (int)
  * Allow driver to discover hardware IP information from IP Discovery table at the top of VRAM.
+ * (-1 = auto (default), 0 = disabled, 1 = enabled)
  */
 MODULE_PARM_DESC(discovery,
        "Allow driver to discover hardware IPs from IP Discovery table at the top of VRAM");

--
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
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): BN8PR12MB36027C3FF20B1FAD06119E2D89F60-h6+T2+wrnx1lGJ5xs4l7kQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#7 lore raw

Re: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

auto just means do the right thing for each asic. For example, if there is a new asic program and the discovery tables are not available yet, for that program, auto means don't use the discovery table. For other programs where the table is available (e.g., navi10 and 14), then auto means use the table.

Alex
________________________________
From: Yuan, Xiaojie
Sent: Monday, July 8, 2019 11:31 AM
To: Alex Deucher; [email protected]
Cc: Deucher, Alexander
Subject: Re: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

Hi Alex,

I see there are many 'auto' module params for amdgpu, could you please explain about the historical intention of using value '-1'? and shall we check 'amdgpu_discovery' against '-1' for all the code paths in amdgpu_device.c and navi10_reg_init.c?

BR,
Xiaojie

________________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Alex Deucher <[email protected]>
Sent: Wednesday, July 3, 2019 11:13 PM
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

Use the IP discovery table rather than hardcoding the settings in the driver.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -1
index 7941a5368fb5..6f7772eeeb78 100644
@@ -140,7 +140,7 @@ uint amdgpu_smu_memory_pool_size = 0;
 uint amdgpu_dc_feature_mask = 0;
 int amdgpu_async_gfx_ring = 1;
 int amdgpu_mcbp = 0;
-int amdgpu_discovery = 0;
+int amdgpu_discovery = -1;
 int amdgpu_mes = 0;
 
 struct amdgpu_mgpu_info mgpu_info = {
@@ -592,6 +592,7 @@ module_param_named(mcbp, amdgpu_mcbp, int, 0444);
 /**
  * DOC: discovery (int)
  * Allow driver to discover hardware IP information from IP Discovery table at the top of VRAM.
+ * (-1 = auto (default), 0 = disabled, 1 = enabled)
  */
 MODULE_PARM_DESC(discovery,
        "Allow driver to discover hardware IPs from IP Discovery table at the top of VRAM");

--
2.20.1

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

_______________________________________________
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): BN6PR12MB180928A19CDDBF2845F07BA7F7F60-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#9 lore raw

Re: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

Got it. Thanks for the explanation.
Patch is Reviewed-by: Xiaojie Yuan <[email protected]>

BR,
Xiaojie

________________________________________
From: Deucher, Alexander
Sent: Monday, July 8, 2019 11:38 PM
To: Yuan, Xiaojie; Alex Deucher; [email protected]
Subject: Re: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

auto just means do the right thing for each asic. For example, if there is a new asic program and the discovery tables are not available yet, for that program, auto means don't use the discovery table. For other programs where the table is available (e.g., navi10 and 14), then auto means use the table.

Alex
________________________________
From: Yuan, Xiaojie
Sent: Monday, July 8, 2019 11:31 AM
To: Alex Deucher; [email protected]
Cc: Deucher, Alexander
Subject: Re: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

Hi Alex,

I see there are many 'auto' module params for amdgpu, could you please explain about the historical intention of using value '-1'? and shall we check 'amdgpu_discovery' against '-1' for all the code paths in amdgpu_device.c and navi10_reg_init.c?

BR,
Xiaojie

________________________________________
From: amd-gfx <[email protected]> on behalf of Alex Deucher <[email protected]>
Sent: Wednesday, July 3, 2019 11:13 PM
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

Use the IP discovery table rather than hardcoding the settings in the driver.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -1
index 7941a5368fb5..6f7772eeeb78 100644
@@ -140,7 +140,7 @@ uint amdgpu_smu_memory_pool_size = 0;
 uint amdgpu_dc_feature_mask = 0;
 int amdgpu_async_gfx_ring = 1;
 int amdgpu_mcbp = 0;
-int amdgpu_discovery = 0;
+int amdgpu_discovery = -1;
 int amdgpu_mes = 0;
 
 struct amdgpu_mgpu_info mgpu_info = {
@@ -592,6 +592,7 @@ module_param_named(mcbp, amdgpu_mcbp, int, 0444);
 /**
  * DOC: discovery (int)
  * Allow driver to discover hardware IP information from IP Discovery table at the top of VRAM.
+ * (-1 = auto (default), 0 = disabled, 1 = enabled)
  */
 MODULE_PARM_DESC(discovery,
        "Allow driver to discover hardware IPs from IP Discovery table at the top of VRAM");

--
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
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): BN8PR12MB36023928F4E9E4EDFB0E93DF89F60-h6+T2+wrnx1lGJ5xs4l7kQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#11 lore raw

Re: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

and we might need a follow-up patch to check if (amdgpu_discovery && asic_type >= CHIP_NAVI10) in amdgpu_device.c.

BR,
Xiaojie

________________________________________
From: amd-gfx <[email protected]> on behalf of Yuan, Xiaojie <[email protected]>
Sent: Monday, July 8, 2019 11:45 PM
To: Deucher, Alexander; Alex Deucher; [email protected]
Subject: Re: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

Got it. Thanks for the explanation.
Patch is Reviewed-by: Xiaojie Yuan <[email protected]>

BR,
Xiaojie

________________________________________
From: Deucher, Alexander
Sent: Monday, July 8, 2019 11:38 PM
To: Yuan, Xiaojie; Alex Deucher; [email protected]
Subject: Re: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

auto just means do the right thing for each asic. For example, if there is a new asic program and the discovery tables are not available yet, for that program, auto means don't use the discovery table. For other programs where the table is available (e.g., navi10 and 14), then auto means use the table.

Alex
________________________________
From: Yuan, Xiaojie
Sent: Monday, July 8, 2019 11:31 AM
To: Alex Deucher; [email protected]
Cc: Deucher, Alexander
Subject: Re: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

Hi Alex,

I see there are many 'auto' module params for amdgpu, could you please explain about the historical intention of using value '-1'? and shall we check 'amdgpu_discovery' against '-1' for all the code paths in amdgpu_device.c and navi10_reg_init.c?

BR,
Xiaojie

________________________________________
From: amd-gfx <[email protected]> on behalf of Alex Deucher <[email protected]>
Sent: Wednesday, July 3, 2019 11:13 PM
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH 2/2] drm/amdgpu: enable IP discovery by default on navi

Use the IP discovery table rather than hardcoding the settings in the driver.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -1
index 7941a5368fb5..6f7772eeeb78 100644
@@ -140,7 +140,7 @@ uint amdgpu_smu_memory_pool_size = 0;
 uint amdgpu_dc_feature_mask = 0;
 int amdgpu_async_gfx_ring = 1;
 int amdgpu_mcbp = 0;
-int amdgpu_discovery = 0;
+int amdgpu_discovery = -1;
 int amdgpu_mes = 0;
 
 struct amdgpu_mgpu_info mgpu_info = {
@@ -592,6 +592,7 @@ module_param_named(mcbp, amdgpu_mcbp, int, 0444);
 /**
  * DOC: discovery (int)
  * Allow driver to discover hardware IP information from IP Discovery table at the top of VRAM.
+ * (-1 = auto (default), 0 = disabled, 1 = enabled)
  */
 MODULE_PARM_DESC(discovery,
        "Allow driver to discover hardware IPs from IP Discovery table at the top of VRAM");

--
2.20.1

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