[Previous] [Contents] [Index] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

disp_mode_info_t

Information for a display mode

Synopsis:

#include <mode.h>

typedef struct disp_mode_info {
   short        size;
   disp_mode_t  mode;
   int          xres, yres;
   unsigned     pixel_format;
   unsigned     flags;
   unsigned     crtc_start_gran;
   unsigned     caps;
   union {
       struct {
          short    refresh [DISP_MODE_NUM_REFRESH];
       } fixed;
       struct {
          int      min_vfreq, max_vfreq;
          int      min_hfreq, max_hfreq;
          int      min_pixel_clock;
          int      max_pixel_clock;
          uint8_t  h_granularity;
          uint8_t  v_granularity;
          uint8_t  sync_polarity;
       } generic;
   } u;
   int       num_colors;
   unsigned  crtc_pitch_gran;
} disp_mode_info_t;

Description:

The disp_mode_info_t structure holds information about a display mode. Your driver fills in this structure when the graphics framework calls the get_modeinfo function defined in the disp_modefuncs_t structure.

The members of disp_mode_info_t include:

size
The size of this structure.
mode
The unique mode ID; see the get_modelist function defined in the disp_modefuncs_t structure.
xres, yres
The display dimensions, in pixels.
pixel_format
The frame buffer's pixel format. For more information, see "Pixel formats" in the Writing a Graphics Driver chapter.
flags
Flags that specify various attributes of this mode, selected from the following:

Note that there's a macro, DISP_TVOUT_STANDARD() that returns just the type of output (PAL, NTSC, SECAM).

crtc_start_gran
The granularity of the frame buffer base address. Values passed in the offset parameter to the set_display_offset() function in the disp_modefuncs_t structure are multiples of this value.
caps
The list of available features:
u.fixed.refresh
An array of possible refresh rates (in Hz) for this mode. The size of this array is given by DISP_MODE_NUM_REFRESH (i.e. it's the maximum number of refresh rates that can be supported for a given mode).
u.generic.min_vfreq, u.generic.max_vfreq
The monitor vertical frequency limits, in Hz.
u.generic.min_hfreq, u.generic.max_hfreq
The monitor horizontal frequency limits, in kHz.
u.generic.min_pixel_clock, u.generic.max_pixel_clock
The pixel clock limits, in kHz.
u.generic.h_granularity
The horizontal granularity; X resolution must be a multiple of this.
u.generic.v_granularity
The vertical granularity; Y resolution must be a multiple of this.
num_colors
Defined only if the display format is palette-based. It specifies the maximum palette index that the display can handle. For example, the example 16-color VGA driver sets this to 16.

Classification:

Photon

See also:

disp_modefuncs_t


[Previous] [Contents] [Index] [Next]