Commit 27eaa492 authored by Thomas Lim's avatar Thomas Lim Committed by Alex Deucher

drm/amd/display: Add power down display on boot flag

[Why]

Due to the generic introduction of seamless boot, the display is no
longer blanked upon boot. However, this causes corruption on some
systems that does not lock the memory in the non-secure boot case,
resulting in brief corruption on boot due to garbage being written into
the frame buffer.

[How]
Add a flag, read during DC init, to determine whether display should be
blanked on boot. Default to true.
Signed-off-by: default avatarThomas Lim <Thomas.Lim@amd.com>
Reviewed-by: default avatarAric Cyr <Aric.Cyr@amd.com>
Acked-by: default avatarAnthony Koo <Anthony.Koo@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 91f28756
...@@ -534,6 +534,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) ...@@ -534,6 +534,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
if (amdgpu_dc_feature_mask & DC_FBC_MASK) if (amdgpu_dc_feature_mask & DC_FBC_MASK)
init_data.flags.fbc_support = true; init_data.flags.fbc_support = true;
init_data.flags.power_down_display_on_boot = true;
/* Display Core create. */ /* Display Core create. */
adev->dm.dc = dc_create(&init_data); adev->dm.dc = dc_create(&init_data);
......
...@@ -204,6 +204,7 @@ struct dc_config { ...@@ -204,6 +204,7 @@ struct dc_config {
bool optimize_edp_link_rate; bool optimize_edp_link_rate;
bool disable_fractional_pwm; bool disable_fractional_pwm;
bool allow_seamless_boot_optimization; bool allow_seamless_boot_optimization;
bool power_down_display_on_boot;
}; };
enum visual_confirm { enum visual_confirm {
......
...@@ -1118,7 +1118,7 @@ static void dcn10_init_hw(struct dc *dc) ...@@ -1118,7 +1118,7 @@ static void dcn10_init_hw(struct dc *dc)
* Otherwise, if taking control is not possible, we need to power * Otherwise, if taking control is not possible, we need to power
* everything down. * everything down.
*/ */
if (dcb->funcs->is_accelerated_mode(dcb)) { if (dcb->funcs->is_accelerated_mode(dcb) || dc->config.power_down_display_on_boot) {
for (i = 0; i < dc->res_pool->pipe_count; i++) { for (i = 0; i < dc->res_pool->pipe_count; i++) {
struct hubp *hubp = dc->res_pool->hubps[i]; struct hubp *hubp = dc->res_pool->hubps[i];
struct dpp *dpp = dc->res_pool->dpps[i]; struct dpp *dpp = dc->res_pool->dpps[i];
......
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