diff options
author | Andres Rodriguez <andresx7@gmail.com> | 2017-09-26 12:22:46 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-28 16:03:21 -0400 |
commit | 4a75aefe3feb99ff87c1ea594b4db377b98f50e8 (patch) | |
tree | 2dd2f568285048c077663b1e768c5e6393df54f2 | |
parent | 0f7607d484f57c31a3e0b5b4e75ff1366cc90b6b (diff) |
drm/amdgpu: add option for force enable multipipe policy for compute
Useful for testing the effects of multipipe compute without recompiling.
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 6 |
3 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index ebfc267467ee..005b9823e468 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -121,6 +121,7 @@ extern int amdgpu_cntl_sb_buf_per_se; | |||
121 | extern int amdgpu_param_buf_per_se; | 121 | extern int amdgpu_param_buf_per_se; |
122 | extern int amdgpu_job_hang_limit; | 122 | extern int amdgpu_job_hang_limit; |
123 | extern int amdgpu_lbpw; | 123 | extern int amdgpu_lbpw; |
124 | extern int amdgpu_compute_multipipe; | ||
124 | 125 | ||
125 | #ifdef CONFIG_DRM_AMDGPU_SI | 126 | #ifdef CONFIG_DRM_AMDGPU_SI |
126 | extern int amdgpu_si_support; | 127 | extern int amdgpu_si_support; |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 4f98960e47f9..9816f50a7498 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | |||
@@ -122,6 +122,7 @@ int amdgpu_cntl_sb_buf_per_se = 0; | |||
122 | int amdgpu_param_buf_per_se = 0; | 122 | int amdgpu_param_buf_per_se = 0; |
123 | int amdgpu_job_hang_limit = 0; | 123 | int amdgpu_job_hang_limit = 0; |
124 | int amdgpu_lbpw = -1; | 124 | int amdgpu_lbpw = -1; |
125 | int amdgpu_compute_multipipe = -1; | ||
125 | 126 | ||
126 | MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes"); | 127 | MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes"); |
127 | module_param_named(vramlimit, amdgpu_vram_limit, int, 0600); | 128 | module_param_named(vramlimit, amdgpu_vram_limit, int, 0600); |
@@ -265,6 +266,9 @@ module_param_named(job_hang_limit, amdgpu_job_hang_limit, int ,0444); | |||
265 | MODULE_PARM_DESC(lbpw, "Load Balancing Per Watt (LBPW) support (1 = enable, 0 = disable, -1 = auto)"); | 266 | MODULE_PARM_DESC(lbpw, "Load Balancing Per Watt (LBPW) support (1 = enable, 0 = disable, -1 = auto)"); |
266 | module_param_named(lbpw, amdgpu_lbpw, int, 0444); | 267 | module_param_named(lbpw, amdgpu_lbpw, int, 0444); |
267 | 268 | ||
269 | MODULE_PARM_DESC(compute_multipipe, "Force compute queues to be spread across pipes (1 = enable, 0 = disable, -1 = auto)"); | ||
270 | module_param_named(compute_multipipe, amdgpu_compute_multipipe, int, 0444); | ||
271 | |||
268 | #ifdef CONFIG_DRM_AMDGPU_SI | 272 | #ifdef CONFIG_DRM_AMDGPU_SI |
269 | 273 | ||
270 | #if defined(CONFIG_DRM_RADEON) || defined(CONFIG_DRM_RADEON_MODULE) | 274 | #if defined(CONFIG_DRM_RADEON) || defined(CONFIG_DRM_RADEON_MODULE) |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index 3930fcc3e344..83435ccbad44 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | |||
@@ -111,6 +111,12 @@ void amdgpu_gfx_parse_disable_cu(unsigned *mask, unsigned max_se, unsigned max_s | |||
111 | 111 | ||
112 | static bool amdgpu_gfx_is_multipipe_capable(struct amdgpu_device *adev) | 112 | static bool amdgpu_gfx_is_multipipe_capable(struct amdgpu_device *adev) |
113 | { | 113 | { |
114 | if (amdgpu_compute_multipipe != -1) { | ||
115 | DRM_INFO("amdgpu: forcing compute pipe policy %d\n", | ||
116 | amdgpu_compute_multipipe); | ||
117 | return amdgpu_compute_multipipe == 1; | ||
118 | } | ||
119 | |||
114 | /* FIXME: spreading the queues across pipes causes perf regressions | 120 | /* FIXME: spreading the queues across pipes causes perf regressions |
115 | * on POLARIS11 compute workloads */ | 121 | * on POLARIS11 compute workloads */ |
116 | if (adev->asic_type == CHIP_POLARIS11) | 122 | if (adev->asic_type == CHIP_POLARIS11) |