diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-16 12:51:54 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-16 12:51:54 +0100 |
commit | 33443f7ee48fa54b6f4d09c93cddac0e32314b9c (patch) | |
tree | 371ff8f61eed8c9d85e4749190f0e3447c6542ff | |
parent | 924060293826a1cc0d9d7bc26e913e46c6b2d054 (diff) |
sna: Add a couple of DBG options to control accelerated up/downloads
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 11 |
1 files 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; |