Re: [PATCH 3/3] lib/igt_hdr: Fix EOTF bit flag checking

Kamil Konieczny
2026-03-18T09:55:22Z

Hi Alex,
On 2026-03-17 at 11:51:32 -0600, Alex Hung wrote:
> EOTF values are bit positions, not masks. Use (1 << value) to create
> proper bit masks when checking HDR support in CTA-861 EDID blocks.
>
> Signed-off-by: Alex Hung <alex.hung@amd.com>
> ---
> lib/igt_hdr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_hdr.c b/lib/igt_hdr.c
> index 6368ae78b..e1bd69087 100644
> --- a/lib/igt_hdr.c
> +++ b/lib/igt_hdr.c
> @@ -151,8 +151,8 @@ bool igt_hdr_cta_block_has_hdr(const char *edid_ext)
> {
> if ((((edid_ext[0] & 0xe0) >> 5 == USE_EXTENDED_TAG) &&
> (edid_ext[1] == HDR_STATIC_METADATA_BLOCK)) &&
> - ((edid_ext[2] & HDMI_EOTF_TRADITIONAL_GAMMA_HDR) ||
> - (edid_ext[2] & HDMI_EOTF_SMPTE_ST2084)))
> + ((edid_ext[2] & (1 << HDMI_EOTF_TRADITIONAL_GAMMA_HDR)) ||
> + (edid_ext[2] & (1 << HDMI_EOTF_SMPTE_ST2084))))
> return true;

This could be sent separatly after Swati patches are merged.
+cc Swati
Cc: Swati Sharma <swati2.sharma@intel.com>

Regards,
Kamil

>
> return false;
> --
> 2.43.0
>