Op 31-08-17 om 09:06 schreef Maarten Lankhorst:
> Op 31-08-17 om 08:18 schreef Gabriel Krisman Bertazi:
>> display->n_pipes is zero-indexed, so N returned in
>> igt_display_get_n_pipes is already not a valid pipe.  This patch
>> prevents kms_ccs from going nuts when testing the first unxesting pipe.
>>
>> Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk>
>> ---
>>  lib/igt_kms.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
>> index 14e2701c3afd..ce07fcc1fc73 100644
>> --- a/lib/igt_kms.c
>> +++ b/lib/igt_kms.c
>> @@ -1864,7 +1864,7 @@ void igt_display_require_output_on_pipe(igt_display_t 
>> *display, enum pipe pipe)
>>  {
>>      igt_output_t *output;
>>  
>> -    igt_skip_on_f(igt_display_get_n_pipes(display) < pipe,
>> +    igt_skip_on_f(igt_display_get_n_pipes(display) <= pipe,
>>                    "Pipe %s does not exist.\n", kmstest_pipe_name(pipe));
>>  
>>      for_each_valid_output_on_pipe(display, pipe, output)
> I think the original check is correct?
>
> Although it could be inverted to make it more clear, matching the other 
> similar checks in tests/kms_*.c:
>
> igt_skip_on_f(pipe >= igt_display_get_n_pipes(display),
Oops, early morning math fail..

Just use the suggested form please. :)

Reviewed-by: Maarten Lankhorst <maarten.lankho...@linux.intel.com>

~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to