Description of the graphics hardware's adapter
#include <display.h>
typedef struct disp_adapter {
...
} disp_adapter_t;
This structure describes the graphics hardware's adapter.
There's one instance of this structure for each device.
|
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:
- DISP_BUS_TYPE_UNKNOWN -- the driver can't determine
the type of bus to which the device is connected, or the bus type isn't
one of the following.
- DISP_BUS_TYPE_PCI -- the device is connected to a
PCI bus.
- DISP_BUS_TYPE_AGP -- the device is connected to an
AGP bus.
- DISP_BUS_TYPE_ISA -- device is connected to an ISA
bus.
- DISP_BUS_TYPE_VL -- device is connected to a
VESA local bus.
- 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:
- DISP_CAP_MULTI_MONITOR_SAFE -- the card can work
with other VGA cards in the same system
- DISP_CAP_2D_ACCEL -- the device provides
2D driver acceleration
- DISP_CAP_3D_ACCEL -- the device provides
3D driver acceleration
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.
|
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.
Photon
disp_memfuncs_t,
disp_modefuncs_t