* [PATCH 01/26] drm/dp: Rename and relocate AS SDP payload field masks
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 02/26] drm/dp: Clean up DPRX feature enumeration macros Ankit Nautiyal
` (25 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
The AS SDP payload field masks were misnamed and placed under the DPRX
feature enumeration list. These are not DPRX capability bits, but are
payload field masks for the Adaptive Sync SDP.
Relocate both masks next to the AS SDP definitions.
Update users to the corrected names. No functional change.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
include/drm/display/drm_dp.h | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 4955bd8b11d7..602efaf500bd 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5295,8 +5295,8 @@ int intel_dp_as_sdp_unpack(struct drm_dp_as_sdp *as_sdp,
if ((sdp->sdp_header.HB3 & 0x3F) != 9)
return -EINVAL;
- as_sdp->length = sdp->sdp_header.HB3 & DP_ADAPTIVE_SYNC_SDP_LENGTH;
- as_sdp->mode = sdp->db[0] & DP_ADAPTIVE_SYNC_SDP_OPERATION_MODE;
+ as_sdp->length = sdp->sdp_header.HB3 & DP_AS_SDP_LENGTH_MASK;
+ as_sdp->mode = sdp->db[0] & DP_AS_SDP_OPERATION_MODE_MASK;
as_sdp->vtotal = (sdp->db[2] << 8) | sdp->db[1];
as_sdp->target_rr = (u64)sdp->db[3] | ((u64)sdp->db[4] & 0x3);
as_sdp->target_rr_divider = sdp->db[4] & 0x20 ? true : false;
diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h
index 8b15d3eeb716..4ea3b5b08a12 100644
--- a/include/drm/display/drm_dp.h
+++ b/include/drm/display/drm_dp.h
@@ -1204,8 +1204,6 @@
#define DP_DPRX_FEATURE_ENUMERATION_LIST_CONT_1 0x2214 /* 2.0 E11 */
# define DP_ADAPTIVE_SYNC_SDP_SUPPORTED (1 << 0)
-# define DP_ADAPTIVE_SYNC_SDP_OPERATION_MODE GENMASK(1, 0)
-# define DP_ADAPTIVE_SYNC_SDP_LENGTH GENMASK(5, 0)
# define DP_AS_SDP_FIRST_HALF_LINE_OR_3840_PIXEL_CYCLE_WINDOW_NOT_SUPPORTED (1 << 1)
# define DP_VSC_EXT_SDP_FRAMEWORK_VERSION_1_SUPPORTED (1 << 4)
@@ -1870,4 +1868,7 @@ enum operation_mode {
DP_AS_SDP_FAVT_TRR_REACHED = 0x03
};
+#define DP_AS_SDP_OPERATION_MODE_MASK GENMASK(1, 0)
+#define DP_AS_SDP_LENGTH_MASK GENMASK(5, 0)
+
#endif /* _DRM_DP_H_ */
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 02/26] drm/dp: Clean up DPRX feature enumeration macros
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
2026-04-08 8:42 ` [PATCH 01/26] drm/dp: Rename and relocate AS SDP payload field masks Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 03/26] drm/dp: Add bits for AS SDP FAVT Payload Fields Parsing support Ankit Nautiyal
` (24 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Align the DP_DPRX feature enumeration macros for better readability and
consistency, and use the BIT() macro instead of open-coded shifts.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
include/drm/display/drm_dp.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h
index 4ea3b5b08a12..49f0154eb93c 100644
--- a/include/drm/display/drm_dp.h
+++ b/include/drm/display/drm_dp.h
@@ -1202,10 +1202,10 @@
# define DP_DPRX_SLEEP_WAKE_TIMEOUT_PERIOD_80_MS 0x04
# define DP_DPRX_SLEEP_WAKE_TIMEOUT_PERIOD_100_MS 0x05
-#define DP_DPRX_FEATURE_ENUMERATION_LIST_CONT_1 0x2214 /* 2.0 E11 */
-# define DP_ADAPTIVE_SYNC_SDP_SUPPORTED (1 << 0)
-# define DP_AS_SDP_FIRST_HALF_LINE_OR_3840_PIXEL_CYCLE_WINDOW_NOT_SUPPORTED (1 << 1)
-# define DP_VSC_EXT_SDP_FRAMEWORK_VERSION_1_SUPPORTED (1 << 4)
+#define DP_DPRX_FEATURE_ENUMERATION_LIST_CONT_1 0x2214 /* 2.0 E11 */
+# define DP_ADAPTIVE_SYNC_SDP_SUPPORTED BIT(0)
+# define DP_AS_SDP_FIRST_HALF_LINE_OR_3840_PIXEL_CYCLE_WINDOW_NOT_SUPPORTED BIT(1)
+# define DP_VSC_EXT_SDP_FRAMEWORK_VERSION_1_SUPPORTED BIT(4)
#define DP_128B132B_SUPPORTED_LINK_RATES 0x2215 /* 2.0 */
# define DP_UHBR10 (1 << 0)
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 03/26] drm/dp: Add bits for AS SDP FAVT Payload Fields Parsing support
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
2026-04-08 8:42 ` [PATCH 01/26] drm/dp: Rename and relocate AS SDP payload field masks Ankit Nautiyal
2026-04-08 8:42 ` [PATCH 02/26] drm/dp: Clean up DPRX feature enumeration macros Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 04/26] drm/dp: Add DPCD for configuring AS SDP for PR + VRR Ankit Nautiyal
` (23 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
DP v2.1 introduced support for sending AS SDP payload bytes for FAVT.
Add the relavant bits for the same.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
include/drm/display/drm_dp.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h
index 49f0154eb93c..8d172863eba3 100644
--- a/include/drm/display/drm_dp.h
+++ b/include/drm/display/drm_dp.h
@@ -1205,6 +1205,7 @@
#define DP_DPRX_FEATURE_ENUMERATION_LIST_CONT_1 0x2214 /* 2.0 E11 */
# define DP_ADAPTIVE_SYNC_SDP_SUPPORTED BIT(0)
# define DP_AS_SDP_FIRST_HALF_LINE_OR_3840_PIXEL_CYCLE_WINDOW_NOT_SUPPORTED BIT(1)
+# define DP_AS_SDP_FAVT_PAYLOAD_FIELDS_PARSING_SUPPORTED BIT(2) /* 2.1 */
# define DP_VSC_EXT_SDP_FRAMEWORK_VERSION_1_SUPPORTED BIT(4)
#define DP_128B132B_SUPPORTED_LINK_RATES 0x2215 /* 2.0 */
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 04/26] drm/dp: Add DPCD for configuring AS SDP for PR + VRR
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (2 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 03/26] drm/dp: Add bits for AS SDP FAVT Payload Fields Parsing support Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 05/26] drm/dp: Store coasting vtotal in struct drm_dp_as_sdp Ankit Nautiyal
` (22 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Add additional DPCDs required to be configured to support VRR with Panel
Replay. These DPCDs are specifically required for configuring Adaptive Sync
SDP and are introduced in DP v2.1.
v2:
- Correct the shift for the bits. (Ville)
- Add DP_PR_ prefix for the PR-related fields.
v3:
- Use macro values in their shifted form to match the convention. (Ville)
v4:
- Add macro for the mask. (Ville)
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
include/drm/display/drm_dp.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h
index 8d172863eba3..829e4d98d61c 100644
--- a/include/drm/display/drm_dp.h
+++ b/include/drm/display/drm_dp.h
@@ -718,6 +718,12 @@
#define DP_EXTENDED_DPRX_SLEEP_WAKE_TIMEOUT_GRANT 0x119 /* 1.4a */
# define DP_DPRX_SLEEP_WAKE_TIMEOUT_PERIOD_GRANTED (1 << 0)
+#define PANEL_REPLAY_CONFIG3 0x11a /* DP 2.1 */
+# define DP_PR_AS_SDP_SETUP_TIME_MASK (3 << 6)
+# define DP_PR_AS_SDP_SETUP_TIME_T1 (0 << 6)
+# define DP_PR_AS_SDP_SETUP_TIME_DYNAMIC (1 << 6) /* DP 2.1 Table 2-227 */
+# define DP_PR_AS_SDP_SETUP_TIME_T2 (2 << 6)
+
#define DP_FEC_CONFIGURATION 0x120 /* 1.4 */
# define DP_FEC_READY (1 << 0)
# define DP_FEC_ERR_COUNT_SEL_MASK (7 << 1)
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/dp: Add DPCD for configuring AS SDP for PR + VRR
2026-04-08 8:42 ` [PATCH 04/26] drm/dp: Add DPCD for configuring AS SDP for PR + VRR Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**R-b: Ville Syrjala**
Adds `PANEL_REPLAY_CONFIG3` (0x11a) with `DP_PR_AS_SDP_SETUP_TIME_*` macros. The mask and values use the shifted form correctly. Note: the Signed-off-by appears twice.
```
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
```
The duplicate SoB is unusual (likely a rebase artifact) but not technically wrong.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH 05/26] drm/dp: Store coasting vtotal in struct drm_dp_as_sdp
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (3 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 04/26] drm/dp: Add DPCD for configuring AS SDP for PR + VRR Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 06/26] drm/dp: Add a helper to get the SDP type as a string Ankit Nautiyal
` (21 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Add new field in struct drm_dp_as_sdp to store coasting vtotal.
This is used by the sinks that support Panel Replay and Asynchronous
timing during PR Active to derive refresh rate, when AS SDP transmission
is stopped by the source.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
drivers/gpu/drm/display/drm_dp_helper.c | 1 +
include/drm/display/drm_dp_helper.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
index a697cc227e28..e29958f8b0b6 100644
--- a/drivers/gpu/drm/display/drm_dp_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_helper.c
@@ -3512,6 +3512,7 @@ void drm_dp_as_sdp_log(struct drm_printer *p, const struct drm_dp_as_sdp *as_sdp
drm_printf(p, " duration_incr_ms: %d\n", as_sdp->duration_incr_ms);
drm_printf(p, " duration_decr_ms: %d\n", as_sdp->duration_decr_ms);
drm_printf(p, " operation_mode: %d\n", as_sdp->mode);
+ drm_printf(p, " coasting vtotal: %d\n", as_sdp->coasting_vtotal);
}
EXPORT_SYMBOL(drm_dp_as_sdp_log);
diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
index 1d0acd58f486..8c2d77a032f0 100644
--- a/include/drm/display/drm_dp_helper.h
+++ b/include/drm/display/drm_dp_helper.h
@@ -126,6 +126,7 @@ struct drm_dp_as_sdp {
int duration_decr_ms;
bool target_rr_divider;
enum operation_mode mode;
+ int coasting_vtotal;
};
void drm_dp_as_sdp_log(struct drm_printer *p,
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/dp: Store coasting vtotal in struct drm_dp_as_sdp
2026-04-08 8:42 ` [PATCH 05/26] drm/dp: Store coasting vtotal in struct drm_dp_as_sdp Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Adds `coasting_vtotal` to `struct drm_dp_as_sdp` and logs it. The field is `int`, which is fine since vtotal values fit easily.
The log string uses a space between "coasting" and "vtotal":
```c
drm_printf(p, " coasting vtotal: %d\n", as_sdp->coasting_vtotal);
```
This is slightly inconsistent with other fields that use underscores (e.g., `target_rr`, `duration_incr_ms`). Minor style nit.
Missing R-b from Ville (unlike neighboring patches).
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH 06/26] drm/dp: Add a helper to get the SDP type as a string
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (4 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 05/26] drm/dp: Store coasting vtotal in struct drm_dp_as_sdp Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 07/26] drm/dp: Add target_rr_divider field in AS SDP logging Ankit Nautiyal
` (20 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Introduce dp_sdp_type_get_name() to get the SDP type as a string.
Use this to log the SDP type based on the sdp_type fields of the
VSC and AS SDPs instead of the hardcoded strings.
While at it, rename "SDP : AS_SDP" to "SDP : Adaptive Sync"
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
drivers/gpu/drm/display/drm_dp_helper.c | 36 ++++++++++++++++++++++---
1 file changed, 32 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
index e29958f8b0b6..102328d9022d 100644
--- a/drivers/gpu/drm/display/drm_dp_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_helper.c
@@ -3487,10 +3487,38 @@ static const char *dp_content_type_get_name(enum dp_content_type content_type)
}
}
+static const char *dp_sdp_type_get_name(unsigned char type)
+{
+ switch (type) {
+ case DP_SDP_AUDIO_TIMESTAMP:
+ return "Audio Timestamp";
+ case DP_SDP_AUDIO_STREAM:
+ return "Audio Stream";
+ case DP_SDP_EXTENSION:
+ return "Extension";
+ case DP_SDP_AUDIO_COPYMANAGEMENT:
+ return "Audio Copy Management";
+ case DP_SDP_ISRC:
+ return "ISRC";
+ case DP_SDP_VSC:
+ return "VSC";
+ case DP_SDP_PPS:
+ return "PPS";
+ case DP_SDP_VSC_EXT_VESA:
+ return "VSC EXT VESA";
+ case DP_SDP_VSC_EXT_CEA:
+ return "VSC EXT CEA";
+ case DP_SDP_ADAPTIVE_SYNC:
+ return "Adaptive Sync";
+ default:
+ return "Unknown";
+ }
+}
+
void drm_dp_vsc_sdp_log(struct drm_printer *p, const struct drm_dp_vsc_sdp *vsc)
{
- drm_printf(p, "DP SDP: VSC, revision %u, length %u\n",
- vsc->revision, vsc->length);
+ drm_printf(p, "DP SDP: %s, revision %u, length %u\n",
+ dp_sdp_type_get_name(vsc->sdp_type), vsc->revision, vsc->length);
drm_printf(p, " pixelformat: %s\n",
dp_pixelformat_get_name(vsc->pixelformat));
drm_printf(p, " colorimetry: %s\n",
@@ -3505,8 +3533,8 @@ EXPORT_SYMBOL(drm_dp_vsc_sdp_log);
void drm_dp_as_sdp_log(struct drm_printer *p, const struct drm_dp_as_sdp *as_sdp)
{
- drm_printf(p, "DP SDP: AS_SDP, revision %u, length %u\n",
- as_sdp->revision, as_sdp->length);
+ drm_printf(p, "DP SDP: %s, revision %u, length %u\n",
+ dp_sdp_type_get_name(as_sdp->sdp_type), as_sdp->revision, as_sdp->length);
drm_printf(p, " vtotal: %d\n", as_sdp->vtotal);
drm_printf(p, " target_rr: %d\n", as_sdp->target_rr);
drm_printf(p, " duration_incr_ms: %d\n", as_sdp->duration_incr_ms);
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/dp: Add a helper to get the SDP type as a string
2026-04-08 8:42 ` [PATCH 06/26] drm/dp: Add a helper to get the SDP type as a string Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Adds `dp_sdp_type_get_name()` and uses it in both `drm_dp_vsc_sdp_log()` and `drm_dp_as_sdp_log()`. The function covers the common SDP types.
Concern: If `vsc->sdp_type` or `as_sdp->sdp_type` was never set (e.g. old code paths that don't populate sdp_type), this would print "Unknown" instead of the previous hardcoded "VSC" / "AS_SDP". This is mitigated by patch 14 which sets sdp_type in the unpack path, but there could be a window between patches 6 and 14 where readback prints "Unknown" for AS SDP.
Missing R-b.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH 07/26] drm/dp: Add target_rr_divider field in AS SDP logging
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (5 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 06/26] drm/dp: Add a helper to get the SDP type as a string Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 08/26] drm/i915/dp: Fix readback for target_rr in Adaptive Sync SDP Ankit Nautiyal
` (19 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
The field target_rr_divider is missing from the AS SDP logging.
Add it and print the divider value (1.001 or 1.000) as per the DP 2.1 spec.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
drivers/gpu/drm/display/drm_dp_helper.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
index 102328d9022d..c8421099a3ac 100644
--- a/drivers/gpu/drm/display/drm_dp_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_helper.c
@@ -3537,6 +3537,8 @@ void drm_dp_as_sdp_log(struct drm_printer *p, const struct drm_dp_as_sdp *as_sdp
dp_sdp_type_get_name(as_sdp->sdp_type), as_sdp->revision, as_sdp->length);
drm_printf(p, " vtotal: %d\n", as_sdp->vtotal);
drm_printf(p, " target_rr: %d\n", as_sdp->target_rr);
+ drm_printf(p, " target_rr_divider: %s\n",
+ as_sdp->target_rr_divider ? "1.001" : "1.000");
drm_printf(p, " duration_incr_ms: %d\n", as_sdp->duration_incr_ms);
drm_printf(p, " duration_decr_ms: %d\n", as_sdp->duration_decr_ms);
drm_printf(p, " operation_mode: %d\n", as_sdp->mode);
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 08/26] drm/i915/dp: Fix readback for target_rr in Adaptive Sync SDP
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (6 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 07/26] drm/dp: Add target_rr_divider field in AS SDP logging Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 09/26] drm/i915/vrr: Avoid vrr for PCON with HDMI2.1 sink Ankit Nautiyal
` (18 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal,
Mitul Golani
Correct the bit-shift logic to properly readback the 10 bit target_rr from
DB3 and DB4.
v2: Align the style with readback for vtotal. (Ville)
Fixes: 12ea89291603 ("drm/i915/dp: Add Read/Write support for Adaptive Sync SDP")
Cc: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 602efaf500bd..49eeb35973a1 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5298,7 +5298,7 @@ int intel_dp_as_sdp_unpack(struct drm_dp_as_sdp *as_sdp,
as_sdp->length = sdp->sdp_header.HB3 & DP_AS_SDP_LENGTH_MASK;
as_sdp->mode = sdp->db[0] & DP_AS_SDP_OPERATION_MODE_MASK;
as_sdp->vtotal = (sdp->db[2] << 8) | sdp->db[1];
- as_sdp->target_rr = (u64)sdp->db[3] | ((u64)sdp->db[4] & 0x3);
+ as_sdp->target_rr = ((sdp->db[4] & 0x3) << 8) | sdp->db[3];
as_sdp->target_rr_divider = sdp->db[4] & 0x20 ? true : false;
return 0;
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/i915/dp: Fix readback for target_rr in Adaptive Sync SDP
2026-04-08 8:42 ` [PATCH 08/26] drm/i915/dp: Fix readback for target_rr in Adaptive Sync SDP Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**R-b: Ville Syrjala, Fixes tag present**
This is a real bug fix. The old code:
```c
as_sdp->target_rr = (u64)sdp->db[3] | ((u64)sdp->db[4] & 0x3);
```
is wrong -- it ORs db[4] bits[1:0] into bits[1:0] of db[3] instead of shifting them to bits[9:8]. The fix:
```c
as_sdp->target_rr = ((sdp->db[4] & 0x3) << 8) | sdp->db[3];
```
This matches the pack function which does `(as_sdp->target_rr >> 8) & 0x3` into db[4] and `target_rr & 0xFF` into db[3].
Good fix. Should be backported to stable.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH 09/26] drm/i915/vrr: Avoid vrr for PCON with HDMI2.1 sink
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (7 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 08/26] drm/i915/dp: Fix readback for target_rr in Adaptive Sync SDP Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 10/26] drm/i915/dp: Account for AS_SDP guardband only when enabled Ankit Nautiyal
` (17 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Currently we do not support VRR with HDMI so skip vrr compute
config step for all DP branch devices.
v2: Restrict VRR on all DP branch devices instead for checking only for
HDMI. (Ville)
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_vrr.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
index fae1186a90b2..1b09992ce9fd 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr.c
+++ b/drivers/gpu/drm/i915/display/intel_vrr.c
@@ -55,6 +55,16 @@ bool intel_vrr_is_capable(struct intel_connector *connector)
if (connector->mst.dp)
return false;
intel_dp = intel_attached_dp(connector);
+ /*
+ * Among non-MST DP branch devices, only an HDMI 2.1 sink connected
+ * via a PCON could support VRR. However, supporting VRR through a
+ * PCON requires non-trivial changes that are not implemented yet.
+ * Until that support exists, avoid VRR on all DP branch devices.
+ *
+ * TODO: Add support for VRR for DP->HDMI 2.1 PCON.
+ */
+ if (drm_dp_is_branch(intel_dp->dpcd))
+ return false;
if (!drm_dp_sink_can_do_video_without_timing_msa(intel_dp->dpcd))
return false;
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 10/26] drm/i915/dp: Account for AS_SDP guardband only when enabled
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (8 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 09/26] drm/i915/vrr: Avoid vrr for PCON with HDMI2.1 sink Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 11/26] drm/i915/dp: Add a helper to decide if AS SDP can be used Ankit Nautiyal
` (16 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Currently the intel_dp_sdp_min_guardband() accounts for AS_SDP for all
platforms that support adaptive sync SDP even for configurations where
it cannot be enabled. Instead account for adaptive sync SDP guardband
only when it is enabled.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 49eeb35973a1..499850c2abcf 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -7374,7 +7374,6 @@ int intel_dp_get_lines_for_sdp(const struct intel_crtc_state *crtc_state, u32 ty
int intel_dp_sdp_min_guardband(const struct intel_crtc_state *crtc_state,
bool assume_all_enabled)
{
- struct intel_display *display = to_intel_display(crtc_state);
int sdp_guardband = 0;
if (assume_all_enabled ||
@@ -7389,8 +7388,8 @@ int intel_dp_sdp_min_guardband(const struct intel_crtc_state *crtc_state,
sdp_guardband = max(sdp_guardband,
intel_dp_get_lines_for_sdp(crtc_state, DP_SDP_PPS));
- if ((assume_all_enabled && HAS_AS_SDP(display)) ||
- crtc_state->infoframes.enable & intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC))
+ if (crtc_state->infoframes.enable &
+ intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC))
sdp_guardband = max(sdp_guardband,
intel_dp_get_lines_for_sdp(crtc_state, DP_SDP_ADAPTIVE_SYNC));
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/i915/dp: Account for AS_SDP guardband only when enabled
2026-04-08 8:42 ` [PATCH 10/26] drm/i915/dp: Account for AS_SDP guardband only when enabled Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**R-b: Ville Syrjala**
Removes the `assume_all_enabled && HAS_AS_SDP(display)` path from the AS SDP guardband calculation, now only considering AS SDP if it's actually enabled in `crtc_state->infoframes.enable`.
This drops the `struct intel_display *display` variable entirely since it's no longer needed. The logic change means that when `assume_all_enabled` is true (used during guardband precomputation), AS SDP is no longer speculatively accounted for. This is intentional -- later patches (26) ensure AS SDP is always enabled when it could be needed.
However, there's a sequencing concern: between this patch and patch 26, the guardband might be underestimated for configurations that have AS SDP capability but haven't yet enabled it. In a bisection between patches 10 and 26, this could theoretically cause problems. Worth noting but likely acceptable given the series is intended to land as a unit.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH 11/26] drm/i915/dp: Add a helper to decide if AS SDP can be used
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (9 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 10/26] drm/i915/dp: Account for AS_SDP guardband only when enabled Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 12/26] drm/i915/dp: Skip AS SDP for DP branch devices Ankit Nautiyal
` (15 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Add a helper that determines whether AS SDP can be used for the
current DP configuration. For now this is true only when the sink
supports AS SDP and VRR is enabled, but more conditions may be added
later.
v2:
- Rename to intel_dp_needs_as_sdp(). (Ville)
- Add a #FIXME documenting non-atomic of DP SDP updates. (Ville)
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 499850c2abcf..3d0ea074e610 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3124,6 +3124,15 @@ static void intel_dp_compute_vsc_colorimetry(const struct intel_crtc_state *crtc
vsc->content_type = DP_CONTENT_TYPE_NOT_DEFINED;
}
+static bool intel_dp_needs_as_sdp(struct intel_dp *intel_dp,
+ struct intel_crtc_state *crtc_state)
+{
+ if (!intel_dp->as_sdp_supported)
+ return false;
+
+ return crtc_state->vrr.enable;
+}
+
static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
struct intel_crtc_state *crtc_state)
{
@@ -3131,7 +3140,12 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
const struct drm_display_mode *adjusted_mode =
&crtc_state->hw.adjusted_mode;
- if (!crtc_state->vrr.enable || !intel_dp->as_sdp_supported)
+ /*
+ * #FIXME: SDP/infoframe updates aren’t truly atomic, and with the new
+ * cdclk->tc clock crossing we may transiently send a corrupted packet
+ * if the update lands mid‑transmission.
+ */
+ if (!intel_dp_needs_as_sdp(intel_dp, crtc_state))
return;
crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC);
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 12/26] drm/i915/dp: Skip AS SDP for DP branch devices
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (10 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 11/26] drm/i915/dp: Add a helper to decide if AS SDP can be used Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 13/26] drm/i915/dp: Use revision field of AS SDP data structure Ankit Nautiyal
` (14 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Currently, VRR is not implmented for DP branch devices.
So skip sending AS SDP for them.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 3d0ea074e610..095bde8e97ef 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3130,6 +3130,12 @@ static bool intel_dp_needs_as_sdp(struct intel_dp *intel_dp,
if (!intel_dp->as_sdp_supported)
return false;
+ /*
+ * #TODO Implement AS SDP for DP branch device.
+ */
+ if (drm_dp_is_branch(intel_dp->dpcd))
+ return false;
+
return crtc_state->vrr.enable;
}
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 13/26] drm/i915/dp: Use revision field of AS SDP data structure
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (11 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 12/26] drm/i915/dp: Skip AS SDP for DP branch devices Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 14/26] drm/i915/dp: Set sdp_type in AS SDP unpack Ankit Nautiyal
` (13 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Use the revision field of struct drm_dp_as_sdp instead of current
hardcoding for the AS SDP revisions.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 3 ++-
drivers/gpu/drm/i915/display/intel_dp.c | 7 +++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 10b6c6fcb03f..57870baebfa5 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4906,7 +4906,8 @@ static bool
intel_compare_dp_as_sdp(const struct drm_dp_as_sdp *a,
const struct drm_dp_as_sdp *b)
{
- return a->vtotal == b->vtotal &&
+ return a->revision == b->revision &&
+ a->vtotal == b->vtotal &&
a->target_rr == b->target_rr &&
a->duration_incr_ms == b->duration_incr_ms &&
a->duration_decr_ms == b->duration_decr_ms &&
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 095bde8e97ef..cec0f3d03c2f 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3159,6 +3159,7 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
as_sdp->sdp_type = DP_SDP_ADAPTIVE_SYNC;
as_sdp->length = 0x9;
as_sdp->duration_incr_ms = 0;
+ as_sdp->revision = 0x2;
as_sdp->vtotal = intel_vrr_vmin_vtotal(crtc_state);
if (crtc_state->cmrr.enable) {
@@ -5122,7 +5123,7 @@ static ssize_t intel_dp_as_sdp_pack(const struct drm_dp_as_sdp *as_sdp,
/* Prepare AS (Adaptive Sync) SDP Header */
sdp->sdp_header.HB0 = 0;
sdp->sdp_header.HB1 = as_sdp->sdp_type;
- sdp->sdp_header.HB2 = 0x02;
+ sdp->sdp_header.HB2 = as_sdp->revision;
sdp->sdp_header.HB3 = as_sdp->length;
/* Fill AS (Adaptive Sync) SDP Payload */
@@ -5309,13 +5310,11 @@ int intel_dp_as_sdp_unpack(struct drm_dp_as_sdp *as_sdp,
if (sdp->sdp_header.HB1 != DP_SDP_ADAPTIVE_SYNC)
return -EINVAL;
- if (sdp->sdp_header.HB2 != 0x02)
- return -EINVAL;
-
if ((sdp->sdp_header.HB3 & 0x3F) != 9)
return -EINVAL;
as_sdp->length = sdp->sdp_header.HB3 & DP_AS_SDP_LENGTH_MASK;
+ as_sdp->revision = sdp->sdp_header.HB2;
as_sdp->mode = sdp->db[0] & DP_AS_SDP_OPERATION_MODE_MASK;
as_sdp->vtotal = (sdp->db[2] << 8) | sdp->db[1];
as_sdp->target_rr = ((sdp->db[4] & 0x3) << 8) | sdp->db[3];
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/i915/dp: Use revision field of AS SDP data structure
2026-04-08 8:42 ` [PATCH 13/26] drm/i915/dp: Use revision field of AS SDP data structure Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**R-b: Ville Syrjala**
Moves the AS SDP revision from hardcoded `0x02` to `as_sdp->revision`, sets it during compute, and reads it back during unpack. Also adds `revision` to the comparison function.
The removal of the revision check in unpack is notable:
```c
- if (sdp->sdp_header.HB2 != 0x02)
- return -EINVAL;
```
This makes the unpack accept any revision, which is necessary for forward compatibility but means the driver won't reject AS SDPs with unknown revisions during readback verification. This is reasonable since the purpose of the readback is comparison with what was programmed, not validation.
No issues.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH 14/26] drm/i915/dp: Set sdp_type in AS SDP unpack
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (12 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 13/26] drm/i915/dp: Use revision field of AS SDP data structure Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 15/26] drm/i915/dp: Include all relevant AS SDP fields in comparison Ankit Nautiyal
` (12 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Add sdp_type in AS SDP unpack. Since the field sdp_type is not compared
in intel_compare_dp_as_sdp() it doesn't throw up any mismatch error yet.
In the subsequent change this field will be added along with other missing
fields for comparison.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index cec0f3d03c2f..bca5dc2c3b30 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5313,6 +5313,7 @@ int intel_dp_as_sdp_unpack(struct drm_dp_as_sdp *as_sdp,
if ((sdp->sdp_header.HB3 & 0x3F) != 9)
return -EINVAL;
+ as_sdp->sdp_type = sdp->sdp_header.HB1;
as_sdp->length = sdp->sdp_header.HB3 & DP_AS_SDP_LENGTH_MASK;
as_sdp->revision = sdp->sdp_header.HB2;
as_sdp->mode = sdp->db[0] & DP_AS_SDP_OPERATION_MODE_MASK;
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 15/26] drm/i915/dp: Include all relevant AS SDP fields in comparison
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (13 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 14/26] drm/i915/dp: Set sdp_type in AS SDP unpack Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 16/26] drm/i915/psr: Add helper to get Async Video timing support in PR active Ankit Nautiyal
` (11 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Add missing drm_dp_as_sdp header fields to intel_compare_dp_as_sdp()
comparison.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 57870baebfa5..a0e7ef2574b2 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4906,11 +4906,14 @@ static bool
intel_compare_dp_as_sdp(const struct drm_dp_as_sdp *a,
const struct drm_dp_as_sdp *b)
{
- return a->revision == b->revision &&
+ return a->sdp_type == b->sdp_type &&
+ a->revision == b->revision &&
+ a->length == b->length &&
a->vtotal == b->vtotal &&
a->target_rr == b->target_rr &&
a->duration_incr_ms == b->duration_incr_ms &&
a->duration_decr_ms == b->duration_decr_ms &&
+ a->target_rr_divider == b->target_rr_divider &&
a->mode == b->mode;
}
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 16/26] drm/i915/psr: Add helper to get Async Video timing support in PR active
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (14 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 15/26] drm/i915/dp: Include all relevant AS SDP fields in comparison Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 17/26] drm/i915/dp: Add member to intel_dp to store AS SDP v2 support Ankit Nautiyal
` (10 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Introduce a helper to check if Panel Replay has Async Video Timing support
during PR Active state.
v2: Confirm that Panel Replay is supported before checking for
Async Video Timing Support during PR active. (Ville)
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
drivers/gpu/drm/i915/display/intel_psr.c | 11 +++++++++++
drivers/gpu/drm/i915/display/intel_psr.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index a927b73c3f6e..257bfaed2e10 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -4652,3 +4652,14 @@ bool intel_psr_use_trans_push(const struct intel_crtc_state *crtc_state)
return HAS_PSR_TRANS_PUSH_FRAME_CHANGE(display) && crtc_state->has_psr;
}
+
+bool intel_psr_pr_async_video_timing_supported(struct intel_dp *intel_dp)
+{
+ struct intel_connector *connector = intel_dp->attached_connector;
+ u8 *dpcd = connector->dp.panel_replay_caps.dpcd;
+ u8 pr_support = dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_SUPPORT)];
+ u8 pr_cap = dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)];
+
+ return (pr_support & DP_PANEL_REPLAY_SUPPORT) &&
+ !(pr_cap & DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR);
+}
diff --git a/drivers/gpu/drm/i915/display/intel_psr.h b/drivers/gpu/drm/i915/display/intel_psr.h
index 394b641840b3..29723e63888f 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.h
+++ b/drivers/gpu/drm/i915/display/intel_psr.h
@@ -86,5 +86,6 @@ void intel_psr_compute_config_late(struct intel_dp *intel_dp,
struct intel_crtc_state *crtc_state);
int intel_psr_min_guardband(struct intel_crtc_state *crtc_state);
bool intel_psr_use_trans_push(const struct intel_crtc_state *crtc_state);
+bool intel_psr_pr_async_video_timing_supported(struct intel_dp *intel_dp);
#endif /* __INTEL_PSR_H__ */
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/i915/psr: Add helper to get Async Video timing support in PR active
2026-04-08 8:42 ` [PATCH 16/26] drm/i915/psr: Add helper to get Async Video timing support in PR active Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Introduces `intel_psr_pr_async_video_timing_supported()`. The function reads DPCD through the connector's panel replay capabilities cache:
```c
u8 *dpcd = connector->dp.panel_replay_caps.dpcd;
u8 pr_support = dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_SUPPORT)];
u8 pr_cap = dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)];
```
The logic checks that Panel Replay is supported AND that async video timing is NOT unsupported (double negative from the spec bit name `DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR`).
Missing R-b.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH 17/26] drm/i915/dp: Add member to intel_dp to store AS SDP v2 support
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (15 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 16/26] drm/i915/psr: Add helper to get Async Video timing support in PR active Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 18/26] drm/i915/dp: Allow AS SDP only if v2 is supported Ankit Nautiyal
` (9 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
eDP v1.5a advertises support for Adaptive Sync SDP and with that the
support for AS SDP v2 is mandatory.
DP v2.1 SCR advertises support for FAVT payload fields parsing in DPCD
0x2214 Bit 2. This indicates the support for Adaptive-Sync SDP version 2
(AS SDP v2), which allows the source to set the version in HB2[4:0] and the
payload length in HB3[5:0] of the AS SDP header.
DP v2.1 SCR also introduces ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR in the
Panel Replay Capability DPCD 0x00b1 (Bit 3). When this bit is set, the sink
does not support asynchronous video timing while in a Panel Replay Active
state and the source is required to keep transmitting Adaptive-Sync
SDPs. The spec mandates that such sinks shall support AS SDP v2.
Infer AS SDP v2 support from these capabilities and store it in
struct intel_dp for use by subsequent feature enablement changes.
v2:
- Include parsing ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR bit to
determine AS SDP v2 support. (Ville)
v3:
- Use helper to determine asynch video timing support.
v4:
- Add AS SDP v2 support for eDP as per v1.5a.
- Add a check for Panel Replay support before checking for Async video
timing support in PR
- Add a TODO for Display ID and PCON considerations. (Ville)
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
.../drm/i915/display/intel_display_types.h | 1 +
drivers/gpu/drm/i915/display/intel_dp.c | 49 +++++++++++++++++++
2 files changed, 50 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index e2496db1642a..efc609eef4f5 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1870,6 +1870,7 @@ struct intel_dp {
/* connector directly attached - won't be use for modeset in mst world */
struct intel_connector *attached_connector;
bool as_sdp_supported;
+ bool as_sdp_v2_supported;
struct drm_dp_tunnel *tunnel;
bool tunnel_suspended:1;
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index bca5dc2c3b30..aa035cb2fcc5 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -6307,6 +6307,46 @@ intel_dp_unset_edid(struct intel_dp *intel_dp)
false);
}
+static bool
+intel_dp_sink_supports_as_sdp_v2(struct intel_dp *intel_dp)
+{
+ u8 rx_features;
+
+ /*
+ * The DP spec does not explicitly provide the AS SDP v2 capability.
+ * So based on the DP v2.1 SCR, we infer it from the following bits:
+ *
+ * DP_AS_SDP_FAVT_PAYLOAD_FIELDS_PARSING_SUPPORTED indicates support for
+ * FAVT, which is explicitly defined to use AS SDP v2.
+ *
+ * DP_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR indicates that the sink
+ * does not support asynchronous video timing while in PR Active,
+ * requiring the source to keep transmitting Adaptive-Sync SDPs. The
+ * spec mandates that such sinks shall support AS SDP v2.
+ *
+ * #TODO: Check the Adaptive-Sync DisplayID 2.1 block once DisplayID
+ * parsing is available. This may help detect AS SDP v2 support for
+ * native DP 2.1 sinks that do not expose FAVT or PR-based capability
+ * bits.
+ *
+ * In the presence of PCONs, check PCON support from DPCD and sink
+ * support from Display ID.
+ */
+
+ if (drm_dp_dpcd_read_byte(&intel_dp->aux,
+ DP_DPRX_FEATURE_ENUMERATION_LIST_CONT_1,
+ &rx_features) == 1) {
+ if (rx_features & DP_AS_SDP_FAVT_PAYLOAD_FIELDS_PARSING_SUPPORTED)
+ return true;
+ }
+
+ if (intel_dp->psr.sink_panel_replay_support &&
+ !intel_psr_pr_async_video_timing_supported(intel_dp))
+ return true;
+
+ return false;
+}
+
static void
intel_dp_detect_sdp_caps(struct intel_dp *intel_dp)
{
@@ -6314,6 +6354,15 @@ intel_dp_detect_sdp_caps(struct intel_dp *intel_dp)
intel_dp->as_sdp_supported = HAS_AS_SDP(display) &&
drm_dp_as_sdp_supported(&intel_dp->aux, intel_dp->dpcd);
+
+ if (!intel_dp->as_sdp_supported)
+ return;
+
+ /* eDP Adaptive-Sync SDP always uses AS SDP v2 */
+ if (intel_dp_is_edp(intel_dp))
+ intel_dp->as_sdp_v2_supported = true;
+ else
+ intel_dp->as_sdp_v2_supported = intel_dp_sink_supports_as_sdp_v2(intel_dp);
}
static bool intel_dp_needs_dpcd_probe(struct intel_dp *intel_dp, bool force_on_external)
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 18/26] drm/i915/dp: Allow AS SDP only if v2 is supported
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (16 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 17/26] drm/i915/dp: Add member to intel_dp to store AS SDP v2 support Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 19/26] drm/i915/psr: Write the PR config DPCDs in burst mode Ankit Nautiyal
` (8 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
We do not support AS SDP version 1, so allow AS SDP only if AS SDP v2 is
supported.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index aa035cb2fcc5..e280b4eea03f 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3127,7 +3127,7 @@ static void intel_dp_compute_vsc_colorimetry(const struct intel_crtc_state *crtc
static bool intel_dp_needs_as_sdp(struct intel_dp *intel_dp,
struct intel_crtc_state *crtc_state)
{
- if (!intel_dp->as_sdp_supported)
+ if (!intel_dp->as_sdp_v2_supported)
return false;
/*
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 19/26] drm/i915/psr: Write the PR config DPCDs in burst mode
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (17 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 18/26] drm/i915/dp: Allow AS SDP only if v2 is supported Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 20/26] drm/i915/display: Add helper for AS SDP transmission time selection Ankit Nautiyal
` (7 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Replace the consecutive single-byte writes to PANEL_REPLAY_CONFIG and
CONFIG2 with one drm_dp_dpcd_write() burst starting at PANEL_REPLAY_CONFIG,
reducing AUX transactions.
v2: Drop extra conditions, and optimize variables. (Ville)
v3: Drop the error check after write. (Ville)
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_psr.c | 26 ++++++++++++------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 257bfaed2e10..e011c15ef7d8 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -783,27 +783,27 @@ static bool psr2_su_region_et_valid(struct intel_connector *connector, bool pane
static void _panel_replay_enable_sink(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state)
{
- u8 val = DP_PANEL_REPLAY_ENABLE |
- DP_PANEL_REPLAY_VSC_SDP_CRC_EN |
- DP_PANEL_REPLAY_UNRECOVERABLE_ERROR_EN |
- DP_PANEL_REPLAY_RFB_STORAGE_ERROR_EN |
- DP_PANEL_REPLAY_ACTIVE_FRAME_CRC_ERROR_EN;
- u8 panel_replay_config2 = DP_PANEL_REPLAY_CRC_VERIFICATION;
+ u8 panel_replay_config[2];
+
+ panel_replay_config[0] = DP_PANEL_REPLAY_ENABLE |
+ DP_PANEL_REPLAY_VSC_SDP_CRC_EN |
+ DP_PANEL_REPLAY_UNRECOVERABLE_ERROR_EN |
+ DP_PANEL_REPLAY_RFB_STORAGE_ERROR_EN |
+ DP_PANEL_REPLAY_ACTIVE_FRAME_CRC_ERROR_EN;
+ panel_replay_config[1] = DP_PANEL_REPLAY_CRC_VERIFICATION;
if (crtc_state->has_sel_update)
- val |= DP_PANEL_REPLAY_SU_ENABLE;
+ panel_replay_config[0] |= DP_PANEL_REPLAY_SU_ENABLE;
if (crtc_state->enable_psr2_su_region_et)
- val |= DP_PANEL_REPLAY_ENABLE_SU_REGION_ET;
+ panel_replay_config[0] |= DP_PANEL_REPLAY_ENABLE_SU_REGION_ET;
if (crtc_state->req_psr2_sdp_prior_scanline)
- panel_replay_config2 |=
+ panel_replay_config[1] |=
DP_PANEL_REPLAY_SU_REGION_SCANLINE_CAPTURE;
- drm_dp_dpcd_writeb(&intel_dp->aux, PANEL_REPLAY_CONFIG, val);
-
- drm_dp_dpcd_writeb(&intel_dp->aux, PANEL_REPLAY_CONFIG2,
- panel_replay_config2);
+ drm_dp_dpcd_write(&intel_dp->aux, PANEL_REPLAY_CONFIG,
+ panel_replay_config, sizeof(panel_replay_config));
}
static void _psr_enable_sink(struct intel_dp *intel_dp,
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 20/26] drm/i915/display: Add helper for AS SDP transmission time selection
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (18 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 19/26] drm/i915/psr: Write the PR config DPCDs in burst mode Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 21/26] drm/i915/psr: Program Panel Replay CONFIG3 using AS SDP transmission time Ankit Nautiyal
` (6 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
AS SDP may be transmitted at T1 or T2 depending on Panel Replay and
Adaptive Sync SDP configuration as per DP 2.1. Current we are using
T1 only, but future PR/AS SDP modes/features may require T2 or dynamic
selection.
Introduce a helper to return the appropriate AS SDP transmission time so
that a single value is consistently used for programming PR_ALPM.
For now this returns T1.
v2: Avoid adding new member to crtc_state; use a helper. (Ville)
v3: Clarify why AS SDP transmission time is fixed to T1. (Ville)
v4: Return u8 from intel_dp_as_sdp_transmission_time(). (Ville)
Bspec: 68920
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_alpm.c | 20 +++++++++++++++++++-
drivers/gpu/drm/i915/display/intel_dp.c | 11 +++++++++++
drivers/gpu/drm/i915/display/intel_dp.h | 2 ++
3 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index a7350ce8e716..c6963ea420cc 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -11,6 +11,7 @@
#include "intel_crtc.h"
#include "intel_de.h"
#include "intel_display_types.h"
+#include "intel_display_utils.h"
#include "intel_dp.h"
#include "intel_dp_aux.h"
#include "intel_psr.h"
@@ -359,6 +360,23 @@ void intel_alpm_lobf_compute_config(struct intel_dp *intel_dp,
crtc_state->has_lobf = true;
}
+static u32 get_pr_alpm_as_sdp_transmission_time(const struct intel_crtc_state *crtc_state)
+{
+ u8 as_sdp_setup_time = intel_dp_as_sdp_transmission_time();
+
+ switch (as_sdp_setup_time) {
+ case DP_PR_AS_SDP_SETUP_TIME_T1:
+ return PR_ALPM_CTL_ADAPTIVE_SYNC_SDP_POSITION_T1;
+ case DP_PR_AS_SDP_SETUP_TIME_DYNAMIC:
+ return PR_ALPM_CTL_ADAPTIVE_SYNC_SDP_POSITION_T1_OR_T2;
+ case DP_PR_AS_SDP_SETUP_TIME_T2:
+ return PR_ALPM_CTL_ADAPTIVE_SYNC_SDP_POSITION_T2;
+ default:
+ MISSING_CASE(as_sdp_setup_time);
+ return PR_ALPM_CTL_ADAPTIVE_SYNC_SDP_POSITION_T1;
+ }
+}
+
static void lnl_alpm_configure(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state)
{
@@ -382,7 +400,7 @@ static void lnl_alpm_configure(struct intel_dp *intel_dp,
ALPM_CTL_AUX_LESS_WAKE_TIME(crtc_state->alpm_state.aux_less_wake_lines);
if (intel_dp->as_sdp_supported) {
- u32 pr_alpm_ctl = PR_ALPM_CTL_ADAPTIVE_SYNC_SDP_POSITION_T1;
+ u32 pr_alpm_ctl = get_pr_alpm_as_sdp_transmission_time(crtc_state);
if (crtc_state->link_off_after_as_sdp_when_pr_active)
pr_alpm_ctl |= PR_ALPM_CTL_ALLOW_LINK_OFF_BETWEEN_AS_SDP_AND_SU;
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index e280b4eea03f..1e56de9c3ce3 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -7483,3 +7483,14 @@ bool intel_dp_joiner_candidate_valid(struct intel_connector *connector,
return true;
}
+
+u8 intel_dp_as_sdp_transmission_time(void)
+{
+ /*
+ * DP allows AS SDP position to move during PR active in some cases, but
+ * software-controlled refresh rate changes with DC6v / ALPM require the
+ * AS SDP to remain at T1. Use T1 unconditionally for now.
+ */
+
+ return DP_PR_AS_SDP_SETUP_TIME_T1;
+}
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
index 2849b9ecdc71..66e7a89bcb64 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -238,4 +238,6 @@ bool intel_dp_joiner_candidate_valid(struct intel_connector *connector,
for ((__num_joined_pipes) = 1; (__num_joined_pipes) <= (I915_MAX_PIPES); (__num_joined_pipes)++) \
for_each_if(intel_dp_joiner_candidate_valid(__connector, (__mode)->hdisplay, __num_joined_pipes))
+u8 intel_dp_as_sdp_transmission_time(void);
+
#endif /* __INTEL_DP_H__ */
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/i915/display: Add helper for AS SDP transmission time selection
2026-04-08 8:42 ` [PATCH 20/26] drm/i915/display: Add helper for AS SDP transmission time selection Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**R-b: Ville Syrjala**
Adds `intel_dp_as_sdp_transmission_time()` which currently returns `DP_PR_AS_SDP_SETUP_TIME_T1` unconditionally, and `get_pr_alpm_as_sdp_transmission_time()` which maps this to the HW register field.
The `intel_dp_as_sdp_transmission_time()` function takes no parameters and always returns T1. The code is structured for future expansion but currently trivial. The `crtc_state` parameter in `get_pr_alpm_as_sdp_transmission_time()` is unused -- it's presumably kept for future use.
No functional issues.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH 21/26] drm/i915/psr: Program Panel Replay CONFIG3 using AS SDP transmission time
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (19 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 20/26] drm/i915/display: Add helper for AS SDP transmission time selection Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 22/26] drm/i915/dp: Set relevant Downspread Ctrl DPCD bits for PR + Auxless ALPM Ankit Nautiyal
` (5 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Panel Replay requires the AS SDP transmission time to be written into
PANEL_REPLAY_CONFIG3. This field was previously not programmed.
Use the AS SDP transmission-time helper to populate CONFIG3.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_psr.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index e011c15ef7d8..b20a1df330ed 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -784,6 +784,7 @@ static void _panel_replay_enable_sink(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state)
{
u8 panel_replay_config[2];
+ u8 panel_replay_config_3;
panel_replay_config[0] = DP_PANEL_REPLAY_ENABLE |
DP_PANEL_REPLAY_VSC_SDP_CRC_EN |
@@ -791,7 +792,6 @@ static void _panel_replay_enable_sink(struct intel_dp *intel_dp,
DP_PANEL_REPLAY_RFB_STORAGE_ERROR_EN |
DP_PANEL_REPLAY_ACTIVE_FRAME_CRC_ERROR_EN;
panel_replay_config[1] = DP_PANEL_REPLAY_CRC_VERIFICATION;
-
if (crtc_state->has_sel_update)
panel_replay_config[0] |= DP_PANEL_REPLAY_SU_ENABLE;
@@ -804,6 +804,9 @@ static void _panel_replay_enable_sink(struct intel_dp *intel_dp,
drm_dp_dpcd_write(&intel_dp->aux, PANEL_REPLAY_CONFIG,
panel_replay_config, sizeof(panel_replay_config));
+
+ panel_replay_config_3 = intel_dp_as_sdp_transmission_time();
+ drm_dp_dpcd_writeb(&intel_dp->aux, PANEL_REPLAY_CONFIG3, panel_replay_config_3);
}
static void _psr_enable_sink(struct intel_dp *intel_dp,
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/i915/psr: Program Panel Replay CONFIG3 using AS SDP transmission time
2026-04-08 8:42 ` [PATCH 21/26] drm/i915/psr: Program Panel Replay CONFIG3 using AS SDP transmission time Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**R-b: Ville Syrjala**
Writes `intel_dp_as_sdp_transmission_time()` to `PANEL_REPLAY_CONFIG3` DPCD.
Note that patch 19 converted CONFIG/CONFIG2 to burst mode, but this adds CONFIG3 as a separate `drm_dp_dpcd_writeb()`. It could have been included in the burst (CONFIG through CONFIG3 are 0x118-0x11a), though CONFIG3 is at a different offset conceptually (and might not always be written). Also, there's a deleted blank line between `panel_replay_config[1]` assignment and the `if (crtc_state->has_sel_update)` block -- this makes the code slightly less readable.
Minor issues only.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH 22/26] drm/i915/dp: Set relevant Downspread Ctrl DPCD bits for PR + Auxless ALPM
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (20 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 21/26] drm/i915/psr: Program Panel Replay CONFIG3 using AS SDP transmission time Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 23/26] drm/i915/dp: Program AS SDP DB[1:0] for PR with Link off Ankit Nautiyal
` (4 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
If a Panel Replay capable sink, supports Async Video timing in
PR active state, then source does not necessarily need to send AS SDPs
during PR active.
However, if asynchronous video timing is not supported, then for PR with
Aux-less ALPM, the source must transmit Adaptive-Sync SDPs for video
timing synchronization while PR is active.
If the source needs to send AS SDP during PR active, this requires setting
DPCD 0x0107[6] (FIXED_VTOTAL_AS_SDP_EN_IN_PR_ACTIVE). This applies whether
VRR is enabled (AVT/FAVT) or fixed-timing mode is used.
This bit defines AS SDP timing behavior during PR Active, even if AS SDPs
are briefly suspended.
Program the relevant Downspread Ctrl DPCD bits accordingly.
v2: Instead of Panel Replay check simply use AS SDP enable check. (Ville)
v3: Since the bit is defined in context of Panel Replay and AS SDP, add
a check for both. (Ville)
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
.../gpu/drm/i915/display/intel_dp_link_training.c | 15 +++++++++++++--
.../gpu/drm/i915/display/intel_dp_link_training.h | 3 ++-
drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +-
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
index a26094223f78..d0b033d2cfb4 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
@@ -34,8 +34,10 @@
#include "intel_dp.h"
#include "intel_dp_link_training.h"
#include "intel_encoder.h"
+#include "intel_hdmi.h"
#include "intel_hotplug.h"
#include "intel_panel.h"
+#include "intel_psr.h"
#define LT_MSG_PREFIX "[CONNECTOR:%d:%s][ENCODER:%d:%s][%s] "
#define LT_MSG_ARGS(_intel_dp, _dp_phy) (_intel_dp)->attached_connector->base.base.id, \
@@ -710,11 +712,14 @@ static bool intel_dp_link_max_vswing_reached(struct intel_dp *intel_dp,
return true;
}
-void intel_dp_link_training_set_mode(struct intel_dp *intel_dp, int link_rate, bool is_vrr)
+void intel_dp_link_training_set_mode(struct intel_dp *intel_dp, int link_rate,
+ bool is_vrr,
+ bool pr_with_as_sdp_enable)
{
u8 link_config[2];
link_config[0] = is_vrr ? DP_MSA_TIMING_PAR_IGNORE_EN : 0;
+ link_config[0] |= pr_with_as_sdp_enable ? DP_FIXED_VTOTAL_AS_SDP_EN_IN_PR_ACTIVE : 0;
link_config[1] = drm_dp_is_uhbr_rate(link_rate) ?
DP_SET_ANSI_128B132B : DP_SET_ANSI_8B10B;
drm_dp_dpcd_write(&intel_dp->aux, DP_DOWNSPREAD_CTRL, link_config, 2);
@@ -723,6 +728,10 @@ void intel_dp_link_training_set_mode(struct intel_dp *intel_dp, int link_rate, b
static void intel_dp_update_downspread_ctrl(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state)
{
+ bool pr_with_as_sdp_enable =
+ intel_psr_needs_alpm_aux_less(intel_dp, crtc_state) &&
+ crtc_state->infoframes.enable & intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC);
+
/*
* Currently, we set the MSA ignore bit based on vrr.in_range.
* We can't really read that out during driver load since we don't have
@@ -737,7 +746,9 @@ static void intel_dp_update_downspread_ctrl(struct intel_dp *intel_dp,
* especially on the first real commit when clearing the inherited flag.
*/
intel_dp_link_training_set_mode(intel_dp,
- crtc_state->port_clock, crtc_state->vrr.in_range);
+ crtc_state->port_clock,
+ crtc_state->vrr.in_range,
+ pr_with_as_sdp_enable);
}
void intel_dp_link_training_set_bw(struct intel_dp *intel_dp,
diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.h b/drivers/gpu/drm/i915/display/intel_dp_link_training.h
index 33dcbde6a408..18c34c1a472f 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_link_training.h
+++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.h
@@ -18,7 +18,8 @@ int intel_dp_init_lttpr_and_dprx_caps(struct intel_dp *intel_dp);
bool intel_dp_lttpr_transparent_mode_enabled(struct intel_dp *intel_dp);
void intel_dp_link_training_set_mode(struct intel_dp *intel_dp,
- int link_rate, bool is_vrr);
+ int link_rate, bool is_vrr,
+ bool pr_with_as_sdp_enable);
void intel_dp_link_training_set_bw(struct intel_dp *intel_dp,
int link_bw, int rate_select, int lane_count,
bool enhanced_framing, bool post_lt_adj_req);
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index e8de17834dcd..ffd1cf0aad9a 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -2142,7 +2142,7 @@ void intel_dp_mst_prepare_probe(struct intel_dp *intel_dp)
intel_dp_compute_rate(intel_dp, link_rate, &link_bw, &rate_select);
- intel_dp_link_training_set_mode(intel_dp, link_rate, false);
+ intel_dp_link_training_set_mode(intel_dp, link_rate, false, false);
intel_dp_link_training_set_bw(intel_dp, link_bw, rate_select, lane_count,
drm_dp_enhanced_frame_cap(intel_dp->dpcd), false);
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/i915/dp: Set relevant Downspread Ctrl DPCD bits for PR + Auxless ALPM
2026-04-08 8:42 ` [PATCH 22/26] drm/i915/dp: Set relevant Downspread Ctrl DPCD bits for PR + Auxless ALPM Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Extends `intel_dp_link_training_set_mode()` with a `pr_with_as_sdp_enable` parameter to set `DP_FIXED_VTOTAL_AS_SDP_EN_IN_PR_ACTIVE` in DPCD 0x107. Updates all callers.
The condition in `intel_dp_update_downspread_ctrl()`:
```c
bool pr_with_as_sdp_enable =
intel_psr_needs_alpm_aux_less(intel_dp, crtc_state) &&
crtc_state->infoframes.enable & intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC);
```
Missing parentheses around the `&` expression could be confusing since `&` has lower precedence than `&&`. While it evaluates correctly due to the left-to-right evaluation and the bitwise result being implicitly converted to bool, adding explicit parentheses would improve readability:
```c
(crtc_state->infoframes.enable & intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC))
```
Missing R-b.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH 23/26] drm/i915/dp: Program AS SDP DB[1:0] for PR with Link off
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (21 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 22/26] drm/i915/dp: Set relevant Downspread Ctrl DPCD bits for PR + Auxless ALPM Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 24/26] drm/i915/dp: Split AS SDP computation between compute_config and compute_config_late Ankit Nautiyal
` (3 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
For Panel Replay with AUX-less ALPM (link-off PR), the source must send
Adaptive-Sync SDP v2. Program DB[1:0] per DP spec v2.1:
- VRR AVT: 00b (variable VTotal)
- VRR FAVT: 10b/11b (TRR not reached/reached)
- Fixed timing with PR link-off (VRR off): 01b (AS disabled; VTotal fixed)
Also, drop the redundant target_rr assignment.
v2: Fix the else case. (Ville)
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 1e56de9c3ce3..754aa3f6427e 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3166,9 +3166,10 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
as_sdp->mode = DP_AS_SDP_FAVT_TRR_REACHED;
as_sdp->target_rr = drm_mode_vrefresh(adjusted_mode);
as_sdp->target_rr_divider = true;
- } else {
+ } else if (crtc_state->vrr.enable) {
as_sdp->mode = DP_AS_SDP_AVT_DYNAMIC_VTOTAL;
- as_sdp->target_rr = 0;
+ } else {
+ as_sdp->mode = DP_AS_SDP_AVT_FIXED_VTOTAL;
}
}
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH 24/26] drm/i915/dp: Split AS SDP computation between compute_config and compute_config_late
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (22 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 23/26] drm/i915/dp: Program AS SDP DB[1:0] for PR with Link off Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 25/26] drm/i915/dp: Compute and include coasting vtotal for AS SDP Ankit Nautiyal
` (2 subsequent siblings)
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Currently we enable AS SDP only when VRR is enabled. As we start using
AS SDP for other features, this becomes a problem. The AS SDP
configuration can change dynamically based on VRR, CMRR, PR, ALPM, etc.
Since these features may be enabled or disabled after the initial
configuration, the AS SDP parameters need to be computed later in the
pipeline.
However, not all of the AS SDP logic can be moved to the late stage:
the VRR guardband optimization depends on knowing early whether AS SDP
can be used. Without this, we would end up accounting for AS SDP on all
platforms that support it, even for panels that do not support AS SDP.
Therefore we set the infoframe enable bit for AS SDP during
compute_config(), before the guardband is computed.
To handle these constraints, split the AS SDP programming into two
phases:
- intel_dp_compute_as_sdp()
Runs during compute_config().
Sets only the infoframe enable bit so that the guardband logic can
account for AS SDP requirements.
- intel_dp_as_sdp_compute_config_late()
Runs during compute_config_late().
Computes all remaining AS SDP fields based on the features that need
it.
The late-stage computation is called from
intel_dp_sdp_compute_config_late(), before computing the minimum guardband
for SDPs.
This is a preparatory change. A subsequent patches will compute PR related
AS SDP fields and enable AS SDP not only for VRR but for other features
as well.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 66 ++++++++++++++++---------
1 file changed, 43 insertions(+), 23 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 754aa3f6427e..52d3221c05a4 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3142,10 +3142,6 @@ static bool intel_dp_needs_as_sdp(struct intel_dp *intel_dp,
static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
struct intel_crtc_state *crtc_state)
{
- struct drm_dp_as_sdp *as_sdp = &crtc_state->infoframes.as_sdp;
- const struct drm_display_mode *adjusted_mode =
- &crtc_state->hw.adjusted_mode;
-
/*
* #FIXME: SDP/infoframe updates aren’t truly atomic, and with the new
* cdclk->tc clock crossing we may transiently send a corrupted packet
@@ -3154,23 +3150,13 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
if (!intel_dp_needs_as_sdp(intel_dp, crtc_state))
return;
+ /*
+ * Only set the infoframes.enable flag here. The remaining AS SDP fields
+ * are programmed in the compute_config_late() phase. We need this flag
+ * early so that the VRR guardband calculation can properly account for
+ * AS SDP requirements.
+ */
crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC);
-
- as_sdp->sdp_type = DP_SDP_ADAPTIVE_SYNC;
- as_sdp->length = 0x9;
- as_sdp->duration_incr_ms = 0;
- as_sdp->revision = 0x2;
- as_sdp->vtotal = intel_vrr_vmin_vtotal(crtc_state);
-
- if (crtc_state->cmrr.enable) {
- as_sdp->mode = DP_AS_SDP_FAVT_TRR_REACHED;
- as_sdp->target_rr = drm_mode_vrefresh(adjusted_mode);
- as_sdp->target_rr_divider = true;
- } else if (crtc_state->vrr.enable) {
- as_sdp->mode = DP_AS_SDP_AVT_DYNAMIC_VTOTAL;
- } else {
- as_sdp->mode = DP_AS_SDP_AVT_FIXED_VTOTAL;
- }
}
static void intel_dp_compute_vsc_sdp(struct intel_dp *intel_dp,
@@ -7388,11 +7374,45 @@ void intel_dp_mst_resume(struct intel_display *display)
}
static
-int intel_dp_sdp_compute_config_late(struct intel_crtc_state *crtc_state)
+void intel_dp_as_sdp_compute_config_late(struct intel_dp *intel_dp,
+ struct intel_crtc_state *crtc_state)
+{
+ struct drm_dp_as_sdp *as_sdp = &crtc_state->infoframes.as_sdp;
+ const struct drm_display_mode *adjusted_mode =
+ &crtc_state->hw.adjusted_mode;
+
+ if ((crtc_state->infoframes.enable &
+ intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC)) == 0)
+ return;
+
+ as_sdp->sdp_type = DP_SDP_ADAPTIVE_SYNC;
+ as_sdp->length = 0x9;
+ as_sdp->duration_incr_ms = 0;
+ as_sdp->revision = 0x2;
+ as_sdp->vtotal = intel_vrr_vmin_vtotal(crtc_state);
+
+ if (crtc_state->cmrr.enable) {
+ as_sdp->mode = DP_AS_SDP_FAVT_TRR_REACHED;
+ as_sdp->target_rr = drm_mode_vrefresh(adjusted_mode);
+ as_sdp->target_rr_divider = true;
+ } else if (crtc_state->vrr.enable) {
+ as_sdp->mode = DP_AS_SDP_AVT_DYNAMIC_VTOTAL;
+ } else {
+ as_sdp->mode = DP_AS_SDP_AVT_FIXED_VTOTAL;
+ }
+}
+
+static
+int intel_dp_sdp_compute_config_late(struct intel_dp *intel_dp,
+ struct intel_crtc_state *crtc_state)
{
struct intel_display *display = to_intel_display(crtc_state);
int guardband = intel_crtc_vblank_length(crtc_state);
- int min_sdp_guardband = intel_dp_sdp_min_guardband(crtc_state, false);
+ int min_sdp_guardband;
+
+ intel_dp_as_sdp_compute_config_late(intel_dp, crtc_state);
+
+ min_sdp_guardband = intel_dp_sdp_min_guardband(crtc_state, false);
if (guardband < min_sdp_guardband) {
drm_dbg_kms(display->drm, "guardband %d < min sdp guardband %d\n",
@@ -7412,7 +7432,7 @@ int intel_dp_compute_config_late(struct intel_encoder *encoder,
intel_psr_compute_config_late(intel_dp, crtc_state);
- ret = intel_dp_sdp_compute_config_late(crtc_state);
+ ret = intel_dp_sdp_compute_config_late(intel_dp, crtc_state);
if (ret)
return ret;
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/i915/dp: Split AS SDP computation between compute_config and compute_config_late
2026-04-08 8:42 ` [PATCH 24/26] drm/i915/dp: Split AS SDP computation between compute_config and compute_config_late Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
This is the key architectural patch. The AS SDP computation is split:
- Early (`intel_dp_compute_as_sdp()`): only sets the `infoframes.enable` bit
- Late (`intel_dp_as_sdp_compute_config_late()`): fills in all actual AS SDP fields
This is needed because the guardband calculation (which runs between these phases) needs to know whether AS SDP is enabled, but the AS SDP fields themselves depend on feature decisions made later.
The function `intel_dp_sdp_compute_config_late()` now takes `intel_dp` as a parameter to pass through to `intel_dp_as_sdp_compute_config_late()`.
Sound design. Missing R-b.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH 25/26] drm/i915/dp: Compute and include coasting vtotal for AS SDP
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (23 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 24/26] drm/i915/dp: Split AS SDP computation between compute_config and compute_config_late Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-08 8:42 ` [PATCH 26/26] drm/i915/dp: Always enable AS SDP if supported by source + sink Ankit Nautiyal
2026-04-12 2:51 ` Claude review: Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Claude Code Review Bot
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
DP v2.1 allows the source to temporarily suspend Adaptive-Sync SDP
transmission while Panel Replay is active when the sink supports
asynchronous video timing.
In such cases, the sink relies on the last transmitted AS SDP timing
information to maintain the refresh rate. To support this behavior,
compute and populate the coasting vtotal field in the AS SDP payload.
Include coasting vtotal in AS SDP packing, unpacking, and comparison,
and set it during late AS SDP configuration for PR with Aux-less ALPM
when asynchronous video timing is supported.
Note:
The coasting vtotal value is fully under driver control i.e. the HW does
not overwrite these payload bytes. HW only samples the PR_ALPM_CTL[AS SDP
Transmission in Active Disable] bit during PR active state and reflects it
in the AS SDP payload at the appropriate time.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 3 ++-
drivers/gpu/drm/i915/display/intel_dp.c | 19 +++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index a0e7ef2574b2..747dd3112d66 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4914,7 +4914,8 @@ intel_compare_dp_as_sdp(const struct drm_dp_as_sdp *a,
a->duration_incr_ms == b->duration_incr_ms &&
a->duration_decr_ms == b->duration_decr_ms &&
a->target_rr_divider == b->target_rr_divider &&
- a->mode == b->mode;
+ a->mode == b->mode &&
+ a->coasting_vtotal == b->coasting_vtotal;
}
static bool
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 52d3221c05a4..6e6d46cf62de 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5123,6 +5123,9 @@ static ssize_t intel_dp_as_sdp_pack(const struct drm_dp_as_sdp *as_sdp,
if (as_sdp->target_rr_divider)
sdp->db[4] |= 0x20;
+ sdp->db[7] = as_sdp->coasting_vtotal & 0xFF;
+ sdp->db[8] = (as_sdp->coasting_vtotal >> 8) & 0xFF;
+
return length;
}
@@ -5307,6 +5310,7 @@ int intel_dp_as_sdp_unpack(struct drm_dp_as_sdp *as_sdp,
as_sdp->vtotal = (sdp->db[2] << 8) | sdp->db[1];
as_sdp->target_rr = ((sdp->db[4] & 0x3) << 8) | sdp->db[3];
as_sdp->target_rr_divider = sdp->db[4] & 0x20 ? true : false;
+ as_sdp->coasting_vtotal = (sdp->db[8] << 8) | sdp->db[7];
return 0;
}
@@ -7400,6 +7404,21 @@ void intel_dp_as_sdp_compute_config_late(struct intel_dp *intel_dp,
} else {
as_sdp->mode = DP_AS_SDP_AVT_FIXED_VTOTAL;
}
+
+ /*
+ * For Panel Replay with Async Video Timing support, the source can
+ * disable sending the AS SDP during PR Active state. In that case,
+ * the sink needs the coasting vtotal value to maintain the refresh
+ * rate.
+ *
+ * #TODO:
+ * If we ever advertise support for coasting at other refresh targets,
+ * this logic could be revisited. For now, use the minimum refresh rate
+ * as the only safe coasting value.
+ */
+ if (intel_alpm_is_alpm_aux_less(intel_dp, crtc_state) &&
+ intel_psr_pr_async_video_timing_supported(intel_dp))
+ as_sdp->coasting_vtotal = crtc_state->vrr.vmax;
}
static
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/i915/dp: Compute and include coasting vtotal for AS SDP
2026-04-08 8:42 ` [PATCH 25/26] drm/i915/dp: Compute and include coasting vtotal for AS SDP Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**R-b: Ville Syrjala**
Adds coasting vtotal to the AS SDP pack, unpack, and comparison. Sets it during late compute for PR with Aux-less ALPM when async video timing is supported:
```c
if (intel_alpm_is_alpm_aux_less(intel_dp, crtc_state) &&
intel_psr_pr_async_video_timing_supported(intel_dp))
as_sdp->coasting_vtotal = crtc_state->vrr.vmax;
```
Using `vrr.vmax` as the coasting vtotal (minimum refresh rate) is the safe default.
No issues.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH 26/26] drm/i915/dp: Always enable AS SDP if supported by source + sink
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (24 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 25/26] drm/i915/dp: Compute and include coasting vtotal for AS SDP Ankit Nautiyal
@ 2026-04-08 8:42 ` Ankit Nautiyal
2026-04-12 2:51 ` Claude review: " Claude Code Review Bot
2026-04-12 2:51 ` Claude review: Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Claude Code Review Bot
26 siblings, 1 reply; 54+ messages in thread
From: Ankit Nautiyal @ 2026-04-08 8:42 UTC (permalink / raw)
To: intel-gfx, intel-xe, dri-devel
Cc: ville.syrjala, jouni.hogander, animesh.manna, Ankit Nautiyal
Currently AS SDP is only configured when VRR is enabled. However, other
use cases like CMRR, Panel Replay, etc. also send information to the sink
via AS SDPs.
With optimized guardband, we also need to account for wakeup time and other
relevant details that depend on the AS SDP position whenever AS SDP is
enabled. If a feature enabling AS SDP gets turned on later (after modeset),
the guardband might not be sufficient and may need to increase, triggering
a full modeset.
To avoid this, always send AS SDP whenever:
- the source and sink both support it, AND,
- there is a possibility to use it for VRR and Panel Replay for
synchronization.
v2: Check if AS SDP can be used for synchronization for VRR or PR. (Ville)
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 6e6d46cf62de..23daf90b701e 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3136,7 +3136,11 @@ static bool intel_dp_needs_as_sdp(struct intel_dp *intel_dp,
if (drm_dp_is_branch(intel_dp->dpcd))
return false;
- return crtc_state->vrr.enable;
+ if (intel_alpm_is_alpm_aux_less(intel_dp, crtc_state) &&
+ !intel_psr_pr_async_video_timing_supported(intel_dp))
+ return true;
+
+ return intel_vrr_possible(crtc_state);
}
static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
--
2.45.2
^ permalink raw reply related [flat|nested] 54+ messages in thread* Claude review: drm/i915/dp: Always enable AS SDP if supported by source + sink
2026-04-08 8:42 ` [PATCH 26/26] drm/i915/dp: Always enable AS SDP if supported by source + sink Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
0 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Changes `intel_dp_needs_as_sdp()` to enable AS SDP when:
1. Aux-less ALPM is active and async video timing is NOT supported (sink requires AS SDP during PR active), OR
2. VRR is *possible* (`intel_vrr_possible()` rather than `vrr.enable`)
The change from `vrr.enable` to `intel_vrr_possible()` is significant. `intel_vrr_possible()` checks `crtc_state->vrr.flipline` (which is set when the mode is within VRR range), meaning AS SDP is enabled even when VRR is not currently active but the display could support it. The commit message justifies this: turning on VRR later would otherwise require a full modeset to increase the guardband.
However, this means AS SDP bandwidth is always reserved for VRR-capable panels even if VRR is never used. The tradeoff is acceptable for correctness.
Missing R-b.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread
* Claude review: Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM
2026-04-08 8:42 [PATCH 00/26] Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM Ankit Nautiyal
` (25 preceding siblings ...)
2026-04-08 8:42 ` [PATCH 26/26] drm/i915/dp: Always enable AS SDP if supported by source + sink Ankit Nautiyal
@ 2026-04-12 2:51 ` Claude Code Review Bot
26 siblings, 0 replies; 54+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:51 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: Fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM
Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Patches: 27
Reviewed: 2026-04-12T12:51:24.670746
---
This 26-patch series from Ankit Nautiyal enables Adaptive-Sync SDP for Panel Replay with Link ON and Auxless-ALPM on Intel display hardware. The series is well-structured, progressing from drm core cleanup/additions (patches 1-7), through i915-specific bug fixes and refactoring (patches 8-15), to new feature enablement (patches 16-26).
**Strengths:**
- Good separation of concerns: DRM core changes are cleanly separated from i915-specific logic.
- Many patches have been reviewed by Ville Syrjala, indicating upstream engagement.
- The commit messages are generally well-written with clear rationale and spec references.
- The split of AS SDP computation into early/late phases (patch 24) is a sound architectural decision.
**Concerns:**
- Patch 10 removes the `assume_all_enabled` path for AS SDP guardband without obvious justification for why that was wrong vs. just conservative.
- Patch 13 removes the revision check in unpack without replacing it with any validation, which is an intentional relaxation but worth noting.
- Patch 21 introduces a separate DPCD write for CONFIG3 right after patch 19 converted CONFIG/CONFIG2 to burst mode -- these could have been combined.
- Patch 26 widens AS SDP enablement to `intel_vrr_possible()` instead of `vrr.enable`, which is a semantic change worth scrutiny -- this enables AS SDP even when VRR is only possible but not currently active.
Overall the series is in reasonable shape. Most issues are minor.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 54+ messages in thread