[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_adapter_t

Description of the graphics hardware's adapter

Synopsis:

#include <display.h>

typedef struct disp_adapter {
    ...
} disp_adapter_t;

Description:

This structure describes the graphics hardware's adapter. There's one instance of this structure for each device.


Note: The disp_adapter_t structure includes some members that aren't described here; don't use or change any undocumented members.

Each driver module has its own context block -- these are the members whose name ends with _ctx. Your driver can use these context blocks to store any data it requires.

The structures pointed to by the modefuncs and memfuncs structures contain the entry points of the memory manager and modeswitcher modules. Through these, it's possible for one module to call functions within another. Since all entry points have access to the disp_adapter_t structure, each module's entry point is always able to find its own private data structures.

The members of disp_adapter_t include:

int size
Size of this structure.
void *gd_ctx
Context block for graphics (2D) drivers.
void *ms_ctx
Context block for the modeswitch function group.
void *mm_ctx
Context block for the memory manager function group.
void *vid_ctx
Context block for the video overlay function group.
void *vcap_ctx
Context block for the video capture function group.
int bus_type
Identifies the type of bus interface that connects the device to the rest of the system:
uintptr_t bus.pci.base[6]
An array of up to six physical base addresses that correspond to the device's (PCI) aperture bases. This value is defined only if the bus_type is DISP_BUS_TYPE_PCI or DISP_BUS_TYPE_AGP.
uintptr_t bus.pci.apsize[6]
An array of up to six aperture sizes that correspond to the device's (PCI) aperture bases. This value is defined only if the bus_type is DISP_BUS_TYPE_PCI or DISP_BUS_TYPE_AGP.
unsigned short bus.pci.pci_vendor_id
The PCI Vendor Identification number of the device that the driver interfaces with. This value is defined only if the bus_type is DISP_BUS_TYPE_PCI or DISP_BUS_TYPE_AGP.
unsigned short bus.pci.pci_device_id
The PCI Device Identification number of the device that the driver interfaces with. This value is defined only if the bus_type is DISP_BUS_TYPE_PCI or DISP_BUS_TYPE_AGP.
short bus.pci.pci_index
The PCI Index of the device that the driver interfaces with. Together, the three fields pci_vendor_id, pci_device_id, and pci_index uniquely identify a hardware device in the system. This value is defined only if the bus_type is DISP_BUS_TYPE_PCI or DISP_BUS_TYPE_AGP.
struct pci_dev_info *bus.pci.pci_devinfo
A pointer to a structure containing extra PCI device information. For more details, see pci_attach_device() in the QNX Neutrino Library Reference. This value is defined only if the bus_type is DISP_BUS_TYPE_PCI or DISP_BUS_TYPE_AGP, and is present only under QNX Neutrino.
unsigned caps
Capabilities; a bitmap of the following values:

The modeswitcher ORs in the multimonitor safe flag, if appropriate, and the other modules OR in their own capability flags if supported.

FILE *dbgfile
A file pointer that indicates to which file debugging output is to be sent. The disp_perror() and disp_printf() functions send their output to this file, unless its value is NULL.
struct disp_modefuncs *modefuncs
A pointer to a disp_modefuncs_t table containing the modeswitcher's entry points. This member lets the 2D driver invoke certain modeswitcher functionality.
struct disp_memfuncs *memfuncs
A pointer to a disp_memfuncs_t table containing the memory manager's entry points. This member lets the 2D driver allocate and free memory surfaces.
Note: The 2D driver is responsible for freeing any surfaces that it allocates on its own behalf. If the graphics framework asks the 2D driver to allocate any surfaces, the framework explicitly asks the driver to free them.

int adapter_ram
The amount of video RAM on the card, in bytes.
struct vbios_context *vbios
The handle set by vbios_register() that you need to pass to the other vbios_* functions. For more information, see the Libraries chapter.

Classification:

Photon

See also:

disp_memfuncs_t, disp_modefuncs_t


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