Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com>
To: Jeevan B <jeevan.b@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] tests/intel/kms_pm_dc: Add test to validate YUV420 with DC3CO
Date: Mon, 13 Jul 2026 13:51:58 +0530	[thread overview]
Message-ID: <b34acc81-0d7c-4e36-bfe1-2d9b1b77db35@intel.com> (raw)
In-Reply-To: <20260707052028.4022700-1-jeevan.b@intel.com>

On 7/7/2026 10:50 AM, Jeevan B wrote:
> Add a new validation test to ensure YUV420 works correctly when
> DC3CO is enabled.
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
>   tests/intel/kms_pm_dc.c | 35 ++++++++++++++++++++++++++++-------
>   1 file changed, 28 insertions(+), 7 deletions(-)
>
> diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
> index ef53c5f96..db2601ac7 100644
> --- a/tests/intel/kms_pm_dc.c
> +++ b/tests/intel/kms_pm_dc.c
> @@ -125,6 +125,7 @@ typedef struct {
>   	igt_display_t display;
>   	struct igt_fb fb_white, fb_rgb, fb_rgr;
>   	enum psr_mode op_psr_mode;
> +	uint32_t dc3co_fb_format;
>   	drmModeModeInfo *mode;
>   	igt_output_t *output;
>   	bool runtime_suspend_disabled;
> @@ -275,7 +276,7 @@ static void create_color_fb(data_t *data, igt_fb_t *fb, color_t *fb_color)
>   	fb_id = igt_create_fb(data->drm_fd,
>   			      data->mode->hdisplay,
>   			      data->mode->vdisplay,
> -			      DRM_FORMAT_XRGB8888,
> +			      data->dc3co_fb_format,
>   			      DRM_FORMAT_MOD_LINEAR,
>   			      fb);
>   	igt_assert(fb_id);
> @@ -300,6 +301,15 @@ static void assert_dc_counter_negative(data_t *data, int dc_flag, uint32_t prev_
>   
>   static void setup_videoplayback(data_t *data)
>   {
> +	igt_plane_t *primary;
> +
> +	primary = igt_output_get_plane_type(data->output,
> +					    DRM_PLANE_TYPE_PRIMARY);
> +	igt_require_f(igt_plane_has_format_mod(primary, data->dc3co_fb_format,
> +					       DRM_FORMAT_MOD_LINEAR),
> +					       "Primary plane does not support format %s\n",
> +					       igt_format_str(data->dc3co_fb_format));
> +
>   	color_t red_green_blue[] = {
>   		{ 1.0, 0.0, 0.0 },
>   		{ 0.0, 1.0, 0.0 },
> @@ -879,14 +889,20 @@ int igt_main()
>   	igt_describe("In this test we make sure that system enters DC3CO "
>   		     "when PSR2 or PR is active and system is in SLEEP state");
>   	igt_subtest_with_dynamic("dc3co-vpb-simulation") {
> -		static const struct dc3co_test_mode dc3co_modes[] = {
> -			{ PSR_MODE_2, "psr2" },
> -			{ PR_MODE,    "pr"   },
> +		static const struct {
> +			enum psr_mode mode;
> +			uint32_t fb_format;
> +			const char *name;
> +		} dc3co_cases[] = {
> +			{ PSR_MODE_2, DRM_FORMAT_XRGB8888, "psr2-xrgb8888" },
> +			{ PR_MODE,    DRM_FORMAT_XRGB8888, "pr-xrgb8888" },
> +			{ PSR_MODE_2, DRM_FORMAT_NV12,     "psr2-yuv420" },
>   		};
>   
> -		for (int i = 0; i < ARRAY_SIZE(dc3co_modes); i++) {
> -			const char *name = dc3co_modes[i].name;
> -			data.op_psr_mode = dc3co_modes[i].mode;
> +		for (int i = 0; i < ARRAY_SIZE(dc3co_cases); i++) {
> +			const char *name = dc3co_cases[i].name;
> +			data.op_psr_mode = dc3co_cases[i].mode;
> +			data.dc3co_fb_format = dc3co_cases[i].fb_format;

YUV420 is only tested fordc3co-vpb-simulation.
Is it possible to test it in other subtests as well?

>   
>   			igt_dynamic_f("%s", name) {
>   				igt_require_f(intel_display_ver(data.devid) >= 35,
> @@ -913,6 +929,7 @@ int igt_main()
>   		for (int i = 0; i < ARRAY_SIZE(dc3co_modes); i++) {
>   			const char *name = dc3co_modes[i].name;
>   			data.op_psr_mode = dc3co_modes[i].mode;
> +			data.dc3co_fb_format = DRM_FORMAT_XRGB8888;
>   
>   			igt_dynamic_f("%s", name) {
>   				igt_require_f(intel_display_ver(data.devid) >= 35,
> @@ -942,6 +959,7 @@ int igt_main()
>   		for (int i = 0; i < ARRAY_SIZE(dc3co_modes); i++) {
>   			const char *name = dc3co_modes[i].name;
>   			data.op_psr_mode = dc3co_modes[i].mode;
> +			data.dc3co_fb_format = DRM_FORMAT_XRGB8888;
>   
>   			igt_dynamic_f("%s", name) {
>   				igt_require_f(intel_display_ver(data.devid) >= 35,
> @@ -968,6 +986,7 @@ int igt_main()
>   		for (int i = 0; i < ARRAY_SIZE(dc3co_modes); i++) {
>   			const char *name = dc3co_modes[i].name;
>   			data.op_psr_mode = dc3co_modes[i].mode;
> +			data.dc3co_fb_format = DRM_FORMAT_XRGB8888;
>   
>   			igt_dynamic_f("%s", name) {
>   				igt_require_f(intel_display_ver(data.devid) >= 35,
> @@ -1011,6 +1030,7 @@ int igt_main()
>   		igt_require_f(igt_pm_pc8_plus_residencies_enabled(data.msr_fd),
>   			      "PC8+ residencies not supported\n");
>   		igt_require(intel_display_ver(data.devid) >= 20);
> +		data.dc3co_fb_format = DRM_FORMAT_XRGB8888;
>   		test_deep_pkgc_state(&data);
>   	}
>   
> @@ -1039,6 +1059,7 @@ int igt_main()
>   		igt_require(psr_sink_support(data.drm_fd, data.debugfs_fd,
>   					     PSR_MODE_1, NULL));
>   		data.op_psr_mode = PSR_MODE_1;
> +		data.dc3co_fb_format = DRM_FORMAT_XRGB8888;
>   		psr_enable(data.drm_fd, data.debugfs_fd, data.op_psr_mode, NULL);
>   		igt_require(!psr_disabled_check(data.debugfs_fd));
>   		test_dc5_pageflip_negative(&data, IGT_INTEL_CHECK_DC5);


      parent reply	other threads:[~2026-07-13  8:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07  5:20 [PATCH i-g-t] tests/intel/kms_pm_dc: Add test to validate YUV420 with DC3CO Jeevan B
2026-07-07 12:06 ` ✗ Xe.CI.BAT: failure for " Patchwork
2026-07-07 12:23 ` ✓ i915.CI.BAT: success " Patchwork
2026-07-07 13:29 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-07-08  2:32 ` ✗ i915.CI.Full: " Patchwork
2026-07-13  8:21 ` Dibin Moolakadan Subrahmanian [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b34acc81-0d7c-4e36-bfe1-2d9b1b77db35@intel.com \
    --to=dibin.moolakadan.subrahmanian@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jeevan.b@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox