Commit b239c017 authored by Jack Xiao's avatar Jack Xiao Committed by Alex Deucher

drm/amdgpu: add mcbp driver parameter

Add mcbp driver parameter, so that mcbp feature can be
enabled/disabled by driver parameter.
Acked-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarJack Xiao <Jack.Xiao@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 692441f2
...@@ -159,6 +159,7 @@ extern struct amdgpu_mgpu_info mgpu_info; ...@@ -159,6 +159,7 @@ extern struct amdgpu_mgpu_info mgpu_info;
extern int amdgpu_ras_enable; extern int amdgpu_ras_enable;
extern uint amdgpu_ras_mask; extern uint amdgpu_ras_mask;
extern int amdgpu_async_gfx_ring; extern int amdgpu_async_gfx_ring;
extern int amdgpu_mcbp;
#ifdef CONFIG_DRM_AMDGPU_SI #ifdef CONFIG_DRM_AMDGPU_SI
extern int amdgpu_si_support; extern int amdgpu_si_support;
......
...@@ -2575,6 +2575,9 @@ int amdgpu_device_init(struct amdgpu_device *adev, ...@@ -2575,6 +2575,9 @@ int amdgpu_device_init(struct amdgpu_device *adev,
amdgpu_device_get_pcie_info(adev); amdgpu_device_get_pcie_info(adev);
if (amdgpu_mcbp)
DRM_INFO("MCBP is enabled\n");
/* early init functions */ /* early init functions */
r = amdgpu_device_ip_early_init(adev); r = amdgpu_device_ip_early_init(adev);
if (r) if (r)
......
...@@ -137,6 +137,7 @@ uint amdgpu_smu_memory_pool_size = 0; ...@@ -137,6 +137,7 @@ uint amdgpu_smu_memory_pool_size = 0;
/* FBC (bit 0) disabled by default*/ /* FBC (bit 0) disabled by default*/
uint amdgpu_dc_feature_mask = 0; uint amdgpu_dc_feature_mask = 0;
int amdgpu_async_gfx_ring = 1; int amdgpu_async_gfx_ring = 1;
int amdgpu_mcbp = 0;
struct amdgpu_mgpu_info mgpu_info = { struct amdgpu_mgpu_info mgpu_info = {
.mutex = __MUTEX_INITIALIZER(mgpu_info.mutex), .mutex = __MUTEX_INITIALIZER(mgpu_info.mutex),
...@@ -574,6 +575,10 @@ MODULE_PARM_DESC(async_gfx_ring, ...@@ -574,6 +575,10 @@ 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))"); "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); module_param_named(async_gfx_ring, amdgpu_async_gfx_ring, int, 0444);
MODULE_PARM_DESC(mcbp,
"Enable Mid-command buffer preemption (0 = disabled (default), 1 = enabled)");
module_param_named(mcbp, amdgpu_mcbp, int, 0444);
#ifdef CONFIG_HSA_AMD #ifdef CONFIG_HSA_AMD
/** /**
* DOC: sched_policy (int) * DOC: sched_policy (int)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment