Re: [PATCH i-g-t 2/2] lib/kms: fix igt_crtc_connector_valid() validity check

Ville Syrjälä
2026-03-20T11:57:48Z

On Fri, Mar 20, 2026 at 01:31:43PM +0200, Jani Nikula wrote:
> output->config.valid_crtc_index_mask is a bit mask of CRTC indexes, not
> pipes. Check the validity using crtc->crtc_index instead of crtc->pipe.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
> lib/igt_kms.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 71ed4604e7e0..318ff8ba9732 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -687,7 +687,7 @@ static inline bool igt_output_is_connected(igt_output_t *output)
> static inline bool igt_crtc_connector_valid(igt_crtc_t *crtc, igt_output_t *output)
> {
> return igt_output_is_connected(output) &&
> - output->config.valid_crtc_index_mask & (1 << crtc->pipe);
> + output->config.valid_crtc_index_mask & (1 << crtc->crtc_index);
> }
>
> #define for_each_if(condition) if (!(condition)) {} else
> --
> 2.47.3

--
Ville Syrjälä
Intel