Commit a446b3bb authored by Siarhei Siamashka's avatar Siarhei Siamashka
Browse files

Allow to disable Raspberry Pi fb_copyarea acceleration via xorg.conf



Now acceleration is only used in the case if the AccelMethod option
is not set (so that it is assumed to be a default choice) or when
it is explicitly set to "COPYAREA". Any other value (for example
"CPU") disables acceleration.
Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
parent 689c0825
...@@ -942,11 +942,22 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL) ...@@ -942,11 +942,22 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
} }
if (!fPtr->SunxiG2D_private && fPtr->fb_copyarea_private) { if (!fPtr->SunxiG2D_private && fPtr->fb_copyarea_private) {
fb_copyarea_t *fb = fPtr->fb_copyarea_private; if (!(accelmethod = xf86GetOptValString(fPtr->Options, OPTION_ACCELMETHOD)) ||
if ((fPtr->SunxiG2D_private = SunxiG2D_Init(pScreen, &fb->blt2d))) { strcasecmp(accelmethod, "copyarea") == 0) {
fb->fallback_blt2d = &cpu_backend->blt2d; fb_copyarea_t *fb = fPtr->fb_copyarea_private;
if ((fPtr->SunxiG2D_private = SunxiG2D_Init(pScreen, &fb->blt2d))) {
fb->fallback_blt2d = &cpu_backend->blt2d;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"enabled fbdev copyarea acceleration\n");
}
else {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"failed to enable fbdev copyarea acceleration\n");
}
}
else {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"enabled fbdev copyarea acceleration\n"); "fbdev copyarea acceleration is disabled via AccelMethod option\n");
} }
} }
......
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