[i-g-t 2/2] lib/igt_kms: Clear all connector properties on reset

Bhanuprakash Modem bhanuprakash.modem at intel.com
Tue Aug 13 13:15:20 UTC 2024


Just to sanitize all properties we should clear all
connector properties on reset.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 lib/igt_kms.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index f5fc9ada1..f52b35a72 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2575,6 +2575,7 @@ static void igt_output_reset(igt_output_t *output)
 	memset(&output->override_mode, 0, sizeof(output->override_mode));
 
 	igt_output_set_prop_value(output, IGT_CONNECTOR_CRTC_ID, 0);
+	igt_output_set_prop_value(output, IGT_CONNECTOR_DPMS, DRM_MODE_DPMS_OFF);
 
 	if (igt_output_has_prop(output, IGT_CONNECTOR_BROADCAST_RGB))
 		igt_output_set_prop_value(output, IGT_CONNECTOR_BROADCAST_RGB,
@@ -2597,6 +2598,13 @@ static void igt_output_reset(igt_output_t *output)
 	if (igt_output_has_prop(output, IGT_CONNECTOR_DITHERING_MODE))
 		igt_output_set_prop_enum(output, IGT_CONNECTOR_DITHERING_MODE,
 					 "off");
+
+	if (igt_output_has_prop(output, IGT_CONNECTOR_SCALING_MODE))
+		igt_output_set_prop_value(output, IGT_CONNECTOR_SCALING_MODE,
+					  DRM_MODE_SCALE_NONE);
+
+	if (igt_output_has_prop(output, IGT_CONNECTOR_MAX_BPC))
+		igt_output_set_prop_value(output, IGT_CONNECTOR_MAX_BPC, 12);
 }
 
 /**
-- 
2.43.2



More information about the igt-dev mailing list