drm/amd/display: Add module param to limit max_bpc
Subsystems (3)
Harry Wentland
maintainerPATCH 1/1 drm/amd/display: Add module param to limit max_bpc
Some users are reporting issues with displays not lighting up after we made 16 bpc the default maximum for outputs. It's difficult to debug these issues when we can't repro them, but it'd be good to give people the ability to help themselves.
Introduce a new amdgpu.max_bpc module param that can be set to 8, 10, 12, 14, or 16 so users with problematic configurations can force the output bitdepth to a value that works for them.
Signed-off-by Harry Wentland <[email protected]>
Cc Steven J Abner <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 15 +++++++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
@@ -272,6 +272,7 @@ extern int amdgpu_rebar;extern int amdgpu_wbrf;extern int amdgpu_user_queue; +extern int amdgpu_max_connector_bpc;#define AMDGPU_VM_MAX_NUM_CTX 4096#define AMDGPU_SG_THRESHOLD (256*1024*1024)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +15 -0
@@ -244,6 +244,7 @@ int amdgpu_damage_clips = -1; /* auto */int amdgpu_umsch_mm_fwlog;int amdgpu_rebar =-1 ;/* auto */ int amdgpu_user_queue =-1 ; +int amdgpu_max_connector_bpc =-1 ;/* auto */ DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0, "DRM_UT_CORE",
@@ -1126,6 +1127,20 @@ module_param_named(rebar, amdgpu_rebar, int, 0444);MODULE_PARM_DESC (user_queue,"Enable user queues (-1 = auto (default), 0 = disable, 1 = enable, 2 = enable UQs and disable KQs)" );module_param_named (user_queue, amdgpu_user_queue, int,0444 ); +/** +* DOC: max_bpc (int) +* Set the maximum connector bit-depth in bits per colors. Possible values: +* +* - -1 = auto (ASIC specific default) +* - 8 = 8 bpc +* - 10 = 10 bpc +* - 12 = 12 bpc +* - 14 = 14 bpc +* - 16 = 16 bpc +*/ +MODULE_PARM_DESC (max_bpc,"Set maximum connector bpc (-1 = auto (default), 8 = 8 bpc, 10 = 10 bpc, 12 = 12 bpc, 14 = 14 bpc, 16 = 16 bpc)" ); +module_param_named (max_bpc, amdgpu_max_connector_bpc, int,0444 ); +/* These devices are not supported by amdgpu. * They are supported by the mach64, r128, radeon drivers */
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +10 -1
@@ -8393,7 +8393,16 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,if (!aconnector->mst_root)drm_connector_attach_max_bpc_property (&aconnector->base,8 ,16 ); - aconnector->base.state->max_bpc =16 ; +if (amdgpu_max_connector_bpc !=8 && + amdgpu_max_connector_bpc !=10 && + amdgpu_max_connector_bpc !=12 && + amdgpu_max_connector_bpc !=14 && + amdgpu_max_connector_bpc !=16 ) { +drm_err (&adev->ddev,"max_bpc connector override of %d is incorrect. Needs to be 8, 10, 12, 14, or 16\n" , amdgpu_max_connector_bpc); + amdgpu_max_connector_bpc =-1 ; + } + + aconnector->base.state->max_bpc = amdgpu_max_connector_bpc ==-1 ?16 : amdgpu_max_connector_bpc; aconnector->base.state->max_requested_bpc = aconnector->base.state->max_bpc;if (connector_type ==DRM_MODE_CONNECTOR_HDMIA ) {
Signature · 1 line
2.49.0