Merge branch 'master' of hsw:/usr/src/xf86-video-intel

This commit is contained in:
Chris Wilson 2014-02-12 10:32:50 +00:00
commit 77f8d9ca84
4 changed files with 21 additions and 8 deletions

View File

@ -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"

View File

@ -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);
}

View File

@ -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;

View File

@ -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);