[igt-dev] [PATCH i-g-t] lib/igt_kms: Fix memory corruption

Vignesh Raman vignesh.raman at collabora.com
Fri Oct 27 11:58:56 UTC 2023


Hi Bhanu,

On 27/10/23 15:25, Modem, Bhanuprakash wrote:
>> With the initial patch all-pipes subtest was passing.
> 
> Looks, these tests are considering crtc count as display->n_pipes (16), 
> but for_each_pipe() operates on IGT_MAX_PIPES (8) causing the failures.
> 
>>
>>
>>>> -    for (i = 0; i < resources->count_crtcs; i++) {
>>>> +    for (i = 0; i < min(resources->count_crtcs, IGT_MAX_PIPES); i++) {
>>>
>>> With this change, we are missing the information of crtc index 7 to 
>>> 15 in the display structure, aren't we?
>>
>> Yes agree. Do we need to fix the all-pipes subtest failure with your 
>> proposed solution?
> 
> IMHO, increasing IGT_MAX_PIPES to 16 would be the simplest solution.
> 
> @@ -68,8 +68,15 @@ enum pipe {
>           PIPE_D,
>           PIPE_E,
>           PIPE_F,
>           PIPE_G,
>           PIPE_H,
> +        PIPE_I,
> +        PIPE_J,
> +        PIPE_K,
> +        PIPE_L,
> +        PIPE_M,
> +        PIPE_N,
> +        PIPE_O,
>           IGT_MAX_PIPES
>   };

Thanks for the suggestion. This works and all-pipes subtest passed. I 
will run some tests and send v2 patch.

Regards,
Vignesh


More information about the igt-dev mailing list