Skip to contentSkip to conversation

drm/amd/display: HDMI 1.4 3D output (frame packing, top-and-bottom, side-by-side)

PATCH In review Adrian Betschart 2 participants 7 messages Sep 7 – Sep 21

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v3 cover drm/amd/display: HDMI 1.4 3D output (frame packing, top-and-bottom, side-by-side)

amdgpu has never exposed the HDMI 1.4 3D modes that drm_edid derives from a sink's HDMI VSDB: stereo_allowed is false on every connector, so a 3D-capable TV or projector connected to a Radeon card cannot be driven in frame-packing, top-and-bottom or side-by-side mode, although i915 has supported exactly this for a decade and the media players that produce 3D frames (Kodi, mpv with 3D filters) only need the mode to exist.

These three patches add it for native HDMI connectors, in the simplest form that works on the hardware: the source packs both views into the frame and the display core scans that frame out as ordinary 2D; the only 3D-specific output is the HDMI vendor infoframe. The reason it has to be done this way is in patch 1: any of DC's stereo timing formats, including the SW_PACKED ones, makes the hardware treat the surface as two views and paint the whole frame into each half. Patch 2 adds the 3D_Ext_Data byte to the top-and-bottom vendor infoframe, without which at least JVC D-ILA projectors do not engage 3D (Amlogic sources send it, which is why those work with the same projector). Patch 3 sizes the stream and the plane viewport by the doubled frame-packing timing so each eye receives its own view rather than a stretched copy of the first.

Tested on a Radeon RX 7600 (Navi 33, DCN 3.2.1) driving a JVC DLA-RS4100 through an HDFury VRROOM, with Kodi (LibreELEC, GBM) as the source, on a 7.2.3 kernel carrying these patches; the series here is rebased onto amd-staging-drm-next and compile-tested there, and the amdgpu_dm connector (308) and plane (95) KUnit suites pass; the freesync suite crashes the same way on the unpatched base. All three layouts engage the projector's 3D mode at 1920x1080p24, RGB 12 bpc, with correct per-eye geometry (row-coded test frames read back through each eye of shutter glasses) and correct eye assignment; frame packing is also the format the projector uses for Blu-ray 3D.

Known limitation, not addressed here: a framebuffer with DCC enabled does not scan out in a frame-packed mode on this GPU (the first flip after the modeset never completes and the pipe wedges); the source has to allocate the 3D framebuffer without DCC. A separate report will follow once it is better understood.

Two unrelated FRL/DSC issues found on the same setup are tracked as drm/amd issues 5770 and 5771.

v3:
- 1/3: pass CRTC_STEREO_DOUBLE unconditionally where amdgpu_dm recomputes the CRTC fields, as the DRM core does in mode_fixup(); the flag only doubles a frame-packing mode, and the previous flags & DRM_MODE_FLAG_3D_FRAME_PACKING test also matched other 3D layouts (multi-bit field). The saved_mode variant is back to its original form, since a stereo mode is no longer a FreeSync video mode. Both from the Sashiko review of v2.

v2 (all three findings came from the Sashiko review bot, and all held up):
- 1/3: a stereo mode keeps its own CRTC timing in decide_crtc_timing_for_drm_display_mode() - with the native timing copied over it, a frame-packed 1080p24 mode (which shares pixel clock and totals with 1080p60) lost its doubled timing on a 1080p sink even with scaling off; and amdgpu_dm_is_freesync_video_mode() rejects a stereo-flagged mode, which otherwise could be replaced by the 2D FreeSync base mode and lose its 3D flags. KUnit cases for both.
- 3/3: the plane KUnit mocks now set hdisplay/vdisplay as well as the crtc_* size, which drm_mode_get_hv_timing() derives the size from; dm_test_helper_check_state_scaling_caps failed otherwise.
- 2/3: unchanged.

Adrian Betschart (3):
drm/amd/display: support HDMI 1.4 3D modes on HDMI connectors drm/amd/display: send the 3D_Ext_Data byte for top-and-bottom too drm/amd/display: size frame-packed streams by the doubled timing

 .../display/amdgpu_dm/amdgpu_dm_connector.c   | 58 ++++++++++++--
 .../amd/display/amdgpu_dm/amdgpu_dm_plane.c   | 13 ++-
 .../tests/amdgpu_dm_connector_test.c          | 80 +++++++++++++++++++
 .../amdgpu_dm/tests/amdgpu_dm_plane_test.c    | 12 +++
 drivers/gpu/drm/amd/display/dc/dc_stream.h    |  7 ++
 .../display/modules/info_packet/info_packet.c |  4 +
 6 files changed, 165 insertions(+), 9 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH v3 1/3 drm/amd/display: support HDMI 1.4 3D modes on HDMI connectors

Allow the stereo modes drm_edid derives from a sink's HDMI VSDB on HDMI connectors, and drive them the way a 2D stream is driven: the source (compositor or media player) lays both views out in the frame itself - side by side, top and bottom, or the doubled frame-packing timing with the 45-line active space between the eyes - and the only 3D-specific output is the HDMI vendor infoframe that tells the sink how the frame is laid out.

Keep the DC timing at TIMING_3D_FORMAT_NONE for all of them. Any DC stereo timing format, including the SW_PACKED variants, makes the hardware treat the surface as two views: the pipe is split and both view addresses point at the same surface, so the whole frame ends up in each half of the output. The new vsif_3d_format stream field carries the layout to mod_build_hf_vsif_infopacket() instead, so the VSIF is right and stays right when the freesync code rebuilds it for ALLM.

Frame packing needs the doubled CRTC timing; pass CRTC_STEREO_DOUBLE wherever amdgpu_dm recomputes the CRTC fields itself.

Limit stereo_allowed to native HDMI connectors: on the DP-to-HDMI converter paths link validation rejects the 3D timings.

Tested on a Radeon RX 7600 (DCN 3.2.1) driving a JVC DLA-RS4100 projector through an HDFury VRROOM, with Kodi rendering the packed
frames: frame packing, top-and-bottom and side-by-side at 1920x1080p24, RGB 12 bpc, all engage the projector's 3D mode with correct per-eye geometry and eye assignment (checked with per-eye test patterns through shutter glasses).

Two paths in create_stream_for_sink() would otherwise replace what the mode carries: decide_crtc_timing_for_drm_display_mode() copies the native CRTC timing over a mode with matching clock and totals or when scaling is on, which for frame packing is the doubled timing, and amdgpu_dm_is_freesync_video_mode() can match a stereo mode whose base timing equals the FreeSync base mode and swap in the 2D mode, dropping the 3D flags. A stereo mode keeps its own CRTC timing and is never a FreeSync video mode; KUnit cases cover both.

---
 .../display/amdgpu_dm/amdgpu_dm_connector.c   | 47 ++++++++++-
 .../tests/amdgpu_dm_connector_test.c          | 80 +++++++++++++++++++
 drivers/gpu/drm/amd/display/dc/dc_stream.h    |  7 ++
 .../display/modules/info_packet/info_packet.c |  3 +
 4 files changed, 135 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c +45 -2
index 0e71ba498..987d98918 100644
@@ -851,6 +851,25 @@ STATIC_IFN_KUNIT bool adjust_colour_depth_from_display_info(
 }
 EXPORT_IF_KUNIT(adjust_colour_depth_from_display_info);
 
+/*
+ * 3D layout to announce in the HDMI vendor infoframe for a DRM 3D mode. The
+ * stream timing itself stays 2D (see fill_stream_properties_from_drm_display_mode).
+ */
+static enum dc_timing_3d_format amdgpu_dm_vsif_3d_format(unsigned int mode_flags)
+{
+	switch (mode_flags & DRM_MODE_FLAG_3D_MASK) {
+	case DRM_MODE_FLAG_3D_FRAME_PACKING:
+		return TIMING_3D_FORMAT_SW_FRAME_PACKING;
+	case DRM_MODE_FLAG_3D_TOP_AND_BOTTOM:
+		return TIMING_3D_FORMAT_TB_SW_PACKED;
+	case DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF:
+	case DRM_MODE_FLAG_3D_SIDE_BY_SIDE_FULL:
+		return TIMING_3D_FORMAT_SBS_SW_PACKED;
+	default:
+		return TIMING_3D_FORMAT_NONE;
+	}
+}
+
 STATIC_IFN_KUNIT void fill_stream_properties_from_drm_display_mode(
 	struct dc_stream_state *stream,
 	const struct drm_display_mode *mode_in,
@@ -887,7 +906,15 @@ STATIC_IFN_KUNIT void fill_stream_properties_from_drm_display_mode(
 	 */
 	timing_out->pixel_encoding = requested_encoding;
 
+	/*
+	 * The source packs both views into the frame itself (side-by-side,
+	 * top-and-bottom, or the doubled frame-packing timing), so the display
+	 * core scans it out as a plain 2D stream and only the HDMI vendor
+	 * infoframe tells the sink how the frame is laid out. Any DC stereo
+	 * timing format would make the hardware treat the surface as two views.
+	 */
 	timing_out->timing_3d_format = TIMING_3D_FORMAT_NONE;
+	stream->vsif_3d_format = amdgpu_dm_vsif_3d_format(mode_in->flags);
 	timing_out->display_color_depth = amdgpu_dm_convert_color_depth_from_display_info(
 		connector,
 		(timing_out->pixel_encoding == PIXEL_ENCODING_YCBCR420),
@@ -992,6 +1019,15 @@ decide_crtc_timing_for_drm_display_mode(struct drm_display_mode *drm_mode,
 					const struct drm_display_mode *native_mode,
 					bool scale_enabled)
 {
+	/*
+	 * A stereo mode has to go out at its own timing: frame packing's CRTC
+	 * timing is the doubled one, and a side-by-side or top-and-bottom mode
+	 * scaled to the native timing would announce a layout the sink cannot
+	 * pair with what it receives.
+	 */
+	if (drm_mode->flags & DRM_MODE_FLAG_3D_MASK)
+		return;
+
 	if (scale_enabled || (
 	    native_mode->clock == drm_mode->clock &&
 	    native_mode->htotal == drm_mode->htotal &&
@@ -1120,6 +1156,10 @@ bool amdgpu_dm_is_freesync_video_mode(const struct drm_display_mode *mode,
 	if (!high_mode || !mode)
 		return false;
 
+	/* a stereo mode is never one of the inserted FreeSync video modes */
+	if (mode->flags & DRM_MODE_FLAG_3D_MASK)
+		return false;
+
 	timing_diff = high_mode->vtotal - mode->vtotal;
 
 	if (high_mode->clock == 0 || high_mode->clock != mode->clock ||
@@ -1451,6 +1491,8 @@ create_stream_for_sink(struct drm_connector *connector,
 	struct dc_sink *sink = NULL;
 
 	drm_mode_init(&mode, drm_mode);
+	/* frame packing scans out both views plus the active space in one frame */
+	drm_mode_set_crtcinfo(&mode, CRTC_STEREO_DOUBLE);
 	memset(&saved_mode, 0, sizeof(saved_mode));
 
 	if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK) {
@@ -2449,7 +2491,7 @@ enum drm_mode_status amdgpu_dm_connector_mode_valid(struct drm_connector *connec
 	if (!test_mode)
 		goto fail;
 
-	drm_mode_set_crtcinfo(test_mode, 0);
+	drm_mode_set_crtcinfo(test_mode, CRTC_STEREO_DOUBLE);
 
 	stream = amdgpu_dm_create_validate_stream_for_sink(connector, test_mode,
 						 to_dm_connector_state(connector->state),
@@ -3143,7 +3185,8 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
 	aconnector->dc_link = link;
 	aconnector->base.interlace_allowed = false;
 	aconnector->base.doublescan_allowed = false;
-	aconnector->base.stereo_allowed = false;
+	/* HDMI 1.4 3D only; DP-to-HDMI converters reject the timings in link validation */
+	aconnector->base.stereo_allowed = connector_type == DRM_MODE_CONNECTOR_HDMIA;
 	aconnector->base.dpms = DRM_MODE_DPMS_OFF;
 	aconnector->hpd.hpd = AMDGPU_HPD_NONE; /* not used */
 	aconnector->audio_inst = -1;
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c +80 -0

104 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dc_stream.h +7 -0
index 934ae381e..e6fd75b87 100644
@@ -235,6 +235,13 @@ struct dc_stream_state {
 
 	enum view_3d_format view_format;
 
+	/**
+	 * @vsif_3d_format: 3D layout announced in the HDMI vendor infoframe when
+	 * the source packs both views into the frame itself and the timing is
+	 * therefore left at TIMING_3D_FORMAT_NONE.
+	 */
+	enum dc_timing_3d_format vsif_3d_format;
+
 	bool use_vsc_sdp_for_colorimetry;
 	bool ignore_msa_timing_param;
 
drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +3 -0
index 32b697f46..13478b8bd 100644
@@ -536,6 +536,9 @@ void mod_build_hf_vsif_infopacket(const struct dc_stream_state *stream,
 		format = stream->timing.timing_3d_format;
 		if (stream->view_format == VIEW_3D_FORMAT_NONE)
 			format = TIMING_3D_FORMAT_NONE;
+		/* a 2D scanout of a frame the source packed itself */
+		if (format == TIMING_3D_FORMAT_NONE)
+			format = stream->vsif_3d_format;
 
 		if (stream->timing.hdmi_vic != 0
 				&& stream->timing.h_total >= 3840
Signature · 1 line
2.43.0
#2 lore raw

PATCH v3 2/3 drm/amd/display: send the 3D_Ext_Data byte for top-and-bottom too

In reply to Adrian Betschart

HDMI 1.4b only requires the 3D_Ext_Data byte for the side-by-side (half) structure, and the vendor infoframe for top-and-bottom is built with a 5-byte payload accordingly. At least one sink family ignores a top-and-bottom VSIF without the sixth byte: a JVC DLA-RS4100 (D-ILA, "ILAFPJ--X214A") stays in 2D on the 5-byte frame and engages its 3D mode the moment the byte is present. Amlogic sources send the 6-byte form for top-and-bottom, which is why the same projector works with them.

Send the extra byte, zero, for top-and-bottom as well. Sinks that do not need it ignore a zero 3D_Ext_Data field.

---
 drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +1 -0
index 13478b8bd..3e41b33ea 100644
@@ -574,6 +574,7 @@ void mod_build_hf_vsif_infopacket(const struct dc_stream_state *stream,
 			case TIMING_3D_FORMAT_TOP_AND_BOTTOM:
 			case TIMING_3D_FORMAT_TB_SW_PACKED:
 				info_packet->sb[5] = (0x6 << 4);
+				length = 6;
 				break;
 
 			default:
Signature · 1 line
2.43.0
#3 lore raw

PATCH v3 3/3 drm/amd/display: size frame-packed streams by the doubled timing

In reply to Adrian Betschart

A frame-packed 3D mode scans out both views and the active space between them in one frame, so the CRTC is 2205 lines tall for a 1080p mode. The stream scaling code took the source height from mode->vdisplay (1080) against the 2205-line addressable destination; with aspect scaling that keeps 1080 lines and centres them, so the first view is stretched across both eye windows and the second view is never shown. The plane viewport check clipped planes to crtc_vdisplay for the same reason.

Use drm_mode_get_hv_timing(), which returns the doubled height for stereo modes and the plain display size otherwise, in both places.

Measured on a Radeon RX 7600 with a frame-packed 1920x1080p24 mode:
before, a row-coded 2205-line test frame showed rows of the first view in both eyes; after, each eye receives its own view.

The plane KUnit tests mocked only the CRTC-adjusted size; set the mode size they now derive it from as well.

---
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c | 11 ++++++++---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 13 +++++++++----
 .../display/amdgpu_dm/tests/amdgpu_dm_plane_test.c  | 12 ++++++++++++
 3 files changed, 29 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c +8 -3
index 987d98918..2d7dc001e 100644
@@ -1418,9 +1418,14 @@ void amdgpu_dm_update_stream_scaling_settings(struct drm_device *dev,
 	if (!mode)
 		return;
 
-	/* Full screen scaling by default */
-	src.width = mode->hdisplay;
-	src.height = mode->vdisplay;
+	/*
+	 * Full screen scaling by default. A frame-packed 3D mode scans out the
+	 * doubled timing, so the source size is the CRTC size, not vdisplay:
+	 * with 1080 lines against a 2205-line destination the aspect fit would
+	 * keep 1080 lines and centre them, putting the first view across both
+	 * eye windows and none of the second.
+	 */
+	drm_mode_get_hv_timing(mode, &src.width, &src.height);
 	dst.width = stream->timing.h_addressable;
 	dst.height = stream->timing.v_addressable;
 
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +9 -4
index 0a5a73472..8db656ef8 100644
@@ -1407,16 +1407,21 @@ int amdgpu_dm_plane_helper_check_state(struct drm_plane_state *state,
 		if (state->plane->type != DRM_PLANE_TYPE_CURSOR) {
 			int viewport_width = state->crtc_w;
 			int viewport_height = state->crtc_h;
+			int mode_hdisplay, mode_vdisplay;
+
+			/* frame-packed 3D scans out the doubled timing */
+			drm_mode_get_hv_timing(&new_crtc_state->mode,
+					       &mode_hdisplay, &mode_vdisplay);
 
 			if (state->crtc_x < 0)
 				viewport_width += state->crtc_x;
-			else if (state->crtc_x + state->crtc_w > new_crtc_state->mode.crtc_hdisplay)
-				viewport_width = new_crtc_state->mode.crtc_hdisplay - state->crtc_x;
+			else if (state->crtc_x + state->crtc_w > mode_hdisplay)
+				viewport_width = mode_hdisplay - state->crtc_x;
 
 			if (state->crtc_y < 0)
 				viewport_height += state->crtc_y;
-			else if (state->crtc_y + state->crtc_h > new_crtc_state->mode.crtc_vdisplay)
-				viewport_height = new_crtc_state->mode.crtc_vdisplay - state->crtc_y;
+			else if (state->crtc_y + state->crtc_h > mode_vdisplay)
+				viewport_height = mode_vdisplay - state->crtc_y;
 
 			if (viewport_width < 0 || viewport_height < 0) {
 				DRM_DEBUG_ATOMIC("Plane completely outside of screen\n");
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c +12 -0
index 1b39f41c8..80a952d47 100644
@@ -642,6 +642,8 @@ static void dm_test_helper_check_state_viewport_reject(struct kunit *test)
 	state->crtc_y = 0;
 	state->crtc_w = 100;
 	state->crtc_h = 100;
+	new_crtc_state->mode.hdisplay = 100;
+	new_crtc_state->mode.vdisplay = 100;
 	new_crtc_state->mode.crtc_hdisplay = 100;
 	new_crtc_state->mode.crtc_vdisplay = 100;
 
@@ -2286,6 +2288,8 @@ static void dm_test_helper_check_state_small_viewport_width(struct kunit *test)
 	state->crtc_y = 0;
 	state->crtc_w = 10;
 	state->crtc_h = 100;
+	new_crtc_state->mode.hdisplay = 1920;
+	new_crtc_state->mode.vdisplay = 1080;
 	new_crtc_state->mode.crtc_hdisplay = 1920;
 	new_crtc_state->mode.crtc_vdisplay = 1080;
 
@@ -2327,6 +2331,8 @@ static void dm_test_helper_check_state_small_viewport_height(struct kunit *test)
 	state->crtc_y = -95;
 	state->crtc_w = 100;
 	state->crtc_h = 100;
+	new_crtc_state->mode.hdisplay = 1920;
+	new_crtc_state->mode.vdisplay = 1080;
 	new_crtc_state->mode.crtc_hdisplay = 1920;
 	new_crtc_state->mode.crtc_vdisplay = 1080;
 
@@ -2369,6 +2375,8 @@ static void dm_test_helper_check_state_bottom_clipped_height(struct kunit *test)
 	state->crtc_y = 95;
 	state->crtc_w = 100;
 	state->crtc_h = 100;
+	new_crtc_state->mode.hdisplay = 1920;
+	new_crtc_state->mode.vdisplay = 100;
 	new_crtc_state->mode.crtc_hdisplay = 1920;
 	new_crtc_state->mode.crtc_vdisplay = 100;
 
@@ -2429,6 +2437,8 @@ static void dm_test_helper_check_state_scaling_caps(struct kunit *test)
 	state->crtc_w = 200;
 	state->crtc_h = 200;
 	new_crtc_state->crtc = crtc;
+	new_crtc_state->mode.hdisplay = 1920;
+	new_crtc_state->mode.vdisplay = 1080;
 	new_crtc_state->mode.crtc_hdisplay = 1920;
 	new_crtc_state->mode.crtc_vdisplay = 1080;
 
@@ -2738,6 +2748,8 @@ static struct amdgpu_device *dm_test_init_atomic_check_state(struct kunit *test,
 
 	(*new_crtc_state)->crtc = crtc;
 	(*new_crtc_state)->enable = true;
+	(*new_crtc_state)->mode.hdisplay = 1920;
+	(*new_crtc_state)->mode.vdisplay = 1080;
 	(*new_crtc_state)->mode.crtc_hdisplay = 1920;
 	(*new_crtc_state)->mode.crtc_vdisplay = 1080;
 
Signature · 1 line
2.43.0
Tested-by on the v3 series
#4 lore raw
In reply to Adrian Betschart

Hi Adrian, Harry, Alex, others,

A word of introduction, since this is my first mail to this list: I am Daniel Ramos, and I come from the consumer side of this hardware rather than from driver development. I keep a pair of Sony BRAVIA 3D televisions from 2011/2012 fully alive (KDL-46EX725 and KDL-46HX855, the sony-bravia-linux project, https://github.com/danielcamposramos/sony-bravia-linux), including the 3D panels Sony no longer ships software for, and that generation's end-of-service is documented for the right-to-repair movement on its own consumer-rights wiki page (https://consumerrights.wiki/w/Sony_BRAVIA_pre-Android_Linux_TVs_(2011-2012)). That work goes upstream first: frame-packing SEI support I pushed is merged in HandBrake (#8100, https://github.com/HandBrake/HandBrake/pull/8100), my stereo serving profiles are merged in Universal Media Server (#6330, https://github.com/UniversalMediaServer/UniversalMediaServer/pull/6330), and open threads are running at FFmpeg (https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/24530), mpv (https://github.com/mpv-player/mpv/issues/18489) and MKVToolNix (https://codeberg.org/mbunkus/mkvtoolnix/issues/6309). I also maintain the CC0 awesome-stereoscopy index (https://github.com/danielcamposramos/awesome-stereoscopy), created because the field had no curated list.

On the gap this series closes: the DRM core has carried HDMI 1.4 stereo modes and the vendor-infoframe helpers for years, i915, vc4 and nouveau all allow stereo (nouveau wired frame packing in 2017), and amdgpu DC has been the one major driver refusing it ever since DC landed, with nobody closing it in nearly a decade. It still justifies closing. The televisions these modes exist for were sold by the millions between 2010 and 2016, they are the same hardware class Adrian tests against (his JVC is a 3D projector where mine are 3D TVs), and every one of them works today as a full 3D monitor the moment it receives the standard signal, as the runs below show. With Valve's upcoming Steam Frame (https://store.steampowered.com/hardware/steamframe) putting stereo displays back into a mainstream gaming stack, wiring a modern open driver to the HDMI 1.4 3D signal is as much a longevity fix for that installed base as a new feature.

Independent confirmation of this approach on older DCN hardware and a consumer-TV sink, plus a boundary record that matches your patch 3's diagnosis.

Hardware here is a Renoir APU (0000:0b:00.0, DCN 2.1, Display Core 3.2.369, Debian 7.0 kernel) driving a Sony KDL-46HX855 from 2012, whose HDMI 1.4b-class EDID advertises side-by-side half and top-and-bottom over a 7-VIC mask and frame packing on five VICs. The coverage is complementary to yours: yours runs DCN 3.2.1 into a JVC projector behind an HDFury, mine runs DCN 2.1 straight into a living-room television.

With the equivalent wiring here (stereo_allowed allowed on HDMI connectors, the vendor infoframe attached to the stream's hfvsif packet when the mode carries DRM_MODE_FLAG_3D_*, timing_3d_format deliberately left at NONE), side-by-side half 1920x1080@60 makes the set switch itself into 3D with no remote input, and a software-rendered disparity pattern reads in depth through the TV's own glasses. The mode probe goes from 22 modes with zero stereo to 51 modes with 29 stereo-flagged.

Frame packing shows the boundary your patch 3 fixes, observed independently: without the CRTC_STEREO_DOUBLE expansion the sink entered 3D on a valid FP VSIF while DC scanned the un-doubled 1080-line 74.25 MHz timing against the 2205-line plane, which is signal pass and picture black. With the stream mode expanded (1920/2750 horizontal active and total, 2205/2250 vertical, 148.5 MHz for 1080p24 FP) the same television both switched itself into 3D and displayed the full two-eye picture through the AMD link.

A cross-vendor control on the same sink: stock nouveau on a GA106 drives this television into 3D in the same 1920x1080@24 frame-packing mode, so the EDID and the sink behavior are proven independently of the AMD path.

On your DCC note: our test buffers are dumb buffers without DCC, so I cannot speak to that wedge; every flip with a plain buffer completed, which is at least consistent with the failure being DCC-specific.

Logs, the DRM test tool, and the two reference deltas (built for the 7.0 tree, kept as a DCN 2.1 port in case an older-generation follow-up is wanted) are public at https://github.com/danielcamposramos/sony-bravia-linux: run records and verdicts are in tools/stereo-modeset/ and the patches are in docs/upstream/.

Happy to run anything specific on this APU and television combination if it helps the review.

Disclosure per Documentation/process/coding-assistants.html (https://docs.kernel.org/process/coding-assistants.html): prepared with AI assistance, directed and hardware-verified by me end to end; the assisting models were LLM Kimi K3 (Codex CLI), LLM GPT 5.6 Sol (Codex CLI) and LLM Claude Opus 5 (Claude Code CLI).

#5 lore raw
Quoted 3 lines · Daniel Ramos

Independent confirmation of this approach on older DCN hardware and a consumer-TV sink, plus a boundary record that matches your patch 3's diagnosis.

Thank you, Daniel. A second DCN generation and a TV as the sink is exactly the coverage the series lacked, and the black frame-packing picture without the doubled timing is a good independent check of patch 3. (Adding the maintainers back to Cc.)

Quoted 2 lines

Happy to run anything specific on this APU and television combination if it helps the review.

One request, if you have the time: your runs used your own port on 7.0, so a run of v3 itself would make your Tested-by cover the patches as posted. It applies cleanly to 7.3-rc1. Top-and-bottom is the most useful check, since patch 2 only affects that layout and your report covers side-by-side and frame packing.

For the record, as with my later amdgpu patches: the series and this reply were prepared with AI assistance (Claude Code); I reviewed and tested the series as described in the cover letter. A respin will carry the Assisted-by tag.

Harry, Leo: any comments on the series?

Thanks,
Adrian

Tested-by
#6 lore raw

Hi Adrian, Harry, Leo, others,

Following your request, the testing is done, and it is a pass across the board: v3 as posted built into a 7.3-rc4 kernel and run today on the Renoir APU (DCN 2.1, Display Core 3.2.369) driving the Sony KDL-46HX855, all three layouts were tested in sequence (no restart) in one desktop-down window of about five minutes, so this Tested-by now covers the series exactly as it sits on the list.

Top-and-bottom first, as you suggested: the TV switched itself into 3D on 1920x1080@60 TaB and the disparity picture read in depth through its glasses, so the sink is happy with the 3D_Ext_Data byte patch 2 sends for that layout. Side-by-side half at 1920x1080@60 followed with the same self-switch and picture. Frame packing closed the window at 1920x1080@24: the tool presented one 1920x2205 packed buffer, the expanded timing from patch 3 scanned it, and the full two-eye picture showed where my earlier unfinished 7.0 experiment without the expansion had signal and black picture (fixed as well now the same way).

The probe numbers on 7.3-rc4 + v3 are identical to what our 7.0 port produced here: 22 modes and 0 stereo without the client cap, 51 modes and 29 stereo with it, no regressions on the aspect-ratio pass.

The run record is in the repo at the run11-betschart-v3-7.3rc4-all-pass-2026-09-21.log (https://github.com/danielcamposramos/sony-bravia-linux/blob/main/tools/stereo-modeset/run11-betschart-v3-7.3rc4-all-pass-2026-09-21.log), probe output and per-layout modeset lines included.

One more thing I would like to put on the table while the series is in review.

Since our first exchange I have kept the equivalent two changes prepared as a backport for the 7.0-era tree, where the connector code still lives in amdgpu_dm.c: same stereo_allowed plus VSIF wiring, same CRTC_STEREO_DOUBLE expansion for frame packing, forward-verified to apply cleanly against the pristine v7.0 source, sitting as format-patch mboxes in docs/upstream of the same repository.

They are an offer, not a request, and there is no competing series coming: if this v3 lands and a stable backport or an older-generation follow-up ever becomes wanted, they are ready to go as-is, and I am equally happy to reshape them or to let them retire unused once v3 ships downstream on its own.

Happy to run anything further on this APU and television if the review wants it.

Disclosure per Documentation/process/coding-assistants.html (https://docs.kernel.org/process/coding-assistants.html): prepared with AI assistance, directed and hardware-verified by me end to end; the assisting models were LLM Kimi K3 (Codex CLI), LLM GPT 5.6 Sol (Codex CLI) and LLM Claude Opus 5 (Claude Code CLI).