3

Frame packing is a method of sending a left and a right view (for stereoscopic 3D) vertically stacked within one frame via HDMI. If each view has size width x height the resulting "packed" frame has size width x 49/24 height, i.e., both views with some blank lines in between.

For 1080p this results in frames of size 1920x2205. For most FullHD (but not UHD or similar) devices frame packing is the only method of sending a FullHD view for each eye.

The following method works for setting the size:

cvt cvt 1920 2205 24 #generate Modeline
xrandr --newmode "1920x2205_24.00"  .... #Modeline 
xrandr --addmode HDMI1 "1920x2205_24.00"
xrandr --output  HDMI1 --mode 1920x2205_24.00

However, stereoscopic modes need to be announced to the TV/projector with so called info frames that specify the 3D Mode. While the kernel has support for sending these info frames, xrandr etc. do not allow to pass the relevant information to drm.

How can I make the kernel send the required info frames?

PS: I cannot add a tag "stereo3d" due to missing reputation. The tag "3d" does not fit.

frafl
  • 194
  • 9

1 Answers1

2

The following solution comes without any warranty. Be aware that sending HDMI signals that violate the standard may be bad for your TV/projector and that the following tiny hack breaks abstraction layers, which were introduced for a reason. Please do not ask for a kernel patch (i.e. file a bug there).

One method is a tiny modification of the drm kernel module. Please read How (recipe) to build only one kernel module? first.

The file you have to modify is: drivers/gpu/drm/drm_edid.c. We change this line to:

    s3d_flags = (mode->flags & DRM_MODE_FLAG_3D_MASK) ||
            (mode->vdisplay == 2205);

and insert here the following lines:

    if(mode->vdisplay == 2205)
            return HDMI_3D_STRUCTURE_FRAME_PACKING;

You should remove most (if not all) graphic card specific modules from drivers/gpu/drm/Makefile before compiling the drm module according to the question mentioned in the beginning. Be aware that you have to update initramfs, since the drm module is loaded at boot time.

This solution was tested with an Epson projector and intel graphics card (uses i915). Before modifying the drm module you should check that your graphic card kernel module actually uses the relevant functions of the drm module. Otherwise this hack is pointless.

frafl
  • 194
  • 9