Commit ab16c736 authored by Nicholas Kazlauskas's avatar Nicholas Kazlauskas Committed by Alex Deucher

drm/amd/display: Add DMUB param to load inst const from driver

[Why]
By default we shouldn't be trying to write secure registers during
DMUB hardware init.

[How]
Add a parameter to control whether we put the DMCUB into secure reset
and attempt to load CW0/CW1.
Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c09eeee4
...@@ -281,12 +281,14 @@ struct dmub_srv_create_params { ...@@ -281,12 +281,14 @@ struct dmub_srv_create_params {
* @fb_base: base of the framebuffer aperture * @fb_base: base of the framebuffer aperture
* @fb_offset: offset of the framebuffer aperture * @fb_offset: offset of the framebuffer aperture
* @psp_version: psp version to pass for DMCU init * @psp_version: psp version to pass for DMCU init
* @load_inst_const: true if DMUB should load inst const fw
*/ */
struct dmub_srv_hw_params { struct dmub_srv_hw_params {
struct dmub_fb *fb[DMUB_WINDOW_TOTAL]; struct dmub_fb *fb[DMUB_WINDOW_TOTAL];
uint64_t fb_base; uint64_t fb_base;
uint64_t fb_offset; uint64_t fb_offset;
uint32_t psp_version; uint32_t psp_version;
bool load_inst_const;
}; };
/** /**
......
...@@ -278,7 +278,7 @@ enum dmub_status dmub_srv_hw_init(struct dmub_srv *dmub, ...@@ -278,7 +278,7 @@ enum dmub_status dmub_srv_hw_init(struct dmub_srv *dmub,
cw1.region.base = DMUB_CW1_BASE; cw1.region.base = DMUB_CW1_BASE;
cw1.region.top = cw1.region.base + stack_fb->size - 1; cw1.region.top = cw1.region.base + stack_fb->size - 1;
if (dmub->hw_funcs.backdoor_load) if (params->load_inst_const && dmub->hw_funcs.backdoor_load)
dmub->hw_funcs.backdoor_load(dmub, &cw0, &cw1); dmub->hw_funcs.backdoor_load(dmub, &cw0, &cw1);
} }
......
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