1e0ee3b79SGerald Zajac /* 2e0ee3b79SGerald Zajac * Copyright 2008-2012 Haiku, Inc. All rights reserved. 3e0ee3b79SGerald Zajac * Distributed under the terms of the MIT license. 4e0ee3b79SGerald Zajac * 5e0ee3b79SGerald Zajac * Authors: 6e0ee3b79SGerald Zajac * Gerald Zajac 7e0ee3b79SGerald Zajac */ 8e0ee3b79SGerald Zajac 9*0e8316ccSAlexander von Gluck IV 10e0ee3b79SGerald Zajac #include "accelerant.h" 11e0ee3b79SGerald Zajac 12e0ee3b79SGerald Zajac 13e0ee3b79SGerald Zajac extern "C" void* get_accelerant_hook(uint32 feature,void * data)14e0ee3b79SGerald Zajacget_accelerant_hook(uint32 feature, void* data) 15e0ee3b79SGerald Zajac { 16*0e8316ccSAlexander von Gluck IV (void)data; 17*0e8316ccSAlexander von Gluck IV // avoid compiler warning for unused arg 18e0ee3b79SGerald Zajac 19e0ee3b79SGerald Zajac switch (feature) { 20e0ee3b79SGerald Zajac // General 21e0ee3b79SGerald Zajac case B_INIT_ACCELERANT: 22e0ee3b79SGerald Zajac return (void*)InitAccelerant; 23e0ee3b79SGerald Zajac case B_UNINIT_ACCELERANT: 24e0ee3b79SGerald Zajac return (void*)UninitAccelerant; 25e0ee3b79SGerald Zajac case B_CLONE_ACCELERANT: 26e0ee3b79SGerald Zajac return (void*)CloneAccelerant; 27e0ee3b79SGerald Zajac case B_ACCELERANT_CLONE_INFO_SIZE: 28e0ee3b79SGerald Zajac return (void*)AccelerantCloneInfoSize; 29e0ee3b79SGerald Zajac case B_GET_ACCELERANT_CLONE_INFO: 30e0ee3b79SGerald Zajac return (void*)GetAccelerantCloneInfo; 31e0ee3b79SGerald Zajac case B_GET_ACCELERANT_DEVICE_INFO: 32e0ee3b79SGerald Zajac return (void*)GetAccelerantDeviceInfo; 33e0ee3b79SGerald Zajac case B_ACCELERANT_RETRACE_SEMAPHORE: 34e0ee3b79SGerald Zajac return NULL; 35e0ee3b79SGerald Zajac 36e0ee3b79SGerald Zajac // Mode Configuration 37e0ee3b79SGerald Zajac case B_ACCELERANT_MODE_COUNT: 38e0ee3b79SGerald Zajac return (void*)AccelerantModeCount; 39e0ee3b79SGerald Zajac case B_GET_MODE_LIST: 40e0ee3b79SGerald Zajac return (void*)GetModeList; 41e0ee3b79SGerald Zajac case B_PROPOSE_DISPLAY_MODE: 42e0ee3b79SGerald Zajac return (void*)ProposeDisplayMode; 43e0ee3b79SGerald Zajac case B_SET_DISPLAY_MODE: 44e0ee3b79SGerald Zajac return (void*)SetDisplayMode; 45e0ee3b79SGerald Zajac case B_GET_DISPLAY_MODE: 46e0ee3b79SGerald Zajac return (void*)GetDisplayMode; 47e0ee3b79SGerald Zajac #ifdef __HAIKU__ 48e0ee3b79SGerald Zajac case B_GET_EDID_INFO: 49e0ee3b79SGerald Zajac return (void*)GetEdidInfo; 50e0ee3b79SGerald Zajac #endif 51e0ee3b79SGerald Zajac case B_GET_FRAME_BUFFER_CONFIG: 52e0ee3b79SGerald Zajac return (void*)GetFrameBufferConfig; 53e0ee3b79SGerald Zajac case B_GET_PIXEL_CLOCK_LIMITS: 54e0ee3b79SGerald Zajac return (void*)GetPixelClockLimits; 55e0ee3b79SGerald Zajac case B_MOVE_DISPLAY: 56e0ee3b79SGerald Zajac return (void*)MoveDisplay; 57e0ee3b79SGerald Zajac case B_SET_INDEXED_COLORS: 58e0ee3b79SGerald Zajac return (void*)(I810_SetIndexedColors); 59e0ee3b79SGerald Zajac case B_GET_TIMING_CONSTRAINTS: 60e0ee3b79SGerald Zajac return NULL; 61e0ee3b79SGerald Zajac 62e0ee3b79SGerald Zajac // DPMS 63e0ee3b79SGerald Zajac case B_DPMS_CAPABILITIES: 64e0ee3b79SGerald Zajac return (void*)(I810_DPMSCapabilities); 65e0ee3b79SGerald Zajac case B_DPMS_MODE: 66e0ee3b79SGerald Zajac return (void*)(I810_GetDPMSMode); 67e0ee3b79SGerald Zajac case B_SET_DPMS_MODE: 68e0ee3b79SGerald Zajac return (void*)(I810_SetDPMSMode); 69e0ee3b79SGerald Zajac 70e0ee3b79SGerald Zajac // Engine Management 71e0ee3b79SGerald Zajac case B_ACCELERANT_ENGINE_COUNT: 72e0ee3b79SGerald Zajac return (void*)AccelerantEngineCount; 73e0ee3b79SGerald Zajac case B_ACQUIRE_ENGINE: 74e0ee3b79SGerald Zajac return (void*)AcquireEngine; 75e0ee3b79SGerald Zajac case B_RELEASE_ENGINE: 76e0ee3b79SGerald Zajac return (void*)ReleaseEngine; 77e0ee3b79SGerald Zajac case B_WAIT_ENGINE_IDLE: 78e0ee3b79SGerald Zajac return (void*)WaitEngineIdle; 79e0ee3b79SGerald Zajac case B_GET_SYNC_TOKEN: 80e0ee3b79SGerald Zajac return (void*)GetSyncToken; 81e0ee3b79SGerald Zajac case B_SYNC_TO_TOKEN: 82e0ee3b79SGerald Zajac return (void*)SyncToToken; 83e0ee3b79SGerald Zajac } 84e0ee3b79SGerald Zajac 85e0ee3b79SGerald Zajac return NULL; // Return null pointer for any feature not handled above 86e0ee3b79SGerald Zajac } 87