Commit 3ea99e51 authored by Siarhei Siamashka's avatar Siarhei Siamashka
Browse files

Enable G2D acceleration by default on sun4i hardware

With the fallback to CPU backend for unsupported blits and also
threshold for avoiding small blits, now G2D should always provide
best overall performance.

The users of recent versions of xf86-video-sunxifb are supposed
to also have a reasonably recent version of linux-sunxi kernel.
Which includes the following fix:
  https://github.com/linux-sunxi/linux-sunxi/commit/3d49345343a1535b



The users of old kernels are going to see screen corruption on
dragging windows and scrolling. They just should upgrade :)
Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
parent cc8e2c79
......@@ -88,11 +88,12 @@ about the desktop performance, then you likely don't want to enable
any compositing effects in your window manager anyway.
.TP
.BI "Option \*qAccelMethod\*q \*q" "string" \*q
Chooses between available acceleration architectures. Currently the
only supported acceleration architecture is
.B G2D.
Chooses between available acceleration architectures. Valid values are
.B G2D
and
.B CPU.
The default is
.B no 2D hardware acceleration
.B G2D.
.SH "SEE ALSO"
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__),
......
......@@ -882,7 +882,7 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"failed to enable the use of sunxi display controller\n");
if ((accelmethod = xf86GetOptValString(fPtr->Options, OPTION_ACCELMETHOD)) &&
if (!(accelmethod = xf86GetOptValString(fPtr->Options, OPTION_ACCELMETHOD)) ||
strcasecmp(accelmethod, "g2d") == 0) {
sunxi_disp_t *disp = fPtr->sunxi_disp_private;
if (disp && disp->fd_g2d >= 0 &&
......@@ -899,7 +899,7 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
}
else {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"no 2D acceleration selected via AccelMethod option\n");
"G2D acceleration is disabled via AccelMethod option\n");
}
if (!fPtr->SunxiG2D_private && cpu_backend->cpuinfo->has_arm_neon) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment