Each display driver allocates and
initializes a
phys_displays structure during configuration.
The
phys_displays structure is defined in the
/usr/include/sys/display.h file.
The display driver stores a pointer to the
phys_displays structure
in the display driver's
devsw structure, which is then added
to the device switch table. A pointer to the display driver's
vtmstruct structure
is initialized in the
phys_displays structure when the display
driver's
vttact routine is called. The
phys_displays structure
is defined as follows:
Note: Micro Channelmachines only
run AIX® 5.1 or earlier.
struct phys_displays { /***********************************/
struct { /* data to set up interrupt call */
struct intr intr; /* at init time (i_init) */
long intr_args[4]; /* */
} interrupt_data; /***********************************/
struct phys_displays *same_level; /* other interrupts on same level */
struct phys_displays *next; /* ptr to next minor number data */
struct _gscDev *pGSC; /* device struct used by rcm */
dev_t devno; /* Device number of this adapter */
struct lft *lftanchor;/* lft subsystem */
int dds_length; /* length in bytes */
char *odmdds; /* ptr to define device structure */
struct display_info display_info; /* display information */
uchar disp_devid[4]; /* device information */
/* [1] = 04=display device */
/* [2] = 21=reserved 22=reserved */
/* 25=reserved 27=reserved */
/* 29=reserved */
/* [3] = 00=functional */
/* [4] = 01-04=adapter instance */
uchar usage; /* number of VT's using real screen */
/* used to prevent deletion of */
/* real screen from configuration */
/* if any VT is using it. */
uchar open_cnt; /* Open flag for display */
uchar display_mode; /* Actual state of the display, */
/* not the virtual terminal: */
/* KSR_MODE or MOM_MODE (see vt.h) */
uchar dma_characteristics; /* Attributes related to DMA ops */
# define DMA_SLAVE_DEV 1 /* Device is bus slave, ow. master */
struct font_data *default_font; /* Pointer to the default font for */
/* this display */
struct vtmstruc *visible_vt; /* Pointer to current vt active or */
/* pseudo-active on THIS display */
/***********************************/
/* DMA Data Areas */
/***********************************/
int dma_chan_id; /* channel id returned from d_init */
struct dma_bufs /* DMA buffer structure */
d_dma_area[MAXDMABUFS]; /* */
/***********************************/
/* Rendering Context Manager Areas */
/***********************************/
rcmProcPtr cur_rcm; /* Pointer to current rcm on this */
/* display */
int num_domains; /* number of domains */
int dwa_device; /* supports direct window access */
struct _bmr /* bus memory ranges */
busmemr[MAX_DOMAINS]; /* */
uint io_range; /* Used for MCA adapter only! */
/* low limit in high short */
/* high limit in low short */
/* to match IOCC register */
uint *free_area; /* area free for usage in a device */
/* dependent manner by the VDD */
/* for this real screen. */
#ifndef __64BIT_KERNEL
#define RCM_ACC_METHOD_1 (0L) /* MCA and SGA bus adapters */
#endif
#define RCM_ACC_METHOD_2 (1L) /* 60X and PCI bus adapters */
uint access_method; /* Access method flags */
#ifndef __64BIT_KERNEL
#define RCM_RUBY_NO_MAP (1L) /* Tells RCM to not map the space */
#endif
uint access_flags; /* Misc flags (used for Ruby now) */
uint reserved13[13];
int current_dpm_phase; /* current phase of DPM this display is in */
/* full-on=1, standby=2, suspend=3, off=4 */
#define DPMS_ON 0x1
#define DPMS_STANDBY 0x2
#define DPMS_SUSPEND 0x3
#define DPMS_OFF 0x4
int NumAddrRanges;
rcmAddrRange *AddrRange;
int reserved4;
int (*reserved7)(); /***********************************/
/* VDD Function Pointers */
/***********************************/
int (*vttpwrphase)(); /* power management phase change */
/* function. It's device dependent */
int (*vttact)(); /* Activate the display */
int (*vttcfl)(); /* Move lines around */
int (*vttclr)(); /* Clear a box on screen */
int (*vttcpl)(); /* Copy a part of the line */
int (*vttdact)(); /* Mark the terminal as being */
/* deactivated */
int (*vttddf)(); /* Device dependent functions */
/* i.e. Pacing, context support */
int (*vttdefc)(); /* Change the cursor shape */
int (*vttdma)(); /* Issue dma operation */
int (*vttdma_setup)(); /* Setup dma */
int (*vttterm)(); /* Free any resources used */
/* by this VT */
int (*vttinit)(); /* setup new logical terminal */
int (*vttmovc)(); /* Move the cursor to the */
/* position indicated */
int (*vttrds)(); /* Read a line segment */
int (*vtttext)(); /* Write a string of chars */
int (*vttscr)(); /* Scroll text on the VT */
int (*vttsetm)(); /* Set mode to KSR or MOM */
int (*vttstct)(); /* Change color mappings */
int (*reserved5)(); /* Despite its name, this field is */
/* used for kdb debug */
int (*bind_draw_read_windows)();
/***********************************/
/* RCM Function Pointers */
/***********************************/
int (*make_gp)(); /* Make a graphics process */
int (*unmake_gp)(); /* Unmake a graphics process */
int (*state_change)(); /* State change handler invoked */
int (*update_read_win_geom)();
int (*create_rcx)(); /* Create a hardware context */
int (*delete_rcx)(); /* Delete a hardware context */
#ifdef __64BIT_KERNEL
int (*reserved21)();
int (*reserved22)();
int (*reserved23)();
int (*reserved24)();
#else
int (*create_rcxp)(); /* Create a context part */
int (*delete_rcxp)(); /* Delete a context part */
int (*associate_rcxp)(); /* Link a part to a context */
int (*disassociate_rcxp)(); /* Unlink a part from a context */
#endif
int (*create_win_geom)(); /* Create a window on the screen */
int (*delete_win_geom)(); /* Delete a window on the screen */
int (*update_win_geom)(); /* Update a window on the screen */
#ifdef __64BIT_KERNEL
int (*reserved25)();
int (*reserved26)();
int (*reserved27)();
#else
int (*create_win_attr)(); /* Create a window on the screen */
int (*delete_win_attr)(); /* Delete a window on the screen */
int (*update_win_attr)(); /* Update a window on the screen */
#endif
int (*bind_window)(); /* Update a window bound to rcx */
int (*start_switch)(); /* Start a context switch */
/* Note: This routine runs on */
/* the interrupt level */
int (*end_switch)(); /* Finish the context switch */
/* started by start_switch() */
#ifdef __64BIT_KERNEL
int (*reserved28)();
int (*reserved29)();
int (*reserved30)();
int (*reserved31)();
#else
int (*check_dev)(); /* Check if this address beints */
/* to this device. */
/* Note: this is run on interrupt */
/* level. */
int (*async_mask)(); /* Set async events reporting */
int (*sync_mask)(); /* Set sync events reporting */
int (*enable_event)(); /* Turns adapter function on */
/* without reports to application */
#endif
int (*create_thread)(); /* Make a graphics thread */
int (*delete_thread)(); /* Delete a graphics thread */
void (*give_up_time_slice)(); /* Relinquish remaining time */
#ifdef __64BIT_KERNEL
int (*reserved32)();
#else
int (*diag_svc)(); /* Diagnostics Services (DMA) */
#endif
int (*dev_init)(); /* Device dep. initialization */
#ifdef __64BIT_KERNEL
int (*reserved33)();
#else
int (*dev_term)(); /* Device dep. cleanup */
#endif
/***********************************/
/* Font Support Function Pointers */
/***********************************/
#ifdef __64BIT_KERNEL
int (*reserved34)();
#else
int (*pinned_font_ready)();
#endif
int (*vttddf_fast)(); /* fast ddf functions */
ushort bus_type; /* indicates what type of bus */
#ifndef __64BIT_KERNEL
# define DISP_BUS_MCA 0x8000/* Microchannel */
# define DISP_BUS_SGA 0x4000/* currently not used */
# define DISP_BUS_PPC 0x2000/* processor bus */
# define DISP_PLANAR 0x0800/* planar registers */
#endif
# define DISP_BUS_PCI 0x1000/* PCI bus */
ushort flags; /* physical display flags */
# define GS_DD_DOES_AS_ATT(1L << 0)/* no as_att() by RCM */
/* not currently used */
# define GS_BUS_AUTH_CONTROL(1L << 1)/* Request bus access ctrl */
# define GS_HAS_INTERRUPT_HANDLER (1L << 2)/* 1 after i_init() */
/* 0 after i_clear() */
/* not currently used */
# define GS_DD_SUPPORTS_MP (1L << 3)
uint reserved11[5]; /* not used */
int ear; /* image for EAR reg (xferdata) if !0 */
uint spares[18]; /* not used - for future development */
};