Commit 792a0cdd authored by Leo Li's avatar Leo Li Committed by Alex Deucher

drm/amd/display: Add visualconfirm module parameter

[Why]

Being able to configure visual confirm at boot or in cmdline is helpful
when debugging.

[How]

Add a module parameter to configure DC visual confirm, which works the
same way as the equivalent debugfs entry.
Signed-off-by: default avatarLeo Li <sunpeng.li@amd.com>
Reviewed-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f7bacd97
...@@ -197,6 +197,7 @@ extern uint amdgpu_smu_memory_pool_size; ...@@ -197,6 +197,7 @@ extern uint amdgpu_smu_memory_pool_size;
extern int amdgpu_smu_pptable_id; extern int amdgpu_smu_pptable_id;
extern uint amdgpu_dc_feature_mask; extern uint amdgpu_dc_feature_mask;
extern uint amdgpu_dc_debug_mask; extern uint amdgpu_dc_debug_mask;
extern uint amdgpu_dc_visual_confirm;
extern uint amdgpu_dm_abm_level; extern uint amdgpu_dm_abm_level;
extern int amdgpu_backlight; extern int amdgpu_backlight;
extern struct amdgpu_mgpu_info mgpu_info; extern struct amdgpu_mgpu_info mgpu_info;
......
...@@ -168,6 +168,7 @@ int amdgpu_smu_pptable_id = -1; ...@@ -168,6 +168,7 @@ int amdgpu_smu_pptable_id = -1;
*/ */
uint amdgpu_dc_feature_mask = 2; uint amdgpu_dc_feature_mask = 2;
uint amdgpu_dc_debug_mask; uint amdgpu_dc_debug_mask;
uint amdgpu_dc_visual_confirm;
int amdgpu_async_gfx_ring = 1; int amdgpu_async_gfx_ring = 1;
int amdgpu_mcbp; int amdgpu_mcbp;
int amdgpu_discovery = -1; int amdgpu_discovery = -1;
...@@ -828,6 +829,9 @@ module_param_named(dcfeaturemask, amdgpu_dc_feature_mask, uint, 0444); ...@@ -828,6 +829,9 @@ module_param_named(dcfeaturemask, amdgpu_dc_feature_mask, uint, 0444);
MODULE_PARM_DESC(dcdebugmask, "all debug options disabled (default))"); MODULE_PARM_DESC(dcdebugmask, "all debug options disabled (default))");
module_param_named(dcdebugmask, amdgpu_dc_debug_mask, uint, 0444); module_param_named(dcdebugmask, amdgpu_dc_debug_mask, uint, 0444);
MODULE_PARM_DESC(visualconfirm, "Visual confirm (0 = off (default), 1 = MPO, 5 = PSR)");
module_param_named(visualconfirm, amdgpu_dc_visual_confirm, uint, 0444);
/** /**
* DOC: abmlevel (uint) * DOC: abmlevel (uint)
* Override the default ABM (Adaptive Backlight Management) level used for DC * Override the default ABM (Adaptive Backlight Management) level used for DC
......
...@@ -1538,6 +1538,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) ...@@ -1538,6 +1538,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
if (amdgpu_dc_debug_mask & DC_FORCE_SUBVP_MCLK_SWITCH) if (amdgpu_dc_debug_mask & DC_FORCE_SUBVP_MCLK_SWITCH)
adev->dm.dc->debug.force_subvp_mclk_switch = true; adev->dm.dc->debug.force_subvp_mclk_switch = true;
adev->dm.dc->debug.visual_confirm = amdgpu_dc_visual_confirm;
r = dm_dmub_hw_init(adev); r = dm_dmub_hw_init(adev);
if (r) { if (r) {
DRM_ERROR("DMUB interface failed to initialize: status=%d\n", r); DRM_ERROR("DMUB interface failed to initialize: status=%d\n", r);
......
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