OSDN Git Service

drm/amd/display: Add feature flags to disable LTTPR
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Tue, 7 Dec 2021 17:14:40 +0000 (12:14 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 13 Dec 2021 21:32:34 +0000 (16:32 -0500)
[Why]
Allow for disabling non transparent mode of LTTPR for running tests.

[How]
Add a feature flag and set them during init sequence. The flags are
already being used in DC.

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/include/amd_shared.h

index 151f355..c38d6da 100644 (file)
@@ -1453,6 +1453,13 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
        if (amdgpu_dc_feature_mask & DC_EDP_NO_POWER_SEQUENCING)
                init_data.flags.edp_no_power_sequencing = true;
 
+#ifdef CONFIG_DRM_AMD_DC_DCN
+       if (amdgpu_dc_feature_mask & DC_DISABLE_LTTPR_DP1_4A)
+               init_data.flags.allow_lttpr_non_transparent_mode.bits.DP1_4A = true;
+       if (amdgpu_dc_feature_mask & DC_DISABLE_LTTPR_DP2_0)
+               init_data.flags.allow_lttpr_non_transparent_mode.bits.DP2_0 = true;
+#endif
+
        init_data.flags.power_down_display_on_boot = true;
 
        if (check_seamless_boot_capability(adev)) {
index 4b9e68a..f57a147 100644 (file)
@@ -231,6 +231,8 @@ enum DC_FEATURE_MASK {
        DC_DISABLE_FRACTIONAL_PWM_MASK = (1 << 2), //0x4, disabled by default
        DC_PSR_MASK = (1 << 3), //0x8, disabled by default for dcn < 3.1
        DC_EDP_NO_POWER_SEQUENCING = (1 << 4), //0x10, disabled by default
+       DC_DISABLE_LTTPR_DP1_4A = (1 << 5), //0x20, disabled by default
+       DC_DISABLE_LTTPR_DP2_0 = (1 << 6), //0x40, disabled by default
 };
 
 enum DC_DEBUG_MASK {