From: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: ville.syrjala@linux.intel.com, arun.r.murthy@intel.com,
jani.nikula@linux.intel.com, suraj.kandpal@intel.com,
Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Subject: [PATCH v6 01/13] drm/i915/dip: Add new file to handle Data Island Packet hardware
Date: Sun, 13 Sep 2026 20:26:36 +0530 [thread overview]
Message-ID: <20260913145649.3240904-2-ankit.k.nautiyal@intel.com> (raw)
In-Reply-To: <20260913145649.3240904-1-ankit.k.nautiyal@intel.com>
Add new files intel_dip.c, intel_dip.h, and intel_dip_regs.h to handle
low level hardware programming related to Data Island Packets.
Currently only programming of the Transmission Line for HDMI 2.1
Extended Metadata Packet (EMP) and DP Adaptive-Sync Secondary Data
Packet (SDP) is added (MMIO register EMP_AS_SDP_TL).
This will serve as a common place for DIP related code, which is currently
scattered across DP and HDMI files. A TODO has been added for extracting
the remaining DIP helpers.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
drivers/gpu/drm/i915/Makefile | 1 +
drivers/gpu/drm/i915/display/intel_dip.c | 39 +++++++++++++++++++
drivers/gpu/drm/i915/display/intel_dip.h | 38 ++++++++++++++++++
drivers/gpu/drm/i915/display/intel_dip_regs.h | 17 ++++++++
drivers/gpu/drm/i915/display/intel_vrr.c | 1 +
drivers/gpu/drm/i915/display/intel_vrr_regs.h | 6 ---
drivers/gpu/drm/xe/Makefile | 1 +
7 files changed, 97 insertions(+), 6 deletions(-)
create mode 100644 drivers/gpu/drm/i915/display/intel_dip.c
create mode 100644 drivers/gpu/drm/i915/display/intel_dip.h
create mode 100644 drivers/gpu/drm/i915/display/intel_dip_regs.h
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index a83fa8be0aba..d4e7764621e1 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -349,6 +349,7 @@ i915-y += \
display/intel_cx0_phy.o \
display/intel_ddi.o \
display/intel_ddi_buf_trans.o \
+ display/intel_dip.o \
display/intel_display_device.o \
display/intel_display_trace.o \
display/intel_dkl_phy.o \
diff --git a/drivers/gpu/drm/i915/display/intel_dip.c b/drivers/gpu/drm/i915/display/intel_dip.c
new file mode 100644
index 000000000000..2e2bdb2b199c
--- /dev/null
+++ b/drivers/gpu/drm/i915/display/intel_dip.c
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2026 Intel Corporation
+ *
+ */
+
+#include "intel_de.h"
+#include "intel_dip.h"
+#include "intel_dip_regs.h"
+#include "intel_display_types.h"
+
+u16 intel_dip_read_emp_as_sdp_tl(const struct intel_crtc_state *crtc_state)
+{
+ struct intel_display *display = to_intel_display(crtc_state);
+ enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
+ u32 val;
+
+ if (!HAS_EMP_AS_SDP_TL(display))
+ return 0;
+
+ val = intel_de_read(display, EMP_AS_SDP_TL(display, cpu_transcoder));
+ return REG_FIELD_GET(EMP_AS_SDP_DB_TL_MASK, val);
+}
+
+void intel_dip_write_emp_as_sdp_tl(const struct intel_crtc_state *crtc_state)
+{
+ struct intel_display *display = to_intel_display(crtc_state);
+ enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
+
+ if (!HAS_EMP_AS_SDP_TL(display))
+ return;
+ /*
+ * Since currently we support VRR only for DP/eDP, so this is programmed
+ * only for Adaptive Sync SDP to Vsync start.
+ */
+ intel_de_write(display,
+ EMP_AS_SDP_TL(display, cpu_transcoder),
+ EMP_AS_SDP_DB_TL(crtc_state->vrr.vsync_start));
+}
diff --git a/drivers/gpu/drm/i915/display/intel_dip.h b/drivers/gpu/drm/i915/display/intel_dip.h
new file mode 100644
index 000000000000..25bae4a04d6b
--- /dev/null
+++ b/drivers/gpu/drm/i915/display/intel_dip.h
@@ -0,0 +1,38 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+
+#ifndef __INTEL_DIP_H__
+#define __INTEL_DIP_H__
+
+#include "intel_display_device.h"
+
+/*
+ * Video DIP (Data Island Packet) helpers.
+ *
+ * This file contains helpers for programming video DIP related hardware.
+ *
+ * TODO: Currently, this is only used for programming EMP_AS_SDP_TL i.e. to
+ * program Transmission Line for HDMI 2.1 Extended Metadata Packet (EMP) and
+ * DP Adaptive Sync (AS) Secondary Data Packet (SDP). However, all low level
+ * DIP buffer read/write and related helpers should be extracted here later.
+ */
+
+struct intel_crtc_state;
+
+/*
+ * EMP AS SDP TL: Extended Metadata Packet (EMP) Adaptive Sync (AS)
+ * Secondary Data Packet (SDP) Transmission Line (TL).
+ *
+ * Starting with BMG (display ver 14.01) and LNL+ (display ver 20+),
+ * the AS SDP transmission line is programmable via the EMP AS SDP TL
+ * register.
+ */
+#define HAS_EMP_AS_SDP_TL(__display) (DISPLAY_VERx100(__display) == 1401 || \
+ DISPLAY_VER(__display) >= 20)
+
+u16 intel_dip_read_emp_as_sdp_tl(const struct intel_crtc_state *crtc_state);
+void intel_dip_write_emp_as_sdp_tl(const struct intel_crtc_state *crtc_state);
+
+#endif /* __INTEL_DIP_H__ */
diff --git a/drivers/gpu/drm/i915/display/intel_dip_regs.h b/drivers/gpu/drm/i915/display/intel_dip_regs.h
new file mode 100644
index 000000000000..85dcbf42e77d
--- /dev/null
+++ b/drivers/gpu/drm/i915/display/intel_dip_regs.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+
+#ifndef __INTEL_DIP_REGS_H__
+#define __INTEL_DIP_REGS_H__
+
+#include "intel_display_reg_defs.h"
+
+/* EMP (Extended Metadata Packet) AS (Adaptive Sync) SDP Transmission Line */
+#define _EMP_AS_SDP_TL_A 0x60204
+#define EMP_AS_SDP_TL(display, trans) _MMIO_TRANS2((display), (trans), _EMP_AS_SDP_TL_A)
+#define EMP_AS_SDP_DB_TL_MASK REG_GENMASK(12, 0)
+#define EMP_AS_SDP_DB_TL(db_transmit_line) REG_FIELD_PREP(EMP_AS_SDP_DB_TL_MASK, (db_transmit_line))
+
+#endif /* __INTEL_DIP_REGS_H__ */
diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
index e36db1174440..fd8b6f829cfe 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr.c
+++ b/drivers/gpu/drm/i915/display/intel_vrr.c
@@ -17,6 +17,7 @@
#include "intel_cmtg.h"
#include "intel_crtc.h"
#include "intel_de.h"
+#include "intel_dip_regs.h"
#include "intel_display_limits.h"
#include "intel_display_regs.h"
#include "intel_display_types.h"
diff --git a/drivers/gpu/drm/i915/display/intel_vrr_regs.h b/drivers/gpu/drm/i915/display/intel_vrr_regs.h
index 9d4d6573a149..ba8631cbc672 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr_regs.h
+++ b/drivers/gpu/drm/i915/display/intel_vrr_regs.h
@@ -174,12 +174,6 @@
#define VRR_VSYNC_START_MASK REG_GENMASK(12, 0)
#define VRR_VSYNC_START(vsync_start) REG_FIELD_PREP(VRR_VSYNC_START_MASK, (vsync_start))
-/* Common register for HDMI EMP and DP AS SDP */
-#define _EMP_AS_SDP_TL_A 0x60204
-#define EMP_AS_SDP_TL(display, trans) _MMIO_TRANS2((display), (trans), _EMP_AS_SDP_TL_A)
-#define EMP_AS_SDP_DB_TL_MASK REG_GENMASK(12, 0)
-#define EMP_AS_SDP_DB_TL(db_transmit_line) REG_FIELD_PREP(EMP_AS_SDP_DB_TL_MASK, (db_transmit_line))
-
#define _TRANS_CMRR_M_LO_A 0x604F0
#define TRANS_CMRR_M_LO(display, trans) _MMIO_TRANS2((display), (trans), _TRANS_CMRR_M_LO_A)
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index 67b8b5477639..ba4404896f2f 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -259,6 +259,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
i915-display/intel_ddi.o \
i915-display/intel_ddi_buf_trans.o \
i915-display/intel_de.o \
+ i915-display/intel_dip.o \
i915-display/intel_display.o \
i915-display/intel_display_conversion.o \
i915-display/intel_display_device.o \
--
2.50.1
next prev parent reply other threads:[~2026-09-13 15:13 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 14:56 [PATCH v6 00/13] Add support for Common SDP Transmission Line Ankit Nautiyal
2026-09-13 14:56 ` Ankit Nautiyal [this message]
2026-09-13 14:56 ` [PATCH v6 02/13] drm/i915/vrr: Use the helper to write EMP_AS_SDP_TL register Ankit Nautiyal
2026-09-13 14:56 ` [PATCH v6 03/13] drm/i915/intel_dip: Add check for DP encoder Ankit Nautiyal
2026-09-13 14:56 ` [PATCH v6 04/13] drm/i915/dip: Add helper to get AS SDP Transmission Line Ankit Nautiyal
2026-09-13 14:56 ` [PATCH v6 05/13] drm/i915/display: Add crtc state for DIP transmission lines Ankit Nautiyal
2026-09-13 14:56 ` [PATCH v6 06/13] drm/i915/dip: Store and use AS SDP transmission line from crtc state Ankit Nautiyal
2026-09-13 15:30 ` sashiko-bot
2026-09-13 14:56 ` [PATCH v6 07/13] drm/i915/dip_regs: Add register definitions for common SDP Transmission Line Ankit Nautiyal
2026-09-13 14:56 ` [PATCH v6 08/13] drm/i915/dip: Add HAS_COMMON_SDP_TL macro Ankit Nautiyal
2026-09-13 14:56 ` [PATCH v6 09/13] drm/i915/dip: Store SDP transmission lines in crtc_state Ankit Nautiyal
2026-09-13 14:56 ` [PATCH v6 10/13] drm/i915/dp: Introduce helpers to enable/disable CMN SDP Transmission line Ankit Nautiyal
2026-09-13 14:56 ` [PATCH v6 11/13] drm/i915/dip: Enable Common " Ankit Nautiyal
2026-09-13 15:33 ` sashiko-bot
2026-09-13 14:56 ` [PATCH v6 12/13] drm/i915/dp: Adjust SDP guardband requirement for CMN_SDP_TL Ankit Nautiyal
2026-09-13 15:25 ` sashiko-bot
2026-09-13 14:56 ` [PATCH v6 13/13] drm/i915/display: Dump DIP Transmission lines Ankit Nautiyal
2026-09-13 15:22 ` ✗ CI.checkpatch: warning for Add support for Common SDP Transmission Line (rev6) Patchwork
2026-09-13 15:25 ` ✓ CI.KUnit: success " Patchwork
2026-09-13 16:02 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-13 16:12 ` ✗ i915.CI.BAT: failure " Patchwork
2026-09-13 17:04 ` ✓ Xe.CI.FULL: success " 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=20260913145649.3240904-2-ankit.k.nautiyal@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=arun.r.murthy@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=suraj.kandpal@intel.com \
--cc=ville.syrjala@linux.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.