All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: <wayne.lin@amd.com>, <Mark.Broadworth@amd.com>,
	Alex Hung <alex.hung@amd.com>
Subject: [PATCH 3/3] lib/igt_hdr: Fix EOTF bit flag checking
Date: Tue, 17 Mar 2026 11:51:32 -0600	[thread overview]
Message-ID: <20260317175136.3754576-3-alex.hung@amd.com> (raw)
In-Reply-To: <20260317175136.3754576-1-alex.hung@amd.com>

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;
 
 	return false;
-- 
2.43.0


  parent reply	other threads:[~2026-03-17 17:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 17:51 [PATCH 1/3] lib/igt_hdr: Extract HDR helpers into igt_hdr library Alex Hung
2026-03-17 17:51 ` [PATCH 2/3] tools: Add amd_hdr_visual for manual HDR verification Alex Hung
2026-03-18  9:52   ` Kamil Konieczny
2026-03-18 20:13     ` vitaly prosyak
2026-03-18 20:15       ` Alex Hung
2026-03-19  8:54   ` Jani Nikula
2026-03-17 17:51 ` Alex Hung [this message]
2026-03-18  9:55   ` [PATCH 3/3] lib/igt_hdr: Fix EOTF bit flag checking Kamil Konieczny
2026-03-18  0:50 ` ✓ Xe.CI.BAT: success for series starting with [1/3] lib/igt_hdr: Extract HDR helpers into igt_hdr library Patchwork
2026-03-18  1:04 ` ✓ i915.CI.BAT: " Patchwork
2026-03-18  7:34 ` [PATCH 1/3] " Sharma, Swati2
2026-03-18 18:40   ` Alex Hung
2026-04-17 21:35     ` Sharma, Swati2
2026-03-18  9:30 ` Kamil Konieczny
2026-03-19 13:42 ` ✓ Xe.CI.FULL: success for series starting with [1/3] " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260317175136.3754576-3-alex.hung@amd.com \
    --to=alex.hung@amd.com \
    --cc=Mark.Broadworth@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=wayne.lin@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.