Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8F78BE9D40F for ; Wed, 4 Feb 2026 16:58:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 38BB710E6E6; Wed, 4 Feb 2026 16:58:05 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="eFRs9of/"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3EC3910E6E6 for ; Wed, 4 Feb 2026 16:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1770224284; x=1801760284; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tp1B4pAI5wjlF6LonhBEpuQ9W7gK7fj1dB+lvIv33yU=; b=eFRs9of/3jG4UbFxjzPebyEBaeRNWYLglgv6/lNP7a7hxX4oAiIxwcf0 h/Dp1p8Il9aiQtSsC2sh5EDej7hoXLSy/pN85XmMMY0dg6/27HtVEPK+q fqXpo3ZY1aYJiLx7GND8qBl1cBlNYZa736BEa2ON6H+KUHjEyaOtjhfFR 38y0zhHNtsAQD+0zLRnJ2+gcPzebHcSlTUY26CResPWCDQrDAb8zN5Jyb d+at/Wu5P+O6y8pcuLIFrToatk/2sPc1FZtWFi94FO3dUoxKEtYfIEr7C M5YSvCTxT9S7Xr3EDrzoPAgvPbGJH4OlgL6vhQVQtPiHmQV5OxJZrAAx/ A==; X-CSE-ConnectionGUID: BT1NdwADQpmJ5x+CrgkQSQ== X-CSE-MsgGUID: 9B+I15dkSYS1W+/QjCVHOA== X-IronPort-AV: E=McAfee;i="6800,10657,11691"; a="71580024" X-IronPort-AV: E=Sophos;i="6.21,272,1763452800"; d="scan'208";a="71580024" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2026 08:57:46 -0800 X-CSE-ConnectionGUID: jwuxGNKXQgOqIB2wBHFgLg== X-CSE-MsgGUID: 9Opd2SBCSdGSweKsGMm6KA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,272,1763452800"; d="scan'208";a="210252882" Received: from sowmi-x299-aorus-gaming-3-pro.iind.intel.com ([10.223.74.56]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2026 08:57:44 -0800 From: Sowmiya S To: igt-dev@lists.freedesktop.org Cc: swati2.sharma@intel.com, suraj.kandpal@intel.com, Sowmiya S Subject: [PATCH i-g-t v8 1/9] tests/kms_writeback: Add support for intel-specific formats Date: Wed, 4 Feb 2026 22:48:10 +0530 Message-ID: <20260204171819.292327-2-sowmiya.s@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260204171819.292327-1-sowmiya.s@intel.com> References: <20260204171819.292327-1-sowmiya.s@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" Integrate BGR formats supported by intel into the supported format list and verify format before test execution. v4: Reframe commit message. (Suraj) Signed-off-by: Sowmiya S Reviewed-by: Suraj Kandpal --- tests/kms_writeback.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c index 0b968baa2..691774777 100644 --- a/tests/kms_writeback.c +++ b/tests/kms_writeback.c @@ -90,6 +90,15 @@ static data_t data; enum { XRGB8888 = 1 << 0, XRGB2101010 = 1 << 1, + XBGR8888 = 1 << 2, + XBGR2101010 = 1 << 3, +}; + +const uint32_t fourcc[] = { + DRM_FORMAT_XRGB8888, + DRM_FORMAT_XRGB2101010, + DRM_FORMAT_XBGR8888, + DRM_FORMAT_XBGR2101010, }; static bool check_writeback_config(igt_display_t *display, igt_output_t *output, @@ -101,11 +110,6 @@ static bool check_writeback_config(igt_display_t *display, igt_output_t *output, int width, height, ret; uint16_t i; - const uint32_t fourcc[] = { - DRM_FORMAT_XRGB8888, - DRM_FORMAT_XRGB2101010, - }; - igt_output_override_mode(output, &override_mode); width = override_mode.hdisplay; @@ -299,7 +303,10 @@ static void fill_fb(igt_fb_t *fb, uint32_t pixel) uint32_t *ptr; int64_t pixel_count, i; - igt_assert(fb->drm_format == DRM_FORMAT_XRGB8888 || fb->drm_format == DRM_FORMAT_XRGB2101010); + igt_assert(fb->drm_format == DRM_FORMAT_XRGB8888 || + fb->drm_format == DRM_FORMAT_XRGB2101010 || + fb->drm_format == DRM_FORMAT_XBGR8888 || + fb->drm_format == DRM_FORMAT_XBGR2101010); ptr = igt_fb_map_buffer(fb->fd, fb); igt_assert(ptr); @@ -334,7 +341,8 @@ static void writeback_sequence(igt_output_t *output, igt_plane_t *plane, uint32_t clear_color = 0xffffffff; igt_crc_t cleared_crc, out_expected; - if (fourcc_color == DRM_FORMAT_XRGB2101010) + if (fourcc_color == DRM_FORMAT_XRGB2101010 || + fourcc_color == DRM_FORMAT_XBGR2101010) in_fb_colors = in_fb_colors_10bits; else in_fb_colors = in_fb_colors_8bits; @@ -420,7 +428,12 @@ static void writeback_check_output(igt_output_t *output, igt_plane_t *plane, static void do_single_commit(igt_output_t *output, igt_plane_t *plane, igt_fb_t *in_fb, igt_fb_t *out_fb) { - uint32_t in_fb_color = 0xffff0000; + uint32_t in_fb_color; + + if (data.format == DRM_FORMAT_XRGB8888 || data.format == DRM_FORMAT_XBGR8888) + in_fb_color = 0xffff0000; + else + in_fb_color = 0x3ff00000; fill_fb(in_fb, in_fb_color); -- 2.43.0