summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 9113d94e..48383717 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -15735,6 +15735,20 @@ static bool sna_picture_init(ScreenPtr screen)
return true;
}
+static bool sna_option_accel_none(struct sna *sna)
+{
+ const char *s;
+
+ if (xf86ReturnOptValBool(sna->Options, OPTION_ACCEL_DISABLE, FALSE))
+ return true;
+
+ s = xf86GetOptValString(sna->Options, OPTION_ACCEL_METHOD);
+ if (s == NULL)
+ return false;
+
+ return strcasecmp(s, "none") == 0;
+}
+
static bool sna_option_accel_blt(struct sna *sna)
{
const char *s;
@@ -15823,7 +15837,10 @@ bool sna_accel_init(ScreenPtr screen, struct sna *sna)
return false;
backend = no_render_init(sna);
- if (sna_option_accel_blt(sna) || sna->info->gen >= 0100)
+ if (sna_option_accel_none(sna)) {
+ backend = "disabled";
+ sna->kgem.wedged = true;
+ } else if (sna_option_accel_blt(sna) || sna->info->gen >= 0100)
(void)backend;
else if (sna->info->gen >= 070)
backend = gen7_render_init(sna, backend);