[PATCH i-g-t] tests/kms_cursor_crc: optimise cursor crc on simulation
Samala, Pranay
pranay.samala at intel.com
Mon Jun 23 12:55:59 UTC 2025
Hi Santhosh,
> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Santhosh
> Reddy Guddati
> Sent: Monday, June 23, 2025 5:37 PM
> To: igt-dev at lists.freedesktop.org
> Cc: B S, Karthik <karthik.b.s at intel.com>; Murthy, Arun R
> <arun.r.murthy at intel.com>; B, Jeevan <jeevan.b at intel.com>; Sharma, Swati2
> <swati2.sharma at intel.com>; Reddy Guddati, Santhosh
> <santhosh.reddy.guddati at intel.com>
> Subject: [PATCH i-g-t] tests/kms_cursor_crc: optimise cursor crc on simulation
>
> Reduce the number of test crc iterations on simulation to avoid timeouts on
> simulation.
>
> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
> ---
> tests/kms_cursor_crc.c | 18 +++++++++++++++++-
> 1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index
> cacd2402c..28c747639 100644
> --- a/tests/kms_cursor_crc.c
> +++ b/tests/kms_cursor_crc.c
> @@ -490,9 +490,20 @@ static void test_crc_offscreen(data_t *data) static void
> test_crc_sliding(data_t *data) {
> int i;
> + int max;
> + bool run_in_simulation = false;
> +
> + run_in_simulation = igt_run_in_simulation();
> +
> + /* In simulation, we only run a few rounds to keep the test fast */
> + if (run_in_simulation)
I think you can directly use this function in the if condition.
igt_run_in_simulation() ==> Returns: True when run in simulation mode, false otherwise.
So assigning this function to a variable doesn't add much value.
> + max = 4;
> + else
> + max = 16;
> +
> struct {
> igt_crc_t crc[3];
> - } rounds[16] = {};
> + } rounds[max];
>
> /* Make sure cursor moves smoothly and pixel-by-pixel, and that there
> are
> * no alignment issues. Horizontal, vertical and diagonal test.
> @@ -521,10 +532,15 @@ static void test_crc_random(data_t *data) {
> igt_crc_t crc[50];
> int i, max, x[ARRAY_SIZE(crc)], y[ARRAY_SIZE(crc)];
> + bool run_in_simulation = false;
>
> max = data->flags & (TEST_DPMS | TEST_SUSPEND) ? 2 :
> ARRAY_SIZE(crc);
>
> /* Random cursor placement */
> + run_in_simulation = igt_run_in_simulation();
> +
> + if (run_in_simulation)
Same as above
Regards,
Pranay
> + max = 10;
>
> /* HW test */
> cursor_enable(data);
> --
> 2.34.1
More information about the igt-dev
mailing list