Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: vitaly prosyak <vprosyak@amd.com>
To: "Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
	igt-dev@lists.freedesktop.org,
	"André Almeida" <andrealmeid@igalia.com>,
	"Vitaly Prosyak" <vitaly.prosyak@amd.com>,
	"Jeevan B" <jeevan.b@intel.com>,
	kernel-dev@igalia.com, "Hung, Alex" <Alex.Hung@amd.com>,
	"Harry Wentland" <harry.wentland@amd.com>
Subject: Re: [PATCH v2] tests/kms_async_flips: Create subtest for overlay planes
Date: Wed, 19 Feb 2025 13:06:57 -0500	[thread overview]
Message-ID: <5b88ea25-c9a6-4025-8f9b-34e1b213e258@amd.com> (raw)
In-Reply-To: <20250219103703.2hbadorsyh5ezd3e@kamilkon-desk.igk.intel.com>

Added Harry and Alex

Hi Kamll

Thanks for the letting us know.

On 2025-02-19 05:37, Kamil Konieczny wrote:
> Hi André,
> On 2024-12-16 at 17:24:27 -0300, André Almeida wrote:
>> amdgpu can perform async flips in overlay planes as well, so create a
>> test for that.
>>
> Vitaly could you find someone from AMD who could help with
> review and testing? Thanks!

Alex,

Can you help with DAL CI to run this patch ?
Thanks in advance

Vitaly

>
> Please add to Cc Vitaly from AMD:
> Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>
>
> Also add Jeevan here:
> Cc: Jeevan B <jeevan.b@intel.com>
>
> Regards,
> Kamil
>
>> Signed-off-by: André Almeida <andrealmeid@igalia.com>
>> ---
>> v2: Add test description for GitLab compilation
>> ---
>>  tests/kms_async_flips.c | 45 +++++++++++++++++++++++++++++++++++++----
>>  1 file changed, 41 insertions(+), 4 deletions(-)
>>
>> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
>> index 4a72be7b5..dd0907d50 100644
>> --- a/tests/kms_async_flips.c
>> +++ b/tests/kms_async_flips.c
>> @@ -89,6 +89,9 @@
>>   *
>>   * SUBTEST: async-flip-suspend-resume
>>   * Description: Verify the async flip functionality with suspend and resume cycle
>> + *
>> + * SUBTEST: overlay-atomic
>> + * Description: Verify overlay planes with async flips in atomic API
>>   */
>>  
>>  #define CURSOR_POS 128
>> @@ -109,12 +112,14 @@ typedef struct {
>>  	uint32_t crtc_id;
>>  	uint32_t refresh_rate;
>>  	struct igt_fb bufs[NUM_FBS];
>> +	struct igt_fb bufs_overlay[NUM_FBS];
>>  	igt_display_t display;
>>  	igt_output_t *output;
>>  	unsigned long flip_timestamp_us;
>>  	double flip_interval;
>>  	uint64_t modifier;
>>  	igt_plane_t *plane;
>> +	igt_plane_t *overlay_plane;
>>  	igt_pipe_crc_t *pipe_crc;
>>  	igt_crc_t ref_crc;
>>  	int flip_count;
>> @@ -126,6 +131,7 @@ typedef struct {
>>  	bool allow_fail;
>>  	struct buf_ops *bops;
>>  	bool atomic_path;
>> +	bool overlay_path;
>>  } data_t;
>>  
>>  static void flip_handler(int fd_, unsigned int sequence, unsigned int tv_sec,
>> @@ -226,6 +232,8 @@ static void test_init(data_t *data)
>>  	igt_output_set_pipe(data->output, data->pipe);
>>  
>>  	data->plane = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
>> +	if (data->overlay_path)
>> +		data->overlay_plane = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_OVERLAY);
>>  }
>>  
>>  static void test_init_fbs(data_t *data)
>> @@ -246,16 +254,27 @@ static void test_init_fbs(data_t *data)
>>  		prev_modifier = data->modifier;
>>  
>>  		if (data->bufs[0].fb_id) {
>> -			for (i = 0; i < NUM_FBS; i++)
>> +			for (i = 0; i < NUM_FBS; i++) {
>>  				igt_remove_fb(data->drm_fd, &data->bufs[i]);
>> +				if (data->overlay_path)
>> +					igt_remove_fb(data->drm_fd, &data->bufs_overlay[i]);
>> +			}
>>  		}
>>  
>> -		for (i = 0; i < NUM_FBS; i++)
>> +		for (i = 0; i < NUM_FBS; i++) {
>>  			make_fb(data, &data->bufs[i], width, height, i);
>> +			if (data->overlay_path)
>> +				make_fb(data, &data->bufs_overlay[i], width, height, i);
>> +		}
>>  	}
>>  
>>  	igt_plane_set_fb(data->plane, &data->bufs[0]);
>>  	igt_plane_set_size(data->plane, width, height);
>> +
>> +	if (data->overlay_path) {
>> +		igt_plane_set_fb(data->overlay_plane, &data->bufs[0]);
>> +		igt_plane_set_size(data->overlay_plane, width, height);
>> +	}
>>  }
>>  
>>  static bool async_flip_needs_extra_frame(data_t *data)
>> @@ -283,12 +302,17 @@ static bool async_flip_needs_extra_frame(data_t *data)
>>  static int perform_flip(data_t *data, int frame, int flags)
>>  {
>>  	int ret;
>> +	igt_plane_t *plane;
>> +	struct igt_fb *bufs;
>> +
>> +	plane = data->overlay_path ? data->overlay_plane : data->plane;
>> +	bufs = data->overlay_path ? data->bufs_overlay : data->bufs;
>>  
>>  	if (!data->atomic_path) {
>>  		ret = drmModePageFlip(data->drm_fd, data->crtc_id,
>> -				      data->bufs[frame % NUM_FBS].fb_id, flags, data);
>> +				     bufs[frame % NUM_FBS].fb_id, flags, data);
>>  	} else {
>> -		igt_plane_set_fb(data->plane, &data->bufs[frame % NUM_FBS]);
>> +		igt_plane_set_fb(plane, &data->bufs[frame % NUM_FBS]);
>>  		ret = igt_display_try_commit_atomic(&data->display, flags, data);
>>  	}
>>  
>> @@ -772,6 +796,7 @@ igt_main
>>  		igt_subtest_with_dynamic("async-flip-with-page-flip-events") {
>>  			data.alternate_sync_async = false;
>>  			data.atomic_path = false;
>> +			data.overlay_path = false;
>>  			if (is_intel_device(data.drm_fd))
>>  				run_test_with_modifiers(&data, test_async_flip);
>>  			else
>> @@ -783,6 +808,7 @@ igt_main
>>  		igt_subtest_with_dynamic("async-flip-with-page-flip-events-atomic") {
>>  			data.alternate_sync_async = false;
>>  			data.atomic_path = true;
>> +			data.overlay_path = false;
>>  			if (is_intel_device(data.drm_fd))
>>  				run_test_with_modifiers(&data, test_async_flip);
>>  			else
>> @@ -793,6 +819,7 @@ igt_main
>>  		igt_subtest_with_dynamic("alternate-sync-async-flip") {
>>  			data.alternate_sync_async = true;
>>  			data.atomic_path = false;
>> +			data.overlay_path = false;
>>  			run_test(&data, test_async_flip);
>>  		}
>>  
>> @@ -800,7 +827,17 @@ igt_main
>>  		igt_subtest_with_dynamic("alternate-sync-async-flip-atomic") {
>>  			data.alternate_sync_async = true;
>>  			data.atomic_path = true;
>> +			data.overlay_path = false;
>> +			run_test(&data, test_async_flip);
>> +		}
>> +
>> +		igt_describe("Verify overlay planes with async flips in atomic API");
>> +		igt_subtest_with_dynamic("overlay-atomic") {
>> +			igt_require(is_amdgpu_device(data.drm_fd));
>> +			data.atomic_path = true;
>> +			data.overlay_path = true;
>>  			run_test(&data, test_async_flip);
>> +			data.overlay_path = false;
>>  		}
>>  
>>  		igt_describe("Verify that the async flip timestamp does not "
>> -- 
>> 2.47.1
>>

  reply	other threads:[~2025-02-19 18:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-16 20:24 [PATCH v2] tests/kms_async_flips: Create subtest for overlay planes André Almeida
2024-12-16 23:53 ` ✓ i915.CI.BAT: success for tests/kms_async_flips: Create subtest for overlay planes (rev2) Patchwork
2024-12-17  2:26 ` ✓ Xe.CI.BAT: " Patchwork
2024-12-17  7:14 ` ✗ i915.CI.Full: failure " Patchwork
2024-12-17  9:39 ` ✗ Xe.CI.Full: " Patchwork
2024-12-17 12:14 ` Patchwork
2025-02-14 17:37 ` [PATCH v2] tests/kms_async_flips: Create subtest for overlay planes André Almeida
2025-02-18 16:30 ` ✓ Xe.CI.BAT: success for tests/kms_async_flips: Create subtest for overlay planes (rev3) Patchwork
2025-02-18 16:47 ` ✗ i915.CI.BAT: failure " Patchwork
2025-02-19 10:04   ` Kamil Konieczny
2025-02-19 11:50     ` Ravali, JupallyX
2025-02-19  9:00 ` ✗ Xe.CI.Full: " Patchwork
2025-02-19 10:25   ` Kamil Konieczny
2025-02-19 10:37 ` [PATCH v2] tests/kms_async_flips: Create subtest for overlay planes Kamil Konieczny
2025-02-19 18:06   ` vitaly prosyak [this message]
2025-02-25 15:42     ` André Almeida
2025-02-25 15:51       ` vitaly prosyak
2025-02-25 19:06         ` Alex Hung
2025-02-25 20:16           ` André Almeida
2025-02-25 21:40             ` Alex Hung
2025-02-25 22:01               ` André Almeida
2025-02-25 22:47                 ` Alex Hung
2025-02-27  2:07                   ` André Almeida
2025-02-27 17:22                     ` Alex Hung
2025-02-19 11:44 ` ✓ i915.CI.BAT: success for tests/kms_async_flips: Create subtest for overlay planes (rev3) Patchwork
2025-02-20  1:48 ` ✗ i915.CI.Full: failure " Patchwork

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=5b88ea25-c9a6-4025-8f9b-34e1b213e258@amd.com \
    --to=vprosyak@amd.com \
    --cc=Alex.Hung@amd.com \
    --cc=andrealmeid@igalia.com \
    --cc=harry.wentland@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jeevan.b@intel.com \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=kernel-dev@igalia.com \
    --cc=vitaly.prosyak@amd.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