[PATCH i-g-t] tests/intel/kms_psr2_sf: Fix primary_format setting

Jeevan B jeevan.b at intel.com
Thu Dec 14 15:42:19 UTC 2023


The format is being changed globally to DRM_FORMAT_NV12. additionally,
FBC doesn't support the NV12 format, so this issue is being addressed.

Signed-off-by: Jeevan B <jeevan.b at intel.com>
---
 tests/intel/kms_psr2_sf.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 76435f501..272260cdf 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -1387,7 +1387,6 @@ igt_main
 		 * plane and continuous updates.
 		 */
 		data.op = PLANE_UPDATE_CONTINUOUS;
-		data.primary_format = DRM_FORMAT_NV12;
 		igt_describe("Test that selective fetch works on overlay plane");
 		igt_subtest_with_dynamic_f("%soverlay-%s-sf", append_fbc_subtest[y],
 					   op_str(data.op)) {
@@ -1404,6 +1403,11 @@ igt_main
 						data.pipe = pipes[i];
 						data.output = outputs[i];
 						data.damage_area_count = 1;
+						if (data.fbc_flag == true &&
+						    data.op_fbc_mode == FBC_ENABLED)
+							data.primary_format = DRM_FORMAT_XRGB8888;
+						else
+							data.primary_format = DRM_FORMAT_NV12;
 						data.test_plane_id = DRM_PLANE_TYPE_OVERLAY;
 						data.coexist_feature = j;
 						prepare(&data);
-- 
2.25.1



More information about the igt-dev mailing list