/* * (c) 2010, SWD Embedded Systems Limited, http://www.kpda.ru */ /* * The "vesabios" driver - hands off all drawing functionality to the * Flat Frame Buffer library. */ #include "vesabios.h" #include int vesa_misc_wait_idle(disp_adapter_t *adapter) { return 0; } int vesa_draw_init(disp_adapter_t *adapter, char *optstring) { return 0; } void vesa_fini(disp_adapter_t *adapter) { } void vesa_module_info(disp_adapter_t *adapter, disp_module_info_t *info) { info->description = "vesa - unaccelerated driver " "for VESA 2.00 compliant adapters"; info->ddk_version_major = DDK_VERSION_MAJOR; info->ddk_version_minor = DDK_VERSION_MINOR; info->ddk_rev = DDK_REVISION; info->driver_rev = 0; } int devg_get_miscfuncs(disp_adapter_t *adapter, disp_draw_miscfuncs_t *funcs, int tabsize) { DISP_ADD_FUNC(disp_draw_miscfuncs_t, funcs, init, vesa_draw_init, tabsize); DISP_ADD_FUNC(disp_draw_miscfuncs_t, funcs, fini, vesa_fini, tabsize); DISP_ADD_FUNC(disp_draw_miscfuncs_t, funcs, module_info, vesa_module_info, tabsize); DISP_ADD_FUNC(disp_draw_miscfuncs_t, funcs, get_2d_caps, ffb_get_2d_caps, tabsize); DISP_ADD_FUNC(disp_draw_miscfuncs_t, funcs, get_corefuncs_sw, ffb_get_corefuncs, tabsize); DISP_ADD_FUNC(disp_draw_miscfuncs_t, funcs, get_contextfuncs_sw, ffb_get_contextfuncs, tabsize); DISP_ADD_FUNC(disp_draw_miscfuncs_t, funcs, attach_external, vesa_attach_external, tabsize); DISP_ADD_FUNC(disp_draw_miscfuncs_t, funcs, detach_external, vesa_detach_external, tabsize); DISP_ADD_FUNC(disp_draw_miscfuncs_t, funcs, recover, vesa_recover, tabsize); DISP_ADD_FUNC(disp_draw_miscfuncs_t, funcs, wait_idle, vesa_misc_wait_idle, tabsize); return 0; } int devg_get_corefuncs(disp_adapter_t *adapter, unsigned pixel_format, disp_draw_corefuncs_t *funcs, int tabsize) { return ffb_get_corefuncs(adapter, pixel_format, funcs, tabsize); } int devg_get_contextfuncs(disp_adapter_t *adapter, disp_draw_contextfuncs_t *funcs, int tabsize) { return ffb_get_contextfuncs(adapter, funcs, tabsize); } /* * Set up things so that miscfuncs, corefuncs and contextfuncs * can be called by an external process. */ int vesa_attach_external(disp_adapter_t *adapter, disp_aperture_t aper[]) { vb_context_t *vb_ctx = adapter->shmem; adapter->ms_ctx = vb_ctx; return 0; } int vesa_detach_external(disp_adapter_t *adapter) { return 0; } /* * Called when a client process terminated unexpectedly. This could have * happened in the middle of adding draw commands to the ring buffer. * Reset the ring buffer so any partial draw commands are not sent to * the Radeon. */ int vesa_recover(disp_adapter_t *adapter) { return 0; }