C H A P T E R  7

Framelocking Sun XVR-4000 Graphics Accelerators

This chapter describes framelocking multiple Sun XVR-4000 graphics accelerators and buffer swap synchronization.


Sun XVR-4000 Graphics Accelerator Framelock System

The framelock synchronization feature enables vertical retracing to occur simultaneously on each Sun XVR-4000 graphics accelerator subsystem. The framelock cable is used to daisy-chain two or more Sun graphics accelerator subsystems, such as Sun XVR-500, Sun XVR-1000, and Sun XVR-4000 graphics accelerators. Vertical retrace synchronization eliminates flicker between multiscreen displays. You can framelock two or more Sun XVR-500, Sun XVR-1000, and Sun XVR-4000 graphics accelerator subsystems across one or more computer systems.

Framelocking is often necessary when running multiple stereo displays for the same observer. All the displays must be synchronized so that the left and right views can be seen correctly through one set of LCD stereo glasses.

When using framelock with genlock (Chapter 7), the vertical reset is always received on the same video line. The slave cannot gain or drop a line of video with respect to the master display device when genlocked. Use framelock and genlock together for optimal synchronization performance.

When frame buffers are framelocked, make sure they are all running at the exact same vertical retrace rate. This is normally achieved by selecting the same video format (resolution and refresh rate) (see fbconfig -help for details). See Enabling Framelocking on Graphics Accelerators.

To use the framelock features, the framelock cable is required. See Framelock Cable.

To order the framelock cable, call Sun telesales at 1-800-786-0404 and request spare part number 530-2754. You can also order the framelock cable through the Sun store (http://store.sun.com) by ordering this part number under spare parts.

By default, two video streams from separate Sun XVR-4000 graphics accelerators are not framelocked. The only exception is two streams from doublewide or doublehigh mode, on a single Sun XVR-4000 graphics accelerator; these are inherently framelocked.


Buffer Swap Synchronization

Buffer swap synchronization enables a simultaneous swap of buffer memory contents on all Sun XVR-4000 graphics accelerator subsystems, no matter which of the accelerators finishes rendering its scene content last. This maintains continuity between scenes on all displays linked together by the framelock cable. The display can be a monitor or a large wall screen image displayed by a projector. See Creating a Multiscreen Application in this section for an outline for creating a multiscreen application.

The software Buffer Swap Synchronization algorithm shown on Creating a Multiscrenn Application is implemented by Sun's Xinerama support. Applications opening a window on a Xinerama virtual frame buffer need not be concerned with this synchronization.


Creating a Multiscreen Application

The following is a programming example of how to create a Buffer Swap Synchronization (multiscreen) application.


procedure icon  Creating the Main Program

1. Create n full screen windows, one per screen.

2. Create n rendering threads and associate one thread per screen.

3. Create a master thread to synchronize rendering threads.

4. Execute the main window system event loop.


procedure icon  Using the Master Thread Run Method

Do the following in a loop:

1. Notify all rendering threads to render a frame (possibly in response to an event).

Wait for all rendering threads to finish rendering.

2. Notify all rendering threads to swap buffers.

Wait for all rendering threads to finish swapping.


procedure icon  Using the Render Thread(s) Run Method

1. Create OpenGL context for this thread's window.

2. Make context current to this thread.

3. Initialize OpenGL context state.

4. Do the following in a loop:

a. Wait for master thread notification.

b. Render image to back buffer for this screen.

c. Notify master thread that this thread is done rendering.

d. Wait for master thread notification.

e. Swap buffers.

f. Notify master thread that this thread is done swapping.


Connecting the Framelock Cable

Cable the Sun graphics accelerators to be framelocked before configuring your system for framelock (described in Enabling Framelocking on Graphics Accelerators).

1. Locate the master Sun XVR-4000 graphics accelerator I/O back panel on the rear of your Sun Fire V880z server and its stereo/framelock DIN7 connector (FIGURE 7-1).

 FIGURE 7-1 Sun XVR-4000 Graphics Accelerator Stereo/Framelock Connectors

Figure showing the Sun XVR-4000 graphics accelerator stereo/framelock DIN7 connector.

2. Connect the framelock cable master connector to the stereo/framelock DIN7 connector (FIGURE 7-2).

3. Connect the slave cable connector to a slave Sun XVR-4000 graphics accelerator stereo/framelock DIN7 connector.

If the framelock cable is not long enough, you can use a standard 7-pin DIN extender cable between the slave connector of the framelock cable and the DIN7 connector on the slave system.

4. (Optional) If you are synchronizing additional Sun XVR-4000 graphics accelerators:

a. Connect an additional framelock cable master connector to the framelock cable daisy-chain/stereo connector (FIGURE 7-2).

b. Connect the new slave cable connector to the next graphics board to be framelocked. Stereo glasses may be attached to the final daisy-chain/stereo connector.



Note - While the Sun XVR-4000 graphics accelerator supports both tethered and wireless stereo glasses, wireless stereo glasses without an external power supply are not supported. Connect the transmitter DIN7 connector to the framelock cable daisy-chain/stereo connector (FIGURE 7-2).



FIGURE 7-2 shows the master Sun XVR-4000 graphics accelerator in slot B of the Sun Fire V880z server. The first slave Sun XVR-4000 graphics accelerator is in slot C. The second slave is in Slot B of another Sun Fire V880z server

 FIGURE 7-2 Sun XVR-4000 Graphics Accelerator and Framelock Cable

Figure showing framelocking two or more slave Sun XVR-4000 graphics accelerators.[ D ]


Enabling Framelocking on Graphics Accelerators

This example uses the Sun XVR-4000 graphics accelerator and the device names zulu0 and zulu1. When framelocking with other graphics accelerators such as
Sun XVR-500 and/or Sun XVR-1000 graphics accelerators, use the appropriate device names.

1. Designate a Sun XVR-4000 graphics accelerator as the master display device.

You may use the Sun XVR-4000 graphics accelerator that serves as the boot/console head for that system.

You may select any device (that is, zulu0, zulu1, ... and so on) to be the master Sun XVR-4000 graphics accelerator device.



Note - zulu0 is likely to be in slot B, the lower of the two slots that can contain a
Sun XVR-4000 graphics accelerator. Be sure that you are aware of the devices in the I/O back panel slot.



2. Make sure that each Sun XVR-4000 graphics accelerator installed is running a video format with an identical frame refresh rate to the video format running on the Sun XVR-4000 accelerator in master mode.

a. Check the resolution of a Sun XVR-4000 graphics accelerator by using the fbconfig command.

host% fbconfig -dev zulu0 -prconf

You must repeat this command for each Sun XVR-4000 graphics accelerator in the system or systems.

b. Change the resolution of a Sun XVR-4000 graphics accelerator using the fbconfig command.

If the resolution on each Sun XVR-4000 graphics accelerator is not the same, you must change it to match the Sun XVR-4000 graphics accelerator in master mode. You must configure each board separately (that is, for zulu0, zulu1, and so on). The resolution shown below is an example only, you can use different video formats such as SUNW_STD_1600x1000x66 (TABLE 2-1).

host% fbconfig -dev zulu0 -res SUNW_STD_1280x1024x76
host% fbconfig -dev zulu1 -res SUNW_STD_1280x1024x76

Log out of the X Window system, and then log back in for the resolutions to take effect. If you do not wish the framelock synchronization to be repeated when the X Window system restarts, simply exit the window/desktop session instead of logging out, or disable framelock (see Disabling Framelock).

3. Connect the framelock cables to each Sun graphics accelerator to be framelocked, if you have not already done so.



Note - Do not enable any stream to be a slave without the framelock cable connected. Be sure the framelock cable slave connector is attached to the graphics board configured as a slave.



See the previous section Connecting the Framelock Cable.

Make sure to first connect the framelock cable master mode connector to the master graphics accelerator.

4. Configure the master and slave devices for framelocking.

In this example, zulu0 is the framelock master device, and zulu1 is the slave device.

host% fbconfig -dev zulu0 -master a -stream a -slave disable
host% fbconfig -dev zulu1 -stream a -slave enable external framelock

On the Sun XVR-4000 graphics accelerator system, you do not need to run these last two commands, setting each master and slave graphics board, each time you log into your X Window system.

The video output from zulu1 might glitch when framelock is enabled. zulu1 output will then be framelocked. It will start frames when the framelock master does.


Disabling Framelock



Note - Disable framelock on all slave devices before removing the framelock cables.



single-step bulletTo disable framelock, type:

host% fbconfig -dev zulu1 -stream a -slave disable


Framelock Cable

The framelock cable, FIGURE 7-3, is a Y-shaped cable with three connectors. Use this cable to daisy-chain multiple Sun XVR-4000 graphics accelerators within a computer system.

 FIGURE 7-3 Framelock Cable

Figure showing the framelock cable and indicates the master, slave, and daisy-chain/steroe glasses connectors.

 

TABLE 7-1 Framelock Cable Connections

Framelock Connector

Description

Master connector (shortest male cable)

Connects into the stereo connector located on the Sun XVR-4000 graphics accelerator that is designated as the master display device. Also plugs into the daisy-chain connector for slave Sun XVR-4000 graphics accelerators.

Slave connector (longest male cable)

Connects into the stereo connector located on the Sun XVR-4000 graphics accelerator that is designated as a slave device.

Daisy-chain/stereo glasses connector

(female connector)

Can connect a pair of stereo glasses directly into this connector. Or the connector can be used to daisy-chain to other framelock cables for additional slave Sun XVR-4000 graphics accelerator devices.




Note - There can only be one master Sun XVR-4000 graphics accelerator device. You must configure all other Sun XVR-4000 graphics accelerator devices as slaves. See the section Enabling Framelocking on Graphics Accelerators.