From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2CEDB10E047 for ; Tue, 26 Dec 2023 06:14:51 +0000 (UTC) From: Jeevan B To: igt-dev@lists.freedesktop.org Subject: [PATCH i-g-t 1/2] tests/intel/kms_psr2_sf: Fix primary_format setting Date: Tue, 26 Dec 2023 11:54:14 +0530 Message-Id: <20231226062415.23338-2-jeevan.b@intel.com> In-Reply-To: <20231226062415.23338-1-jeevan.b@intel.com> References: <20231226062415.23338-1-jeevan.b@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: The format is being changed globally to DRM_FORMAT_NV12. Additionally, FBC doesn't support the NV12 format, so this issue is being addressed. v2: Initialize data members at the beginning of the loop. Signed-off-by: Jeevan B Reviewed-by: Vinod Govindapillai --- tests/intel/kms_psr2_sf.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c index 76435f501..68cedf577 100644 --- a/tests/intel/kms_psr2_sf.c +++ b/tests/intel/kms_psr2_sf.c @@ -68,13 +68,13 @@ * SUBTEST: cursor-plane-update-sf * Description: Test that selective fetch works on cursor plane * - * SUBTEST: fbc-cursor-plane-update-continuous-sf + * SUBTEST: fbc-cursor-plane-update-sf * Description: Test that fbc with selective fetch works on cursor plane * * SUBTEST: overlay-plane-update-continuous-sf * Description: Test that selective fetch works on overlay plane * - * SUBTEST: fbc-overlay-plane-update-continuous-sf-dmg-area + * SUBTEST: fbc-overlay-plane-update-sf-dmg-area * Description: Test that fbc with selective fetch works on overlay plane * * SUBTEST: overlay-plane-update-sf-dmg-area @@ -100,13 +100,13 @@ * SUBTEST: primary-plane-update-sf-dmg-area * Description: Test that selective fetch works on primary plane * - * SUBTEST: fbc-primary-plane-update-continuous-sf-dmg-area + * SUBTEST: fbc-primary-plane-update-sf-dmg-area * Description: Test that fbc with selective fetch works on primary plane * * SUBTEST: primary-plane-update-sf-dmg-area-big-fb * Description: Test that selective fetch works on primary plane with big fb * - * SUBTEST: fbc-primary-plane-update-continuous-sf-dmg-area-big-fb + * SUBTEST: fbc-primary-plane-update-sf-dmg-area-big-fb * Description: Test that fbc with selective fetch works on primary plane with big fb */ @@ -1014,10 +1014,6 @@ igt_main "Error enabling PSR2\n"); data.damage_area_count = MAX_DAMAGE_AREAS; - data.op = PLANE_UPDATE; - data.test_plane_id = DRM_PLANE_TYPE_PRIMARY; - data.primary_format = DRM_FORMAT_XRGB8888; - data.big_fb_test = 0; res = drmModeGetResources(data.drm_fd); data.big_fb_width = res->max_width; @@ -1043,6 +1039,11 @@ igt_main } for (y = 0; y < ARRAY_SIZE(fbc_status); y++) { + data.op = PLANE_UPDATE; + data.test_plane_id = DRM_PLANE_TYPE_PRIMARY; + data.primary_format = DRM_FORMAT_XRGB8888; + data.big_fb_test = 0; + data.op_fbc_mode = fbc_status[y]; /* Verify primary plane selective fetch */ igt_describe("Test that selective fetch works on primary plane"); @@ -1387,7 +1388,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 +1404,10 @@ igt_main data.pipe = pipes[i]; data.output = outputs[i]; data.damage_area_count = 1; + if (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