[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: [PATCH] exa: add EXA_MIXED_PREFER_UTS
From: madman2003 () gmail ! com (Maarten Maathuis)
Date: 2009-11-30 17:56:28
Message-ID: 1259603788-26501-1-git-send-email-madman2003 () gmail ! com
[Download RAW message or body]
- Drivers using wfb don't like unneeded cpu fallbacks, allow them to signal this.
Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
---
exa/exa.h | 6 ++++++
exa/exa_accel.c | 6 ++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/exa/exa.h b/exa/exa.h
index 8c93d15..46552c7 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -769,6 +769,12 @@ typedef struct _ExaDriver {
*/
#define EXA_MIXED_PIXMAPS (1 << 6)
+/**
+ * EXA_MIXED_PREFER_UTS indicates that cpu access is more costly than DFS,
+ * which might follow UTS.
+ */
+#define EXA_MIXED_PREFER_UTS (1 << 7)
+
/** @} */
/* in exa.c */
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 1d88acb..b438b1a 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -508,9 +508,11 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable,
*
* Not taking this path for mixed pixmaps: It could only save one CPU
* copy between cached memory and risks causing a more expensive
- * DownloadFromScreen later on.
+ * DownloadFromScreen later on. Some drivers may prefer a potential
+ * DFS to a cpu fallback.
*/
- } else if (!(pExaScr->info->flags & EXA_MIXED_PIXMAPS)) {
+ } else if (!(pExaScr->info->flags & EXA_MIXED_PIXMAPS) ||
+ (pExaScr->info->flags & EXA_MIXED_PREFER_UTS)) {
int bpp = pSrcDrawable->bitsPerPixel;
int src_stride = exaGetPixmapPitch(pSrcPixmap);
CARD8 *src = NULL;
--
1.6.5.3
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic