From: jsg Date: Thu, 15 Jun 2023 02:53:11 +0000 (+0000) Subject: drm/amd/display: Enable HostVM based on rIOMMU active X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8b0001dd36fa2f2780b21125cf5fffb8e152fa7f;p=openbsd 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 --- 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