Re: [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc: Fix handling of unknown single plane modes

Juha-Pekka Heikkila
2018-11-05T11:24:40Z

On 05.11.2018 11:54, Maarten Lankhorst wrote:
> Op 03-11-18 om 12:28 schreef Juha-Pekka Heikkila:
>> Fix creation of gem buffer so that used bpp will always have value other
>> than 0.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106701
>> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
>> ---
>> tests/kms_available_modes_crc.c | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
>> index 45a4775..006c2db 100644
>> --- a/tests/kms_available_modes_crc.c
>> +++ b/tests/kms_available_modes_crc.c
>> @@ -164,7 +164,7 @@ static const struct {
>> #ifdef DRM_FORMAT_P016
>> { DRM_FORMAT_P016, 0, P010, 0x8000eb00},
>> #endif
>> - { 0, 0, 0, 0 }
>> + { 0, 0, SKIP4, 0 }
> Remove this entry, and make the loop
> for (i = 0; i < ARRAY_SIZE(fillers); i++) { }
>
> if (i == ARRAY_SIZE(fillers))
> return false;
>
> ?
>
> This should prevent it from ever being a problem in the first place.
>

I was thinking this at first too but that 'skip4' flag is used to skip
CRC checking at later time. This test runs in two levels, at first try
to enable plane format and then do CRC. This last element is for the
case where plane format was not hardcoded here.

I did have another look at this test and made another patch which also
relax CRC checking so this test will pass on our modern HW, I got idea
from Ville's usage of gamma on kms_plane. I'll put it on the list in a
minute.

/Juha-Pekka