drm/amd/display: Add skip rIOMMU dc config option
authorKevin Gao <kgao1003@amd.com>
Thu, 17 Apr 2025 19:37:06 +0000 (15:37 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 May 2025 16:58:17 +0000 (12:58 -0400)
[Why]
Need option to skip rIOMMU calls for dcn21.

[How]
Added rIOMMU dc config option and check for whether to skip
rIOMMU calls.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Kevin Gao <kgao1003@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c

index ca879f27b0ddf349c94cb6ed94819ab1d2975841..9140129487409f3715864c62cdafc5561612b45e 100644 (file)
@@ -448,6 +448,7 @@ struct dc_config {
        bool enable_windowed_mpo_odm;
        bool forceHBR2CP2520; // Used for switching between test patterns TPS4 and CP2520
        uint32_t allow_edp_hotplug_detection;
+       bool skip_riommu_prefetch_wa;
        bool clamp_min_dcfclk;
        uint64_t vblank_alignment_dto_params;
        uint8_t  vblank_alignment_max_frame_time_diff;
index 2546224b326a83adbd7c070d89147d24e77de46c..e4496ad203b2fa5cabc1c32be8c3fd9938a7468a 100644 (file)
@@ -132,9 +132,9 @@ int hubbub21_init_dchub(struct hubbub *hubbub,
                // Init VMID 0 based on PA config
                dcn20_vmid_setup(&hubbub1->vmid[0], &phys_config);
        }
-
-       dcn21_dchvm_init(hubbub);
-
+       if (!hubbub1->base.ctx->dc->config.skip_riommu_prefetch_wa) {
+               dcn21_dchvm_init(hubbub);
+       }
        return hubbub1->num_vmid;
 }