[PATCH v2 06/12] drm/amd/display: Handle virtual hardware detect

Rodrigo Siqueira Rodrigo.Siqueira at amd.com
Tue Oct 18 12:28:20 UTC 2022


If virtual hardware is detected, there is no reason to run the full
dc_commit_streams process, and DC can return true immediately.

Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
Co-developed-by: Aurabindo Pillai <aurabindo.pillai at amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai at amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index b904b03cf94e..61b574b9e736 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1912,6 +1912,9 @@ enum dc_status dc_commit_streams(struct dc *dc,
 	enum dc_status res = DC_OK;
 	struct dc_validation_set set[MAX_STREAMS] = {0};
 
+	if (dc->ctx->dce_environment == DCE_ENV_VIRTUAL_HW)
+		return res;
+
 	if (!streams_changed(dc, streams, stream_count))
 		return res;
 
-- 
2.38.0



More information about the amd-gfx mailing list