From: Pranay Samala <pranay.samala@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Cc: chaitanya.kumar.borah@intel.com, sameer.lattannavar@intel.com,
pranay.samala@intel.com
Subject: [PATCH v2 1/2] video/hdmi: Add hdmi_eotf_get_name()
Date: Tue, 6 Oct 2026 11:10:03 +0530 [thread overview]
Message-ID: <20261006054004.285744-2-pranay.samala@intel.com> (raw)
In-Reply-To: <20261006054004.285744-1-pranay.samala@intel.com>
Add hdmi_eotf_get_name() next to the other hdmi_*_get_name() helpers.
Assisted-by: LLM
Signed-off-by: Pranay Samala <pranay.samala@intel.com>
---
drivers/video/hdmi.c | 23 +++++++++++++++++++++++
include/linux/hdmi.h | 2 ++
2 files changed, 25 insertions(+)
diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
index 45b42f14a750..cd62afcd38d7 100644
--- a/drivers/video/hdmi.c
+++ b/drivers/video/hdmi.c
@@ -1429,6 +1429,29 @@ static void hdmi_audio_infoframe_log(const char *level,
frame->downmix_inhibit ? "Yes" : "No");
}
+/**
+ * hdmi_eotf_get_name() - get the name of an electro-optical transfer function
+ * @eotf: electro-optical transfer function
+ *
+ * Returns: a human readable name for @eotf, or "Invalid" if @eotf is not a
+ * transfer function defined by CTA-861.
+ */
+const char *hdmi_eotf_get_name(enum hdmi_eotf eotf)
+{
+ switch (eotf) {
+ case HDMI_EOTF_TRADITIONAL_GAMMA_SDR:
+ return "Traditional gamma SDR";
+ case HDMI_EOTF_TRADITIONAL_GAMMA_HDR:
+ return "Traditional gamma HDR";
+ case HDMI_EOTF_SMPTE_ST2084:
+ return "SMPTE ST2084";
+ case HDMI_EOTF_BT_2100_HLG:
+ return "BT.2100 HLG";
+ }
+ return "Invalid";
+}
+EXPORT_SYMBOL(hdmi_eotf_get_name);
+
static void hdmi_drm_infoframe_log(const char *level,
struct device *dev,
const struct hdmi_drm_infoframe *frame)
diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
index b80a5ee63bb2..60a9ad3677b3 100644
--- a/include/linux/hdmi.h
+++ b/include/linux/hdmi.h
@@ -468,4 +468,6 @@ int hdmi_infoframe_unpack(union hdmi_infoframe *frame,
void hdmi_infoframe_log(const char *level, struct device *dev,
const union hdmi_infoframe *frame);
+const char *hdmi_eotf_get_name(enum hdmi_eotf eotf);
+
#endif /* _DRM_HDMI_H */
--
2.53.0
next prev parent reply other threads:[~2026-10-06 5:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 5:40 [PATCH v2 0/2] Expose HDR status in debugfs Pranay Samala
2026-10-06 5:40 ` Pranay Samala [this message]
2026-10-06 5:48 ` [PATCH v2 1/2] video/hdmi: Add hdmi_eotf_get_name() sashiko-bot
2026-10-06 5:40 ` [PATCH v2 2/2] drm/i915/debugfs: Add HDR status to i915_display_info Pranay Samala
2026-10-06 5:48 ` ✓ CI.KUnit: success for Expose HDR status in debugfs Patchwork
2026-10-06 6:29 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-06 6:46 ` ✓ i915.CI.BAT: " Patchwork
2026-10-06 10:10 ` ✓ i915.CI.Full: " Patchwork
2026-10-06 15:01 ` ✓ Xe.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=20261006054004.285744-2-pranay.samala@intel.com \
--to=pranay.samala@intel.com \
--cc=chaitanya.kumar.borah@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sameer.lattannavar@intel.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.