summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-02-12 10:32:50 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-02-12 10:32:50 +0000
commit77f8d9ca84342b256de1e118edfd14ddae4d593f (patch)
treeb4038d4c7345a73f12b8c8c9a99dcd06fa959194
parent3fb39d477909a433ae67bdfc69ad870ddabee3a7 (diff)
parent27663f31163c22f7dfaf8f5a3e45fa1c93a7d9e4 (diff)
Merge branch 'master' of hsw:/usr/src/xf86-video-intel
-rw-r--r--configure.ac2
-rw-r--r--src/sna/gen5_render.c4
-rw-r--r--src/sna/kgem.c15
-rw-r--r--src/sna/sna_accel.c8
4 files changed, 21 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index a3114afb..ea7473e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -328,6 +328,7 @@ if test "x$GLAMOR" != "xno"; then
fi
PKG_CHECK_MODULES(XORG, [xorg-server >= $required_xorg_server_version xproto fontsproto pixman-1 >= $required_pixman_version $REQUIRED_MODULES])
+ABI_VERSION=`$PKG_CONFIG --variable=abi_videodrv xorg-server`
if test "x$ONLY_UMS" = "xyes"; then
UMS="yes"
@@ -726,6 +727,7 @@ fi
echo ""
echo "AC_PACKAGE_STRING will be compiled with:"
+echo " Xorg Video ABI version: $ABI_VERSION"
echo " Acceleration backends:$accel_msg"
echo " Additional debugging support?$debug_msg"
echo " Support for Kernel Mode Setting? $KMS"
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index 25555e0e..a9db697a 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -54,6 +54,8 @@
#define DBG_NO_STATE_CACHE 0
#define DBG_NO_SURFACE_CACHE 0
+#define ALWAYS_FLUSH 0
+
#define MAX_3D_SIZE 8192
#define GEN5_GRF_BLOCKS(nreg) ((nreg + 15) / 16 - 1)
@@ -1056,7 +1058,7 @@ gen5_emit_state(struct sna *sna,
kgem_bo_mark_dirty(op->dst.bo);
flush = false;
}
- if (flush) {
+ if (flush || ALWAYS_FLUSH) {
DBG(("%s: forcing flush\n", __FUNCTION__));
gen5_emit_pipe_flush(sna);
}
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index cb64cace..8e469607 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3755,6 +3755,7 @@ discard:
struct kgem_bo *kgem_create_for_name(struct kgem *kgem, uint32_t name)
{
struct drm_gem_open open_arg;
+ struct drm_i915_gem_get_tiling tiling;
struct kgem_bo *bo;
DBG(("%s(name=%d)\n", __FUNCTION__, name));
@@ -3765,15 +3766,27 @@ struct kgem_bo *kgem_create_for_name(struct kgem *kgem, uint32_t name)
return NULL;
DBG(("%s: new handle=%d\n", __FUNCTION__, open_arg.handle));
+
+ VG_CLEAR(tiling);
+ tiling.handle = open_arg.handle;
+ if (do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_GET_TILING, &tiling)) {
+ DBG(("%s(name=%d) get-tiling failed, ret=%d\n", __FUNCTION__, name, errno));
+ gem_close(kgem->fd, open_arg.handle);
+ return NULL;
+ }
+
+ DBG(("%s: handle=%d, tiling=%d\n", __FUNCTION__, tiling.handle, tiling.tiling_mode));
+
bo = __kgem_bo_alloc(open_arg.handle, open_arg.size / PAGE_SIZE);
if (bo == NULL) {
gem_close(kgem->fd, open_arg.handle);
return NULL;
}
+ bo->tiling = tiling.tiling_mode;
bo->reusable = false;
bo->flush = true;
- bo->purged = true; /* no coherency guarrantees */
+ bo->purged = true; /* no coherency guarantees */
debug_alloc__bo(kgem, bo);
return bo;
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index f9246aa2..d79eb8a9 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2203,11 +2203,6 @@ skip_inplace_map:
__sna_damage_destroy(DAMAGE_PTR(priv->gpu_damage));
priv->gpu_damage = NULL;
}
- } else {
- assert(flags & MOVE_WRITE);
- sna_pixmap_free_gpu(sna, priv);
- assert(priv->gpu_damage == NULL);
- assert(priv->clear == false);
}
if (flags & MOVE_WRITE || priv->create & KGEM_CAN_CREATE_LARGE) {
@@ -2216,8 +2211,9 @@ mark_damage:
sna_damage_all(&priv->cpu_damage,
pixmap->drawable.width,
pixmap->drawable.height);
- assert(priv->gpu_damage == NULL);
sna_pixmap_free_gpu(sna, priv);
+ assert(priv->gpu_damage == NULL);
+ assert(priv->clear == false);
if (priv->flush) {
assert(!priv->shm);