aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1081-drm-amdgpu-add-option-for-force-enable-multipipe-pol.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1081-drm-amdgpu-add-option-for-force-enable-multipipe-pol.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1081-drm-amdgpu-add-option-for-force-enable-multipipe-pol.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1081-drm-amdgpu-add-option-for-force-enable-multipipe-pol.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1081-drm-amdgpu-add-option-for-force-enable-multipipe-pol.patch
new file mode 100644
index 00000000..db2529e1
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1081-drm-amdgpu-add-option-for-force-enable-multipipe-pol.patch
@@ -0,0 +1,71 @@
+From e9578f2b3197d43d1f42409f092d1940c1f0f559 Mon Sep 17 00:00:00 2001
+From: Andres Rodriguez <andresx7@gmail.com>
+Date: Tue, 26 Sep 2017 12:22:46 -0400
+Subject: [PATCH 1081/4131] 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>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++
+ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 6 ++++++
+ 3 files changed, 11 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+index 1fbfe98..fa3935b8 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+@@ -125,6 +125,7 @@ extern int amdgpu_cntl_sb_buf_per_se;
+ extern int amdgpu_param_buf_per_se;
+ extern int amdgpu_job_hang_limit;
+ extern int amdgpu_lbpw;
++extern int amdgpu_compute_multipipe;
+
+ #ifdef CONFIG_DRM_AMDGPU_SI
+ 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 e587416..91b5638 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+@@ -124,6 +124,7 @@ int amdgpu_cntl_sb_buf_per_se = 0;
+ int amdgpu_param_buf_per_se = 0;
+ int amdgpu_job_hang_limit = 0;
+ int amdgpu_lbpw = -1;
++int amdgpu_compute_multipipe = -1;
+
+ MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes");
+ module_param_named(vramlimit, amdgpu_vram_limit, int, 0600);
+@@ -273,6 +274,9 @@ module_param_named(job_hang_limit, amdgpu_job_hang_limit, int ,0444);
+ MODULE_PARM_DESC(lbpw, "Load Balancing Per Watt (LBPW) support (1 = enable, 0 = disable, -1 = auto)");
+ module_param_named(lbpw, amdgpu_lbpw, int, 0444);
+
++MODULE_PARM_DESC(compute_multipipe, "Force compute queues to be spread across pipes (1 = enable, 0 = disable, -1 = auto)");
++module_param_named(compute_multipipe, amdgpu_compute_multipipe, int, 0444);
++
+ #ifdef CONFIG_DRM_AMDGPU_SI
+
+ int amdgpu_si_support = 1;
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+index 3d76e76..48d94ae 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
+
+ static bool amdgpu_gfx_is_multipipe_capable(struct amdgpu_device *adev)
+ {
++ if (amdgpu_compute_multipipe != -1) {
++ DRM_INFO("amdgpu: forcing compute pipe policy %d\n",
++ amdgpu_compute_multipipe);
++ return amdgpu_compute_multipipe == 1;
++ }
++
+ /* FIXME: spreading the queues across pipes causes perf regressions
+ * on POLARIS11 compute workloads */
+ if (adev->asic_type == CHIP_POLARIS11)
+--
+2.7.4
+