Commit 82df77ae authored by Sung Lee's avatar Sung Lee Committed by Alex Deucher

drm/amd/display: Populate hostvm parameter before DML calculation

[Why]
If the system does not have hostvm enabled, disabling it for
DML validation will allow more modes to pass at lower voltage
levels.

[How]
When initializing HostVM save state to hubbub and read back
when populating DML pipes from context.
Signed-off-by: default avatarSung Lee <sung.lee@amd.com>
Acked-by: default avatarBindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b8e0b3d6
...@@ -99,6 +99,8 @@ void dcn21_dchvm_init(struct hubbub *hubbub) ...@@ -99,6 +99,8 @@ void dcn21_dchvm_init(struct hubbub *hubbub)
//Poll until HOSTVM_PREFETCH_DONE = 1 //Poll until HOSTVM_PREFETCH_DONE = 1
REG_WAIT(DCHVM_RIOMMU_STAT0, HOSTVM_PREFETCH_DONE, 1, 5, 100); REG_WAIT(DCHVM_RIOMMU_STAT0, HOSTVM_PREFETCH_DONE, 1, 5, 100);
hubbub->riommu_active = true;
} }
} }
......
...@@ -1886,7 +1886,7 @@ static int dcn21_populate_dml_pipes_from_context( ...@@ -1886,7 +1886,7 @@ static int dcn21_populate_dml_pipes_from_context(
for (i = 0; i < pipe_cnt; i++) { for (i = 0; i < pipe_cnt; i++) {
pipes[i].pipe.src.hostvm = 1; pipes[i].pipe.src.hostvm = dc->res_pool->hubbub->riommu_active;
pipes[i].pipe.src.gpuvm = 1; pipes[i].pipe.src.gpuvm = 1;
} }
......
...@@ -157,6 +157,7 @@ struct hubbub_funcs { ...@@ -157,6 +157,7 @@ struct hubbub_funcs {
struct hubbub { struct hubbub {
const struct hubbub_funcs *funcs; const struct hubbub_funcs *funcs;
struct dc_context *ctx; struct dc_context *ctx;
bool riommu_active;
}; };
#endif #endif
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