1*0b733c9cSJérôme Duval /* 2*0b733c9cSJérôme Duval * Copyright 2005-2012, Axel Dörfler, axeld@pinc-software.de. 3*0b733c9cSJérôme Duval * Copyright 2016, Jessica Hamilton, jessica.l.hamilton@gmail.com 4*0b733c9cSJérôme Duval * All rights reserved. Distributed under the terms of the MIT License. 5*0b733c9cSJérôme Duval */ 6*0b733c9cSJérôme Duval 7*0b733c9cSJérôme Duval 8*0b733c9cSJérôme Duval #include "accelerant_protos.h" 9*0b733c9cSJérôme Duval #include "accelerant.h" 10*0b733c9cSJérôme Duval 11*0b733c9cSJérôme Duval #include <new> 12*0b733c9cSJérôme Duval 13*0b733c9cSJérôme Duval 14*0b733c9cSJérôme Duval extern "C" void* get_accelerant_hook(uint32 feature,void * data)15*0b733c9cSJérôme Duvalget_accelerant_hook(uint32 feature, void* data) 16*0b733c9cSJérôme Duval { 17*0b733c9cSJérôme Duval switch (feature) { 18*0b733c9cSJérôme Duval /* general */ 19*0b733c9cSJérôme Duval case B_INIT_ACCELERANT: 20*0b733c9cSJérôme Duval return (void*)virtio_gpu_init_accelerant; 21*0b733c9cSJérôme Duval case B_UNINIT_ACCELERANT: 22*0b733c9cSJérôme Duval return (void*)virtio_gpu_uninit_accelerant; 23*0b733c9cSJérôme Duval case B_CLONE_ACCELERANT: 24*0b733c9cSJérôme Duval return (void*)virtio_gpu_clone_accelerant; 25*0b733c9cSJérôme Duval case B_ACCELERANT_CLONE_INFO_SIZE: 26*0b733c9cSJérôme Duval return (void*)virtio_gpu_accelerant_clone_info_size; 27*0b733c9cSJérôme Duval case B_GET_ACCELERANT_CLONE_INFO: 28*0b733c9cSJérôme Duval return (void*)virtio_gpu_get_accelerant_clone_info; 29*0b733c9cSJérôme Duval case B_GET_ACCELERANT_DEVICE_INFO: 30*0b733c9cSJérôme Duval return (void*)virtio_gpu_get_accelerant_device_info; 31*0b733c9cSJérôme Duval case B_ACCELERANT_RETRACE_SEMAPHORE: 32*0b733c9cSJérôme Duval return (void*)virtio_gpu_accelerant_retrace_semaphore; 33*0b733c9cSJérôme Duval 34*0b733c9cSJérôme Duval /* mode configuration */ 35*0b733c9cSJérôme Duval case B_ACCELERANT_MODE_COUNT: 36*0b733c9cSJérôme Duval return (void*)virtio_gpu_accelerant_mode_count; 37*0b733c9cSJérôme Duval case B_GET_MODE_LIST: 38*0b733c9cSJérôme Duval return (void*)virtio_gpu_get_mode_list; 39*0b733c9cSJérôme Duval case B_GET_PREFERRED_DISPLAY_MODE: 40*0b733c9cSJérôme Duval return (void*)virtio_gpu_get_preferred_mode; 41*0b733c9cSJérôme Duval case B_SET_DISPLAY_MODE: 42*0b733c9cSJérôme Duval return (void*)virtio_gpu_set_display_mode; 43*0b733c9cSJérôme Duval case B_GET_DISPLAY_MODE: 44*0b733c9cSJérôme Duval return (void*)virtio_gpu_get_display_mode; 45*0b733c9cSJérôme Duval case B_GET_EDID_INFO: 46*0b733c9cSJérôme Duval return (void*)virtio_gpu_get_edid_info; 47*0b733c9cSJérôme Duval case B_GET_FRAME_BUFFER_CONFIG: 48*0b733c9cSJérôme Duval return (void*)virtio_gpu_get_frame_buffer_config; 49*0b733c9cSJérôme Duval case B_GET_PIXEL_CLOCK_LIMITS: 50*0b733c9cSJérôme Duval return (void*)virtio_gpu_get_pixel_clock_limits; 51*0b733c9cSJérôme Duval } 52*0b733c9cSJérôme Duval 53*0b733c9cSJérôme Duval return NULL; 54*0b733c9cSJérôme Duval } 55*0b733c9cSJérôme Duval 56