📄 libfbx-mga-misc.c
字号:
/* * libfbx-mga-misc.c -- Miscellaneous routines for mga optimizations * (C)opyright 2001 U4X Labs * * Written by: Paul Mundt <lethal@u4xlabs.com> * * $Id: libfbx-mga-misc.c,v 1.6 2001/03/03 01:34:43 lethal Exp $ * * This is the place for all the mga hardware specific * optimizations for the libfbx system go. * * See ChangeLog for modifications, CREDITS for credits. * * All source herein is copyright U4X Labs and its original author. * Any code modifications or additions are (C)opyright the original * author and U4X Labs respectively. * * libfbx is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * libfbx is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with libfbx; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */#include <libfbx/libfbx-drivers.h>#include <libfbx/drivers/libfbx-mga.h>inline void mga_wait_idle(){ do { } while (fb_inl(M_STATUS) & 0x10000);}inline void mga_fifo(__u8 val){ /* * There's no need to do a seperate loop for little * endian using mga_inb(). The compiler should be able * to determine if it needs %al or %eax & 0xff. * * Also, on some little endian architectures (alpha * for example), mga_inl() is a better solution than * mga_inb(). * * This was discovered by Petr Vandrovec <vandrove@vc.cvut.cz> */ do { } while ((fb_inl(M_FIFOSTATUS) & 0xff) < val);}inline void mga_ydstlen(__u32 y, __u32 l){ fb_outl(M_YDSTLEN | M_EXEC, (y << 16) | l);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -