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 87EF1C98315 for ; Mon, 19 Jan 2026 04:48:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E18610E359; Mon, 19 Jan 2026 04:48:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="jrwlx3ov"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id AF98610E359 for ; Mon, 19 Jan 2026 04:48: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=1768798085; x=1800334085; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tp1B4pAI5wjlF6LonhBEpuQ9W7gK7fj1dB+lvIv33yU=; b=jrwlx3ov8BLNaliXu0FCDNEQ3gUrxwxUDJXtfmSufygoZtspW/ZGn0Hz wwumM/SKCe1WFzoFrchr/GSG3RfVeNQKQwEsgBcdmtlpO5I2tc7Hffkri 5UHx2JArFh+1CV3BtLNFDpmW6pA4Glolohsu+sDzoMK3WgouiYItXQzP4 OwS4f3AVbw93Y7WJoBTmaLeDkepPHqIGoP93fn95V9zpfUbK+pcHlPlzN s+c0mn54ntVPdcsa++Yl4rC6wF8+wCmlaB0QfnhovlezRW/BfS1zmlhGQ 0NK0KjSsOHvgELM6hjm1yVgHRDTesYNlmHMxXZaHDEagklLa/n2MDGPgA w==; X-CSE-ConnectionGUID: lAjaeyXpQHmTmE1uKgnitA== X-CSE-MsgGUID: qfdWKJnBQJer8HC6SNJt/A== X-IronPort-AV: E=McAfee;i="6800,10657,11675"; a="87581731" X-IronPort-AV: E=Sophos;i="6.21,237,1763452800"; d="scan'208";a="87581731" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2026 20:48:04 -0800 X-CSE-ConnectionGUID: 3dVaxBrfRPOPZlVt5tnJTQ== X-CSE-MsgGUID: QJCBI1onT5uAu3sDFuNC7g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,237,1763452800"; d="scan'208";a="210271065" Received: from sowmi-x299-aorus-gaming-3-pro.iind.intel.com ([10.223.74.56]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2026 20:48:03 -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 v6 1/8] tests/kms_writeback: Add support for intel-specific formats Date: Mon, 19 Jan 2026 10:37:25 +0530 Message-ID: <20260119050732.110985-2-sowmiya.s@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119050732.110985-1-sowmiya.s@intel.com> References: <20260119050732.110985-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