Skip to contentSkip to conversation

drm/amdgpu: add ip_block_mask user option for static builds

PATCH In review Shirish S 3 participants 3 messages Aug 21, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Shirish S

author
#0 lore raw

PATCH 1/1 drm/amdgpu: add ip_block_mask user option for static builds

This patch extends amdgpu.ip_block_mask to a Kconfig option as well, that can be altered by user at build time for OS' that do not permit passing dyanamic loading of amdgpu driver and also passing command line arguments.

Note: This option to be used purely for debugging purposes and amdgpu driver is not productised/tested extensively with any of its blokcs disabled.
The default value of this option enables all IP's.

---
 drivers/gpu/drm/amd/amdgpu/Kconfig      | 7 +++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/Kconfig +7 -0
index e8af1f5..3f94ae5 100644
@@ -23,6 +23,13 @@ config DRM_AMDGPU_CIK
 
 	  radeon.cik_support=0 amdgpu.cik_support=1
 
+config DRM_AMDGPU_IP_BLOCK_MASK
+	hex "AMDGPU IP Block Mask"
+	depends on DRM_AMDGPU
+	default "0xffffffff"
+	help
+	  Modify this option to disable any IP block of amdgpu.
+
 config DRM_AMDGPU_USERPTR
 	bool "Always enable userptr write support"
 	depends on DRM_AMDGPU
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
index 2221f6b..bd0a876 100644
@@ -93,7 +93,7 @@ int amdgpu_dpm = -1;
 int amdgpu_fw_load_type = -1;
 int amdgpu_aspm = -1;
 int amdgpu_runtime_pm = -1;
-uint amdgpu_ip_block_mask = 0xffffffff;
+uint amdgpu_ip_block_mask = CONFIG_DRM_AMDGPU_IP_BLOCK_MASK;
 int amdgpu_bapm = -1;
 int amdgpu_deep_color = 0;
 int amdgpu_vm_size = -1;
Signature · 6 lines
2.7.4

_______________________________________________
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): 1534845239-31664-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org

#2 lore raw
Quoted 21 lines · Shirish S

This patch extends amdgpu.ip_block_mask to a Kconfig option as well, that can be altered by user at build time for OS' that do not permit passing dyanamic loading of amdgpu driver and also passing command line arguments.

Note: This option to be used purely for debugging purposes and amdgpu driver is not productised/tested extensively with any of its blokcs disabled.
The default value of this option enables all IP's.

---
 drivers/gpu/drm/amd/amdgpu/Kconfig      | 7 +++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/Kconfig +0 -0
index e8af1f5..3f94ae5 100644

drivers/gpu/drm/amd/amdgpu/Kconfig config DRM_AMDGPU_CIK · line 31

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/Kconfig +6 -0
@@ -23,6 +23,13 @@ config DRM_AMDGPU_CIK
 
 	  radeon.cik_support=0 amdgpu.cik_support=1
 
+config DRM_AMDGPU_IP_BLOCK_MASK
+	hex "AMDGPU IP Block Mask"
+	depends on DRM_AMDGPU
+	default "0xffffffff"
+	help
+	  Modify this option to disable any IP block of amdgpu.

As I said before, IMO this doesn't belong upstream, as it's a workaround for a downstream issue.

Also, this isn't generally usable on a system with multiple GPUs supported by amdgpu, as the same block mask value may have different effects with different GPUs.

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
#3 lore raw
In reply to a message not in the archive

s/blokcs/blocks

s/dyanamic/dynamic

Regards

Pratik

Quoted 39 lines · Shirish S

This patch extends amdgpu.ip_block_mask to a Kconfig option as well, that can be altered by user at build time for OS' that do not permit passing dyanamic loading of amdgpu driver and also passing command line arguments.

Note: This option to be used purely for debugging purposes and amdgpu driver is not productised/tested extensively with any of its blokcs disabled.
The default value of this option enables all IP's.

---
  drivers/gpu/drm/amd/amdgpu/Kconfig      | 7 +++++++
  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +-
  2 files changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/Kconfig +7 -0
index e8af1f5..3f94ae5 100644
@@ -23,6 +23,13 @@ config DRM_AMDGPU_CIK
 
  	  radeon.cik_support=0 amdgpu.cik_support=1
 
+config DRM_AMDGPU_IP_BLOCK_MASK
+	hex "AMDGPU IP Block Mask"
+	depends on DRM_AMDGPU
+	default "0xffffffff"
+	help
+	  Modify this option to disable any IP block of amdgpu.
+
  config DRM_AMDGPU_USERPTR
  	bool "Always enable userptr write support"
  	depends on DRM_AMDGPU
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -0
index 2221f6b..bd0a876 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c int amdgpu_dpm = -1; · line 99

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
@@ -93,7 +93,7 @@ int amdgpu_dpm = -1;
  int amdgpu_fw_load_type = -1;
  int amdgpu_aspm = -1;
  int amdgpu_runtime_pm = -1;
-uint amdgpu_ip_block_mask = 0xffffffff;
+uint amdgpu_ip_block_mask = CONFIG_DRM_AMDGPU_IP_BLOCK_MASK;
  int amdgpu_bapm = -1;
  int amdgpu_deep_color = 0;
  int amdgpu_vm_size = -1;

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