xf86-video-intel: 2 commits - src/intel_list.h src/sna/kgem.c
Chris Wilson
ickle at kemper.freedesktop.org
Sat Aug 22 04:23:49 PDT 2015
src/intel_list.h | 11 +++--------
src/sna/kgem.c | 15 +++++++++++----
2 files changed, 14 insertions(+), 12 deletions(-)
New commits:
commit a6317fc3292151b1d02bfb8586f53cf90db4b50e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Aug 22 11:22:44 2015 +0000
sna: Fix build on squeeze
Not all build enviroments have a definition for the wait ioctl, so
provide one.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 33c48fd..00378d1 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1706,7 +1706,13 @@ static void kgem_fixup_relocs(struct kgem *kgem, struct kgem_bo *bo, int shrink)
static int kgem_bo_wait(struct kgem *kgem, struct kgem_bo *bo)
{
- struct drm_i915_gem_wait wait;
+ struct local_i915_gem_wait {
+ uint32_t handle;
+ uint32_t flags;
+ int64_t timeout;
+ } wait;
+#define LOCAL_I915_GEM_WAIT 0x2c
+#define LOCAL_IOCTL_I915_GEM_WAIT DRM_IOWR(DRM_COMMAND_BASE + LOCAL_I915_GEM_WAIT, struct local_i915_gem_wait)
int ret;
DBG(("%s: waiting for handle=%d\n", __FUNCTION__, bo->handle));
@@ -1714,9 +1720,10 @@ static int kgem_bo_wait(struct kgem *kgem, struct kgem_bo *bo)
return 0;
VG_CLEAR(wait);
- wait.bo_handle = bo->handle;
- wait.timeout_ns = -1;
- ret = do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_WAIT, &wait);
+ wait.handle = bo->handle;
+ wait.flags = 0;
+ wait.timeout = -1;
+ ret = do_ioctl(kgem->fd, LOCAL_IOCTL_I915_GEM_WAIT, &wait);
if (ret) {
struct drm_i915_gem_set_domain set_domain;
commit f3e14ec8de1f7c62862d80251c7a11ede0d2dc0e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Aug 22 12:15:15 2015 +0100
list: Consolidate the two list_for_each_from_safe()
We can use the same macro on top of the xorg list.h interloper as well
as the private version, so do so.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/intel_list.h b/src/intel_list.h
index 4d7a1e5..c8a3187 100644
--- a/src/intel_list.h
+++ b/src/intel_list.h
@@ -347,11 +347,6 @@ list_is_empty(const struct list *head)
&pos->member != (head); \
pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
-#define list_for_each_entry_safe_from(pos, tmp, head, member) \
- for (tmp = __container_of(pos->member.next, pos, member); \
- &pos->member != (head); \
- pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
-
#else
#include <list.h>
@@ -401,12 +396,12 @@ static inline void list_move_tail(struct list *list, struct list *head)
&pos->member != (head); \
pos = __container_of(pos->member.prev, pos, member))
+#endif
+
#define list_for_each_entry_safe_from(pos, tmp, head, member) \
for (tmp = __container_of(pos->member.next, pos, member); \
&pos->member != (head); \
- pos = tmp)
-
-#endif
+ pos = tmp, tmp = __container_of(tmp->member.next, tmp, member))
#undef container_of
#define container_of(ptr, type, member) \
More information about the xorg-commit
mailing list