diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-06-15 02:53:12 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-06-15 02:53:12 +0000 |
commit | 0f83ab60be0499cf3aa45268b927424276f06620 (patch) | |
tree | e4fbbb83032b88364d725d281f9b0c275a1e7a62 | |
parent | 7707237c0c5d908de94893fdacd8c3955ff517d1 (diff) |
drm/amd/display: Enable HostVM based on rIOMMU active
From Gabe Teeger
d547d499e451f1e38ad22450602122e0e73f8540 in linux-6.1.y/6.1.30
97fa4dfa66fdd52ad3d0c9fadeaaa1e87605bac7 in mainline linux
-rw-r--r-- | sys/dev/pci/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c b/sys/dev/pci/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c index 4f91e647542..bf77e56c3f3 100644 --- a/sys/dev/pci/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c +++ b/sys/dev/pci/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c @@ -310,6 +310,10 @@ int dcn314_populate_dml_pipes_from_context_fpu(struct dc *dc, struct dc_state *c pipe->plane_state->src_rect.width < pipe->plane_state->dst_rect.width)) upscaled = true; + /* Apply HostVM policy - either based on hypervisor globally enabled, or rIOMMU active */ + if (dc->debug.dml_hostvm_override == DML_HOSTVM_NO_OVERRIDE) + pipes[i].pipe.src.hostvm = dc->vm_pa_config.is_hvm_enabled || dc->res_pool->hubbub->riommu_active; + /* * Immediate flip can be set dynamically after enabling the plane. * We need to require support for immediate flip or underflow can be |