[PATCH i-g-t v3] tests/kms_cursor_crc: optimise cursor crc on simulation
Sharma, Swati2
swati2.sharma at intel.com
Mon Jul 7 12:53:41 UTC 2025
Hi Santosh,
On 02-07-2025 06:51 pm, Kamil Konieczny wrote:
> Hi Santhosh,
> On 2025-07-02 at 14:46:43 +0530, Santhosh Reddy Guddati wrote:
>> Reduce the number of test crc iterations on simulation to avoid timeouts
>> on simulation.
"on simulation" is repeated and looks awkward. You can rephrase it
"Reduce CRC test iterations in simulation to avoid timeouts."
With this fixed. Patch LGTM
Reviewed-by: Swati Sharma <swati2.sharma at intel.com>
>>
>> V2: Avoid usage of extra variable to check run_in_simuation (Pranay)
>> V3: Initialise max and avoid unnecessary bump (Kamil)
>>
>> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
> LGTM
> Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
>
>> ---
>> tests/kms_cursor_crc.c | 12 ++++++++++--
>> 1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
>> index cacd2402c..8a465dc6b 100644
>> --- a/tests/kms_cursor_crc.c
>> +++ b/tests/kms_cursor_crc.c
>> @@ -490,10 +490,15 @@ static void test_crc_offscreen(data_t *data)
>> static void test_crc_sliding(data_t *data)
>> {
>> int i;
>> + int max;
>> +
>> struct {
>> igt_crc_t crc[3];
>> } rounds[16] = {};
>>
>> + /* In simulation, we only run a few rounds to keep the test fast */
>> + max = igt_run_in_simulation() ? 4 : 16;
>> +
>> /* Make sure cursor moves smoothly and pixel-by-pixel, and that there are
>> * no alignment issues. Horizontal, vertical and diagonal test.
>> */
>> @@ -502,7 +507,7 @@ static void test_crc_sliding(data_t *data)
>> cursor_enable(data);
>> igt_plane_set_fb(data->primary, &data->primary_fb[HWCURSORBUFFER]);
>>
>> - for (i = 0; i < ARRAY_SIZE(rounds); i++) {
>> + for (i = 0; i < max; i++) {
>> do_single_test(data, i, 0, true, &rounds[i].crc[0]);
>> do_single_test(data, 0, i, true, &rounds[i].crc[1]);
>> do_single_test(data, i, i, true, &rounds[i].crc[2]);
>> @@ -510,7 +515,7 @@ static void test_crc_sliding(data_t *data)
>>
>> /* SW test */
>> cursor_disable(data);
>> - for (i = 0; i < ARRAY_SIZE(rounds); i++) {
>> + for (i = 0; i < max; i++) {
>> do_single_test(data, i, 0, false, &rounds[i].crc[0]);
>> do_single_test(data, 0, i, false, &rounds[i].crc[1]);
>> do_single_test(data, i, i, false, &rounds[i].crc[2]);
>> @@ -526,6 +531,9 @@ static void test_crc_random(data_t *data)
>>
>> /* Random cursor placement */
>>
>> + if (igt_run_in_simulation() && max > 10)
>> + max = 10;
>> +
>> /* HW test */
>> cursor_enable(data);
>> igt_plane_set_fb(data->primary, &data->primary_fb[HWCURSORBUFFER]);
>> --
>> 2.34.1
>>
More information about the igt-dev
mailing list