[igt-dev] [i-g-t] tests/kms_cursor_crc: Add max-size test back
Modem, Bhanuprakash
bhanuprakash.modem at intel.com
Thu Aug 25 10:12:30 UTC 2022
On Tue-23-08-2022 12:49 am, Juha-Pekka Heikkila wrote:
> On 9.8.2022 19.58, Bhanuprakash Modem wrote:
>> This patch reverts the max-size test but keeps the clean-up
>> part of the original commit.
>>
>> This reverts commit 5a8fa05a824032aab4c8980727a075f71065e27c.
>>
>> Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
>> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
>> ---
>> tests/kms_cursor_crc.c | 22 +++++++++++++++++++++-
>> 1 file changed, 21 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
>> index 14d4c4ca..cf8d4b68 100644
>> --- a/tests/kms_cursor_crc.c
>> +++ b/tests/kms_cursor_crc.c
>> @@ -693,7 +693,24 @@ static void run_size_tests(data_t *data, void
>> (*testfunc)(data_t *),
>> char name[32];
>> enum pipe pipe;
>> - snprintf(name, sizeof(name), "%dx%d", w, h);
>> + if (w == 0 && h == 0)
>> + strcpy(name, "max-size");
>> + else
>> + snprintf(name, sizeof(name), "%dx%d", w, h);
>> +
>> + if (w == 0 && h == 0) {
>> + w = data->cursor_max_w;
>> + h = data->cursor_max_h;
>> + /*
>> + * No point in doing the "max-size" test if
>> + * it was already covered by the other tests.
>> + */
>> + if ((w == h) && (w <= 512) && (h <= 512) &&
>> + is_power_of_two(w) && is_power_of_two(h)) {
>> + igt_debug("Cursor max size %dx%d already covered by other
>> tests\n", w, h);
>> + return;
>
> Now these maximum cursor size test will not show up in list of tests if
> these rules match and above debug message will go somewhere. Ie. max
> size test and what happened with them are not seen here
>
> https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7626/shards-all.html?testfilter=cursor_crc.*max
>
>
> Originally above check was saying:
> igt_require_f(w != h || w > 512 || h > 512 || !is_power_of_two(w) ||
> !is_power_of_two(h), "Cursor max size %dx%d already covered by other
> tests\n", w, h);
>
> And I think it is needed here to know what happen with maximum cursor
> size tests. Maximum cursor size is special case that is wanted to be
> known what happen with it, will driver reported largest possible cursor
> work.
Thanks for the review JP,
I have floated a new rev to have a separate subtest for max-size.
https://patchwork.freedesktop.org/series/107096/
Still, it'll skip (with above mentioned info) if we already covered that
size in different subtest.
- Bhanu
>
> /Juha-Pekka
>
>> + }
>> + }
>> create_cursor_fb(data, w, h);
>> if (require_cursor_size(data, w, h)) {
>> @@ -855,6 +872,9 @@ static void run_tests_on_pipe(data_t *data)
>> igt_subtest_group
>> run_size_tests(data, size_tests[i].testfunc,
>> w, h);
>> }
>> +
>> + igt_subtest_group
>> + run_size_tests(data, size_tests[i].testfunc, 0, 0);
>> }
>> }
>> }
>
More information about the igt-dev
mailing list