From 33443f7ee48fa54b6f4d09c93cddac0e32314b9c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 16 Jul 2012 12:51:54 +0100 Subject: [PATCH] sna: Add a couple of DBG options to control accelerated up/downloads Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 3391a377..6d7f51c3 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -63,6 +63,8 @@ #define USE_SHM_VMAP 0 #define MIGRATE_ALL 0 +#define DBG_NO_CPU_UPLOAD 0 +#define DBG_NO_CPU_DOWNLOAD 0 #define ACCEL_FILL_SPANS 1 #define ACCEL_SET_SPANS 1 @@ -1071,15 +1073,16 @@ sna_pixmap_create_mappable_gpu(PixmapPtr pixmap) static inline bool use_cpu_bo_for_download(struct sna *sna, struct sna_pixmap *priv) { + if (DBG_NO_CPU_DOWNLOAD) + return false; + return priv->cpu_bo != NULL && sna->kgem.can_blt_cpu; } static inline bool use_cpu_bo_for_upload(struct sna_pixmap *priv) { -#if 0 - if (pixmap->devPrivate.ptr == NULL) - return true; -#endif + if (DBG_NO_CPU_UPLOAD) + return false; if (priv->cpu_bo == NULL) return false;