public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Alex Hung <alex.hung@amd.com>, Swati Sharma <swati2.sharma@intel.com>
Subject: [PATCH i-g-t,v3 2/5] lib/igt_hdr: Fix EOTF bit flag checking
Date: Sat, 18 Apr 2026 03:08:15 +0530	[thread overview]
Message-ID: <20260417213818.2050571-3-swati2.sharma@intel.com> (raw)
In-Reply-To: <20260417213818.2050571-1-swati2.sharma@intel.com>

From: Alex Hung <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>
Signed-off-by: Swati Sharma <swati2.sharma@intel.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 5feb1d917..e8083556c 100644
--- a/lib/igt_hdr.c
+++ b/lib/igt_hdr.c
@@ -31,8 +31,8 @@ static bool cta_block(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.25.1


  parent reply	other threads:[~2026-04-17 21:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17 21:38 [PATCH i-g-t,v3 0/5] Enable HDR in IGT Frontbuffer Feature Tests Swati Sharma
2026-04-17 21:38 ` [PATCH i-g-t, v3 1/5] lib/igt_hdr: Move HDR helpers from kms_hdr into shared library Swati Sharma
2026-04-17 23:36   ` Alex Hung
2026-04-28 11:15     ` Sharma, Swati2
2026-04-20 18:46   ` Kamil Konieczny
2026-04-21 12:41     ` Jani Nikula
2026-04-22 17:01       ` Kamil Konieczny
2026-04-28 11:33       ` Sharma, Swati2
2026-04-28 11:28     ` Sharma, Swati2
2026-04-17 21:38 ` Swati Sharma [this message]
2026-04-17 21:38 ` [PATCH i-g-t, v3 3/5] tests/intel/kms_frontbuffer_tracking: Add HDR feature support Swati Sharma
2026-04-17 21:38 ` [PATCH i-g-t, v3 4/5] lib/igt_hdr: Add helpers to enable and disable HDR on an output Swati Sharma
2026-04-17 21:38 ` [PATCH i-g-t, v3 5/5] tests/intel/kms_frontbuffer_tracking: Enable HDR in feature tests Swati Sharma
2026-04-21 12:31 ` ✓ i915.CI.BAT: success for Enable HDR in IGT Frontbuffer Feature Tests (rev3) Patchwork
2026-04-21 12:50 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-21 13:59 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-21 17:01 ` ✗ i915.CI.Full: " 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=20260417213818.2050571-3-swati2.sharma@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=alex.hung@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox