<br><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ 原始邮件 ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>发件人:</b> "Chris Wilson";<chris@chris-wilson.co.uk>;</div><div><b>发送时间:</b> 2013年9月23日(星期一) 下午4:03</div><div><b>收件人:</b> "小飞珑"<404962885@qq.com>; <wbr></div><div><b>抄送:</b> "xorg-devel"<xorg-devel@lists.x.org>; <wbr></div><div><b>主题:</b> Re: Where does Xorg fallback to ?</div></div><div><br></div>On Mon, Sep 23, 2013 at 10:45:41AM +0800, 小飞珑 wrote:<br>>      Hi,<br>>       I am looking into Xorg for performance optimization, and want to do<br>>    some software acceleration for the Xorg fallback functions when the<br>>    hardware acceleration is not available. I am now using a notebook with<br>>    intel display card. In the UXA driver, I force the driver to use fallback<br>>    funcs instead of the Accelerated funcs. As in uxa/uxa-accel.c -><br>>    uxa_copy_area(), I made uxa_screen->force_fallback = 1, force uxa driver<br>>    to call uxa_check_copy_area()->fbCopyArea(), but the fbCopyArea seemed NOT<br>>    to be the fbCopyArea in Xorg fb/fbcopy.c ! For I added return NULL<br>>    immediately  in the beginning of fb/fbcopy.c -> fbCopyArea(), but made no<br>>    difference, but if I comment the fbCopyArea() in uxa/uxa-unaccel.c the<br>>    display is ruined. It seemed that the above two fbCopyArea() functions are<br>>    not the same. Where did the Xorg fallback to? NOT to the fb/fbcopy.c ? I<br>>    am eager to know that, could some body tell ? Thanks a lot!<br><br>The right answer is don't start from there. For fallbacks, UXA uses a<br>GTT mapping so every surface is actually in WC memory - every read is<br>treated as uncached, and fallbacks do a lot of reads. Effort spent<br>optimising the fb layer in this case is completely wasted.<br>-Chris<br><br>  I don't quite understand that. Or you mean that  fbCopyArea() is wrapped? <br>  The problem of mine is that I did not find the realization source code of fbCopyArea or fbCopyNtoN in UXA driver, might you pointed them out for me ? That might be a start after all.<br>  Or might I ask what you would suggest for a potential optimization for fallbacks of Xorg?<br>-- <br>Chris Wilson, Intel Open Source Technology Centre<br>_______________________________________________<br>xorg-devel@lists.x.org: X.Org development<br>Archives: http://lists.x.org/archives/xorg-devel<br>Info: http://lists.x.org/mailman/listinfo/xorg-devel</div>