LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1097|回复: 3

BLFS compile Xorg for i180(915GM) trouble shooting

[复制链接]
发表于 2006-11-25 19:36:01 | 显示全部楼层 |阅读模式
...未完...

这是安装 BLFS 的一部分,首先按照文档安装 Xorg-6.8.2,但是在编译时出错,出错信息如下:
fbmmx.c: In function 'negate':
fbmmx.c:107: error: incompatible type for argument 1
of '__builtin_ia32_pxor'
fbmmx.c:107: error: incompatible type for argument 2
of '__builtin_ia32_pxor'
fbmmx.c: In function 'expand_alpha':
fbmmx.c:166: error: incompatible type for argument 1
of '__builtin_ia32_por'
fbmmx.c:166: error: incompatible type for argument 2
of '__builtin_ia32_por'
fbmmx.c:166: error: incompatible types in assignment
fbmmx.c:168: error: incompatible type for argument 1
of '__builtin_ia32_por'
fbmmx.c:168: error: incompatible type for argument 2
of '__builtin_ia32_por'
fbmmx.c:168: error: incompatible types in assignment
fbmmx.c: In function 'expand_alpha_rev':
fbmmx.c:181: error: incompatible type for argument 1
of '__builtin_ia32_por'
fbmmx.c:181: error: incompatible type for argument 2
of '__builtin_ia32_por'
fbmmx.c:181: error: incompatible types in assignment
fbmmx.c:183: error: incompatible type for argument 1
of '__builtin_ia32_por'
fbmmx.c:183: error: incompatible type for argument 2
of '__builtin_ia32_por'
fbmmx.c:183: error: incompatible types in assignment
fbmmx.c: In function 'invert_colors':
fbmmx.c:195: error: incompatible type for argument 1
of '__builtin_ia32_pand'
fbmmx.c:195: error: incompatible type for argument 2
of '__builtin_ia32_pand'
fbmmx.c:195: error: incompatible types in assignment
fbmmx.c:196: error: incompatible type for argument 1
of '__builtin_ia32_pand'
fbmmx.c:196: error: incompatible type for argument 2
of '__builtin_ia32_pand'
fbmmx.c:196: error: incompatible types in assignment
fbmmx.c:197: error: incompatible type for argument 1
of '__builtin_ia32_pand'
fbmmx.c:197: error: incompatible type for argument 2
of '__builtin_ia32_pand'
fbmmx.c:197: error: incompatible types in assignment
fbmmx.c:202: error: incompatible type for argument 1
of '__builtin_ia32_por'
fbmmx.c:202: error: incompatible type for argument 2
of '__builtin_ia32_por'
fbmmx.c:202: error: incompatible types in assignment
fbmmx.c:203: error: incompatible type for argument 1
of '__builtin_ia32_por'
fbmmx.c:203: error: incompatible type for argument 2
of '__builtin_ia32_por'
fbmmx.c:203: error: incompatible types in assignment
fbmmx.c: In function 'over_rev_non_pre':
fbmmx.c:237: error: incompatible type for argument 1
of '__builtin_ia32_por'
fbmmx.c:237: error: incompatible type for argument 2
of '__builtin_ia32_por'
fbmmx.c: In function 'expand565':
fbmmx.c:300: warning: ISO C90 forbids mixed
declarations and code
fbmmx.c:303: error: incompatible type for argument 1
of '__builtin_ia32_por'
fbmmx.c:303: error: incompatible type for argument 2
of '__builtin_ia32_por'
fbmmx.c:303: error: incompatible types in assignment
fbmmx.c:304: error: incompatible type for argument 1
of '__builtin_ia32_por'
fbmmx.c:304: error: incompatible type for argument 2
of '__builtin_ia32_por'
fbmmx.c:304: error: incompatible types in assignment
fbmmx.c:305: error: incompatible type for argument 1
of '__builtin_ia32_pand'
fbmmx.c:305: error: incompatible type for argument 2
of '__builtin_ia32_pand'
fbmmx.c:305: error: incompatible types in assignment
fbmmx.c: In function 'pack565':
fbmmx.c:327: error: incompatible type for argument 1
of '__builtin_ia32_pand'
fbmmx.c:327: error: incompatible type for argument 2
of '__builtin_ia32_pand'
fbmmx.c:327: error: incompatible types in assignment
fbmmx.c:328: error: incompatible type for argument 1
of '__builtin_ia32_pand'
fbmmx.c:328: error: incompatible type for argument 2
of '__builtin_ia32_pand'
fbmmx.c:328: error: incompatible types in assignment
fbmmx.c:329: error: incompatible type for argument 1
of '__builtin_ia32_pand'
fbmmx.c:329: error: incompatible type for argument 2
of '__builtin_ia32_pand'
fbmmx.c:329: error: incompatible types in assignment
fbmmx.c:336: error: incompatible type for argument 1
of '__builtin_ia32_pand'
fbmmx.c:336: error: incompatible type for argument 2
of '__builtin_ia32_pand'
fbmmx.c:336: error: incompatible types in assignment
fbmmx.c:338: error: incompatible type for argument 1
of '__builtin_ia32_pand'
fbmmx.c:338: error: incompatible type for argument 2
of '__builtin_ia32_pand'
fbmmx.c:338: error: incompatible types in assignment
fbmmx.c:340: error: incompatible type for argument 1
of '__builtin_ia32_pand'
fbmmx.c:340: error: incompatible type for argument 2
of '__builtin_ia32_pand'
fbmmx.c:340: error: incompatible types in assignment
fbmmx.c:342: error: incompatible type for argument 1
of '__builtin_ia32_pand'
fbmmx.c:342: error: incompatible type for argument 2
of '__builtin_ia32_pand'
fbmmx.c:342: error: incompatible types in assignment
fbmmx.c:344: error: incompatible type for argument 1
of '__builtin_ia32_por'
fbmmx.c:344: error: incompatible type for argument 2
of '__builtin_ia32_por'
fbmmx.c:344: error: incompatible types in assignment
fbmmx.c:345: error: incompatible type for argument 1
of '__builtin_ia32_por'
fbmmx.c:345: error: incompatible type for argument 2
of '__builtin_ia32_por'
fbmmx.c:345: error: incompatible types in assignment
fbmmx.c:347: error: incompatible type for argument 1
of '__builtin_ia32_por'
fbmmx.c:347: error: incompatible type for argument 2
of '__builtin_ia32_por'
fbmmx.c: In function
'fbCompositeSolidMask_nx8x8888mmx':
fbmmx.c:652: warning: ISO C90 does not support 'long
long'
fbmmx.c:695: warning: ISO C90 does not support 'long
long'
fbmmx.c: In function
'fbCompositeSolidMask_nx8x0565mmx':
fbmmx.c:758: warning: ISO C90 does not support 'long
long'
fbmmx.c:818: warning: ISO C90 does not support 'long
long'
make[5]: *** [fbmmx.o] Error 1
make[5]: Leaving directory
`/usr/src/Xorg/xc/programs/Xserver/fb'
make[4]: *** [fb] Error 2
make[4]: Leaving directory
`/usr/src/Xorg/xc/programs/Xserver'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/usr/src/Xorg/xc/programs'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/Xorg/xc'
make[1]: *** [World] Error 2
make[1]: Leaving directory `/usr/src/Xorg/xc'
make: *** [World] Error 2

这里:
http://linuxfromscratch.org/pipe ... -August/060856.html
http://linuxfromscratch.org/pipe ... -August/060858.html
提供了解决方法,就是使用 Xorg-6.9.0。

于是编译安装 Xorg-6.9.0 成功,但是安装安装提示运行:
# Xorg -configure
时出错:

Fatal server error:
Cannot open log file "/var/log/Xorg.0.log"

Please consult the The X.Org Foundation support
at http://wiki.X.Org
for help.

/var/log 的权限是没有问题的,问题出在 /usr/X11R6/bin/Xorg 上,因为是基于用户的包管理,所以其属主是 Xorg,但 X 需要 root+suid,所以运行时属主变成了 Xorg,当然没有权限写 /var/log/

于是更改 Xorg 属主:
# chown root /usr/X11R6/bin/Xorg
# chmod u+s /usr/X11R6/bin/Xorg

再次运行,得到如下的错误:

(II) LoadModule: "apm"
(II) Loading /usr/X11R6/lib/modules/drivers/apm_drv.so
dlopen: /usr/X11R6/lib/modules/drivers/apm_drv.so: undefined symbol: XvRTPort
(EE) Failed to load /usr/X11R6/lib/modules/drivers/apm_drv.so
(II) UnloadModule: "apm"
(EE) Failed to load module "apm" (loader failed, 7)

使用 X -config /root/xorg.conf.new 则黑屏,键盘无反应,只能关机。

如果仅从上面的提示来提示来看,则会步入误区,因为实际上 apm 模块并没有实质性的影响,它是电源管理的一部分:
Xorg wiki FAQ

正确的做法是,耐心查看由于运行 startx(Xorg -config ~/xorg.conf.new) 而产生的 /var/log/Xorg.0.log,查找其中所有"error","failed"等可能会是一个比较快捷的方式。因为问题很可能是出在芯片组的驱动上。

log 的内容比较多,但是其中可以看到如下几行:

drmOpenDevice: Open failed
[drm] failed to load kernel module "i915"
(II) I810(0): [drm] drmOpen failed
(EE) I810(0): [dri] DRIScreenInit failed. Disabling DRI.
...
Fatal server error:
Caught signal 11. Server aborting


提示找不到内核的 i915 模块,虽然 /lib/modules 中实际上是有这个模块的。因为之前的内核是我直接从主系统拷贝过去的,包括 initrd-$kernel.img 和 /lib/modules/$kernel 以及 /etc/modprobe.conf,所以问题可能就出在这里。

于是重新编译内核。注意在主系统下用 chroot 来进行编译和启动到 LFS 系统下进行编译可能会有差异,我两次都试过,用 md5sum 校验发现不同。建议启动到 LFS 系统进行编译。可能 Xorg 也需要重新编译,移除原来的 /usr/X11R6/bin/Xorg,运行:
# userpack install -a Xorg-6.9.0
即可。

编译内核时,LFS 没有 initrd,所以一些重要模块如 ext3, jbd, scsi 等需要编译到内核中,我写在了这里:
LFS kernel compling

这次启动 X 没有彻底黑屏,键盘还有响应,也可以按 3 键(CTRL+ALT+DEL)重启,但总的来说还是没有成功。有如下报错:
# Xorg -configure

dlopen: /usr/X11R6/lib/modules/drivers/apm_drv.so: undefined symbol: XvRTPort
(EE) Failed to load /usr/X11R6/lib/modules/drivers/apm_drv.so
(EE) Failed to load module "apm" (loader failed, 7)
(++) Using config file: "/root/xorg.conf.new"
(WW) I810: No matching Device section for instance (BusID PCI:0:2:1) found
(WW) ****INVALID MEM ALLOCATION**** b: 0xffe80000 e: 0xffefffff correcting^G
(WW) ****INVALID MEM ALLOCATION**** b: 0xffe40000 e: 0xffe7ffff correcting^G

Xorg detected your mouse at device /dev/mouse.
Please check your config if the mouse is still not
operational, as by default Xorg tries to autodetect
the protocol.

Your xorg.conf file is /root/xorg.conf.new

To test the server, run 'X -config /root/xorg.conf.new'


# X -config ~/xorg.conf.new

...
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: Open failed
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: Open failed
drmOpenByBusid: Searching for BusID pci:0000:00:02.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 11, (OK)
drmOpenByBusid: drmOpenMinor returns 11
drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
...
(WW) I810(0): Extended BIOS function 0x5f05 failed.
...
Fatal server error:
Caught signal 11. Server aborting


"(WW) I810: No matching Device section for instance (BusID PCI:0:2:1) found"这个错误并没有什么关系,可以看这里:
Xorg wiki FAQ
用 lspci 可以看到这一点:

00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 04)
00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 04)
00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 04)

所以虽然 0:2:1 找不到,但 0:2:0 可以,如果真的找不到,一般会报告"No screen found"的错误。

只能换一种思路。现尝试编辑配置文件,将 i810 换成 vesa 试试:
# vi /etc/X11/xorg.conf

Section"Device"
    Identifier  "Card0"
    Driver      "vesa"
    # Driver        "i810"
    VendorName  "Intel Corporation"
    BoardName   "Mobile 915GM/GMS/910GML Express Graphics Controller"
    BusID       "CI:0:2:0"
EndSection

这时候是可以启动 X 的,但只能以 root 身份运行,并且不能解决宽屏问题(915resolution)。

再尝试通过运行 xorgconfig 来获得一个配置文件(先将原来的文件备份),将其 Driver 改成 i810,在运行 915resolution 49 1280 768 之后,startx 竟然可以看到正确的长宽比,但之后就基本上没有什么响应了,twm 的窗口无法正常显示,点击鼠标只显示一些绿色的条纹。

我开始估计是窗口管理器的问题,于是接着安装其他的包,直到将 xfce4 安装之后,再进入 startx,这次可以看到正确的显示了,包括上下两个 panel,但是机器却好像越来越慢,点出来的菜单无法再隐藏,直至最后失去响应。

再使用 vesa 模块,基本上可以,但仍然不能以普通用户身份运行 startx。

所以现在是三个问题:
(1) i810 driver 的问题
(2) normal user startx 的问题
(3) vesa 1280x768

(1)的 Xorg.0.log:

Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/local/, removing from list!
ADVANCE_LP_RING: outring (0x27) isn't on a QWord boundary(WW) I810(0): Fixing display offsets.
ADVANCE_LP_RING: outring (0x2f) isn't on a QWord boundary(WW) I810(0): Fixing display offsets.
ADVANCE_LP_RING: outring (0x37) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x3f) isn't on a QWord boundaryADVANCE_LP_RING: outring
(0x57) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x5f) isn't on a QWord boundary(WW) I810(0): Fixing display offsets.
ADVANCE_LP_RING: outring (0x67) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x87) isn't on a QWord boundaryADVANCE_LP_RING: outring
(0x8f) isn't on a QWord boundaryADVANCE_LP_RING: outring (0xaf) isn't on a QWord boundaryADVANCE_LP_RING: outring (0xb7) isn't on a QWord
boundaryADVANCE_LP_RING: outring (0xcf) isn't on a QWord boundaryADVANCE_LP_RING: outring (0xe7) isn't on a QWord boundaryADVANCE_LP_RING
: outring (0xff) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x117) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x12f) isn't
on a QWord boundaryADVANCE_LP_RING: outring (0x147) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x15f) isn't on a QWord boundaryAD
VANCE_LP_RING: outring (0x177) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x18f) isn't on a QWord boundaryADVANCE_LP_RING: outring
(0x1a7) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x1bf) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x1d7) isn't on a QW
ord boundaryADVANCE_LP_RING: outring (0x1ef) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x207) isn't on a QWord boundaryADVANCE_LP
_RING: outring (0x21f) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x237) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x24f)
isn't on a QWord boundaryADVANCE_LP_RING: outring (0x267) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x27f) isn't on a QWord boun
daryADVANCE_LP_RING: outring (0x297) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x2af) isn't on a QWord boundaryADVANCE_LP_RING: o
utring (0x2c7) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x2df) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x2f7) isn't o
n a QWord boundaryADVANCE_LP_RING: outring (0x30f) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x327) isn't on a QWord boundaryADVA
NCE_LP_RING: outring (0x33f) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x357) isn't on a QWord boundaryADVANCE_LP_RING: outring (
0x36f) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x387) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x39f) isn't on a QWor
d boundaryADVANCE_LP_RING: outring (0x3b7) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x3cf) isn't on a QWord boundaryADVANCE_LP_R
ING: outring (0x3e7) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x3ff) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x417) i
sn't on a QWord boundaryADVANCE_LP_RING: outring (0x42f) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x447) isn't on a QWord bounda
ryADVANCE_LP_RING: outring (0x45f) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x467) isn't on a QWord boundary(WW) I810(0): Fixing
display offsets.
ADVANCE_LP_RING: outring (0x46f) isn't on a QWord boundary(WW) I810(0): Fixing display offsets.
ADVANCE_LP_RING: outring (0x477) isn't on a QWord boundary(WW) I810(0): Fixing display offsets.
ADVANCE_LP_RING: outring (0x47f) isn't on a QWord boundary(WW) I810(0): Fixing display offsets.
ADVANCE_LP_RING: outring (0x487) isn't on a QWord boundary(WW) I810(0): Fixing display offsets.
ADVANCE_LP_RING: outring (0x48f) isn't on a QWord boundary(WW) I810(0): Fixing display offsets.
ADVANCE_LP_RING: outring (0x497) isn't on a QWord boundary(WW) I810(0): Fixing display offsets.
ADVANCE_LP_RING: outring (0x49f) isn't on a QWord boundary(WW) I810(0): Fixing display offsets.
ADVANCE_LP_RING: outring (0x4a7) isn't on a QWord boundary(WW) I810(0): Fixing display offsets.
ADVANCE_LP_RING: outring (0x4af) isn't on a QWord boundary(WW) I810(0): Fixing display offsets.
ADVANCE_LP_RING: outring (0x4b7) isn't on a QWord boundaryADVANCE_LP_RING: outring (0x7) isn't on a QWord boundary

(2)的 Xorg.0.log:

(==) VESA(0): Write-combining range (0xd0fa0000,0x10000)
(==) VESA(0): Write-combining range (0xd0f80000,0x30000)
(==) VESA(0): Write-combining range (0xd0f00000,0xb0000)
(==) VESA(0): Write-combining range (0xd0e00000,0x1b0000)
(==) VESA(0): Write-combining range (0xd0c00000,0x3b0000)
(==) VESA(0): Write-combining range (0xd0800000,0x7b0000)
(WW) VESA(0): Failed to set up write-combining range (0xd0000000,0xfb0000)
(II) VESA(0): virtual address = 0xb6c2b000,
        physical address = 0xd0000000, size = 16449536
...
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/local/, removing from list!
FreeFontPath: FPE "/usr/X11R6/lib/X11/fonts/misc/" refcount is 2, should be 1; fixing.
 楼主| 发表于 2006-11-27 16:40:45 | 显示全部楼层
今天总算是基本解决这个问题了,我把整个解决的过程贴在这里了:
http://chowroc.blogspot.com/2006/11/lfs-compile-xorg.html
回复 支持 反对

使用道具 举报

发表于 2007-1-6 15:07:09 | 显示全部楼层
xorg 6.8.2 上fbmmx的问题是GCC4引起的,解决的方法,你可以打这个补丁,补丁源码如下

--- xc/programs/Xserver/fb/fbmmx.c.orig        2005-03-01 19:01:35.401903000 -0500
+++ xc/programs/Xserver/fb/fbmmx.c        2005-03-01 19:01:39.330305792 -0500
@@ -29,6 +29,8 @@

#ifdef RENDER

+#include <mmintrin.h>
+
#include "picturestr.h"
#include "mipict.h"
#include "fbpict.h"
@@ -48,6 +50,10 @@
#define CHECKPOINT()
#endif

+#define mmx_and(a,b)        ((Vector1x64)_mm_and_si64((__m64)(a),(__m64)(b)))
+#define mmx_or(a,b)        ((Vector1x64)_mm_or_si64((__m64)(a),(__m64)(b)))
+#define mmx_xor(a,b)        ((Vector1x64)_mm_xor_si64((__m64)(a),(__m64)(b)))
+
typedef struct
{
     ullong mmx_zero;
@@ -102,7 +108,7 @@
static __inline__ Vector4x16
negate (Vector4x16 mask)
{
-    return (Vector4x16)__builtin_ia32_pxor (
+    return (Vector4x16)mmx_xor (
        (Vector1x64)mask,
        (Vector1x64)c.mmx_4x00ff);
}
@@ -163,9 +169,9 @@

     t1 = shift ((Vector1x64)pixel, -48);
     t2 = shift (t1, 16);
-    t1 = __builtin_ia32_por (t1, t2);
+    t1 = mmx_or (t1, t2);
     t2 = shift (t1, 32);
-    t1 = __builtin_ia32_por (t1, t2);
+    t1 = mmx_or (t1, t2);

     return (Vector4x16)t1;
}
@@ -178,9 +184,9 @@
     t1 = shift ((Vector1x64)pixel,  48);
     t1 = shift (t1, -48);
     t2 = shift (t1, 16);
-    t1 = __builtin_ia32_por (t1, t2);
+    t1 = mmx_or (t1, t2);
     t2 = shift (t1, 32);
-    t1 = __builtin_ia32_por (t1, t2);
+    t1 = mmx_or (t1, t2);

     return (Vector4x16)t1;
}
@@ -192,15 +198,15 @@

     x = y = z = (Vector1x64)pixel;

-    x = __builtin_ia32_pand (x, (Vector1x64)c.mmx_ffff0000ffff0000);
-    y = __builtin_ia32_pand (y, (Vector1x64)c.mmx_000000000000ffff);
-    z = __builtin_ia32_pand (z, (Vector1x64)c.mmx_0000ffff00000000);
+    x = mmx_and (x, (Vector1x64)c.mmx_ffff0000ffff0000);
+    y = mmx_and (y, (Vector1x64)c.mmx_000000000000ffff);
+    z = mmx_and (z, (Vector1x64)c.mmx_0000ffff00000000);

     y = shift (y, 32);
     z = shift (z, -32);

-    x = __builtin_ia32_por (x, y);
-    x = __builtin_ia32_por (x, z);
+    x = mmx_or (x, y);
+    x = mmx_or (x, z);

     return (Vector4x16)x;
}
@@ -234,7 +240,7 @@
over_rev_non_pre (Vector4x16 src, Vector4x16 dest)
{
     Vector4x16 srca = expand_alpha (src);
-    Vector4x16 srcfaaa = (Vector4x16)__builtin_ia32_por((Vector1x64)srca, (Vector1x64)c.mmx_full_alpha);
+    Vector4x16 srcfaaa = (Vector4x16)mmx_or((Vector1x64)srca, (Vector1x64)c.mmx_full_alpha);

     return over(pix_multiply(invert_colors(src), srcfaaa), srca, dest);
}
@@ -300,9 +306,9 @@
     Vector1x64 t1 = shift (p, 36 - 11);
     Vector1x64 t2 = shift (p, 16 - 5);
     
-    p = __builtin_ia32_por (t1, p);
-    p = __builtin_ia32_por (t2, p);
-    p = __builtin_ia32_pand (p, (Vector1x64)c.mmx_565_rgb);
+    p = mmx_or (t1, p);
+    p = mmx_or (t2, p);
+    p = mmx_and (p, (Vector1x64)c.mmx_565_rgb);
     
     pixel = __builtin_ia32_pmullw ((Vector4x16)p, (Vector4x16)c.mmx_565_unpack_multiplier);
     return __builtin_ia32_psrlw (pixel, 8);
@@ -324,27 +330,27 @@
     Vector1x64 t = (Vector1x64)target;
     Vector1x64 r, g, b;
     
-    r = __builtin_ia32_pand (p, (Vector1x64)c.mmx_565_r);
-    g = __builtin_ia32_pand (p, (Vector1x64)c.mmx_565_g);
-    b = __builtin_ia32_pand (p, (Vector1x64)c.mmx_565_b);
+    r = mmx_and (p, (Vector1x64)c.mmx_565_r);
+    g = mmx_and (p, (Vector1x64)c.mmx_565_g);
+    b = mmx_and (p, (Vector1x64)c.mmx_565_b);
     
     r = shift (r, - (32 - 8) + pos * 16);
     g = shift (g, - (16 - 3) + pos * 16);
     b = shift (b, - (0  + 3) + pos * 16);

     if (pos == 0)
-        t = __builtin_ia32_pand (t, (Vector1x64)c.mmx_mask_0);
+        t = mmx_and (t, (Vector1x64)c.mmx_mask_0);
     else if (pos == 1)
-        t = __builtin_ia32_pand (t, (Vector1x64)c.mmx_mask_1);
+        t = mmx_and (t, (Vector1x64)c.mmx_mask_1);
     else if (pos == 2)
-        t = __builtin_ia32_pand (t, (Vector1x64)c.mmx_mask_2);
+        t = mmx_and (t, (Vector1x64)c.mmx_mask_2);
     else if (pos == 3)
-        t = __builtin_ia32_pand (t, (Vector1x64)c.mmx_mask_3);
+        t = mmx_and (t, (Vector1x64)c.mmx_mask_3);
     
-    p = __builtin_ia32_por (r, t);
-    p = __builtin_ia32_por (g, p);
+    p = mmx_or (r, t);
+    p = mmx_or (g, p);
     
-    return (Vector4x16)__builtin_ia32_por (b, p);
+    return (Vector4x16)mmx_or (b, p);
}

static __inline__ void
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-6 22:20:49 | 显示全部楼层
谢谢。

现在用 6.9.0 还行。不过暂时只能用 vesa 驱动,看视频时效果不是很好,目前比较忙,没时间,以后再说吧。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表