1*87313834SIngo Weinhold /*****************************************************************************\ 2*87313834SIngo Weinhold * Tseng Labs ET6000, ET6100 and ET6300 graphics driver for BeOS 5. 3*87313834SIngo Weinhold * Copyright (c) 2003-2004, Evgeniy Vladimirovich Bobkov. 4*87313834SIngo Weinhold \*****************************************************************************/ 5*87313834SIngo Weinhold 6*87313834SIngo Weinhold #include "generic.h" 7*87313834SIngo Weinhold 8*87313834SIngo Weinhold 9*87313834SIngo Weinhold /*****************************************************************************/ 10*87313834SIngo Weinhold /* 11*87313834SIngo Weinhold * The standard entry point. Given a uint32 feature identifier, this routine 12*87313834SIngo Weinhold * returns a pointer to the function that implements the feature. Some features 13*87313834SIngo Weinhold * require more information than just the identifier to select the proper 14*87313834SIngo Weinhold * function. The extra information (which is specific to the feature) is 15*87313834SIngo Weinhold * pointed at by the void *data parameter. By default, no extra information 16*87313834SIngo Weinhold * is available. Any extra information available to choose the function will 17*87313834SIngo Weinhold * be noted on a case by case below. 18*87313834SIngo Weinhold */ get_accelerant_hook(uint32 feature,void * data)19*87313834SIngo Weinholdvoid *get_accelerant_hook(uint32 feature, void *data) { 20*87313834SIngo Weinhold /* These definition is out of pure lazyness.*/ 21*87313834SIngo Weinhold #define HOOK(x) case B_##x: return (void *)x 22*87313834SIngo Weinhold 23*87313834SIngo Weinhold switch (feature) { 24*87313834SIngo Weinhold 25*87313834SIngo Weinhold /* 26*87313834SIngo Weinhold * One of either B_INIT_ACCELERANT or B_CLONE_ACCELERANT will be 27*87313834SIngo Weinhold * requested and subsequently called before any other hook is 28*87313834SIngo Weinhold * requested. All other feature hook selections can be predicated 29*87313834SIngo Weinhold * on variables assigned during the accelerant initialization process. 30*87313834SIngo Weinhold */ 31*87313834SIngo Weinhold /* initialization */ 32*87313834SIngo Weinhold HOOK(INIT_ACCELERANT); 33*87313834SIngo Weinhold HOOK(CLONE_ACCELERANT); 34*87313834SIngo Weinhold 35*87313834SIngo Weinhold HOOK(ACCELERANT_CLONE_INFO_SIZE); 36*87313834SIngo Weinhold HOOK(GET_ACCELERANT_CLONE_INFO); 37*87313834SIngo Weinhold HOOK(UNINIT_ACCELERANT); 38*87313834SIngo Weinhold HOOK(GET_ACCELERANT_DEVICE_INFO); 39*87313834SIngo Weinhold 40*87313834SIngo Weinhold /// HOOK(ACCELERANT_RETRACE_SEMAPHORE); /* Not implemented. Would be useful to have it implemented. */ 41*87313834SIngo Weinhold 42*87313834SIngo Weinhold /* mode configuration */ 43*87313834SIngo Weinhold HOOK(ACCELERANT_MODE_COUNT); 44*87313834SIngo Weinhold HOOK(GET_MODE_LIST); 45*87313834SIngo Weinhold /// HOOK(PROPOSE_DISPLAY_MODE); 46*87313834SIngo Weinhold HOOK(SET_DISPLAY_MODE); 47*87313834SIngo Weinhold HOOK(GET_DISPLAY_MODE); 48*87313834SIngo Weinhold HOOK(GET_FRAME_BUFFER_CONFIG); 49*87313834SIngo Weinhold HOOK(GET_PIXEL_CLOCK_LIMITS); 50*87313834SIngo Weinhold 51*87313834SIngo Weinhold /* synchronization */ 52*87313834SIngo Weinhold HOOK(ACCELERANT_ENGINE_COUNT); 53*87313834SIngo Weinhold HOOK(ACQUIRE_ENGINE); 54*87313834SIngo Weinhold HOOK(RELEASE_ENGINE); 55*87313834SIngo Weinhold HOOK(WAIT_ENGINE_IDLE); 56*87313834SIngo Weinhold HOOK(GET_SYNC_TOKEN); 57*87313834SIngo Weinhold HOOK(SYNC_TO_TOKEN); 58*87313834SIngo Weinhold 59*87313834SIngo Weinhold /* 2D acceleration */ 60*87313834SIngo Weinhold HOOK(SCREEN_TO_SCREEN_BLIT); 61*87313834SIngo Weinhold HOOK(FILL_RECTANGLE); 62*87313834SIngo Weinhold } 63*87313834SIngo Weinhold 64*87313834SIngo Weinhold /* Return a null pointer for any feature we don't understand. */ 65*87313834SIngo Weinhold return 0; 66*87313834SIngo Weinhold 67*87313834SIngo Weinhold #undef HOOK 68*87313834SIngo Weinhold } 69*87313834SIngo Weinhold /*****************************************************************************/ 70