summaryrefslogtreecommitdiff
path: root/libdrm/xf86drm.c
diff options
context:
space:
mode:
authorNian Wu <nian@graphics.(none)>2007-02-25 17:06:13 -0800
committerNian Wu <nian@graphics.(none)>2007-02-25 17:06:13 -0800
commitdf2fc3ec62d6799a3266cfb18b1279a126892f44 (patch)
tree94d39b9172bce8c93cb035e40d12e635dfaeb12f /libdrm/xf86drm.c
parent80095ffe01efe79983c2124ecc99ce979d7ac6a9 (diff)
parent9d8ba2d0d479f53b996c0a0e366acfee52daab3b (diff)
Merge git://proxy01.pd.intel.com:9419/git/mesa/drm into crestline
Diffstat (limited to 'libdrm/xf86drm.c')
-rw-r--r--libdrm/xf86drm.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 56450e80..a815ed7a 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -585,9 +585,9 @@ int drmOpen(const char *name, const char *busid)
void drmFreeVersion(drmVersionPtr v)
{
if (!v) return;
- if (v->name) drmFree(v->name);
- if (v->date) drmFree(v->date);
- if (v->desc) drmFree(v->desc);
+ drmFree(v->name);
+ drmFree(v->date);
+ drmFree(v->desc);
drmFree(v);
}
@@ -604,9 +604,9 @@ void drmFreeVersion(drmVersionPtr v)
static void drmFreeKernelVersion(drm_version_t *v)
{
if (!v) return;
- if (v->name) drmFree(v->name);
- if (v->date) drmFree(v->date);
- if (v->desc) drmFree(v->desc);
+ drmFree(v->name);
+ drmFree(v->date);
+ drmFree(v->desc);
drmFree(v);
}
@@ -2267,12 +2267,13 @@ int drmCommandWriteRead(int fd, unsigned long drmCommandIndex, void *data,
* DRM_FENCE_MASK_DRIVER
*/
-int drmFenceCreate(int fd, unsigned flags, int class,unsigned type,
+int drmFenceCreate(int fd, unsigned flags, int class, unsigned type,
drmFence *fence)
{
drm_fence_arg_t arg;
-
+
memset(&arg, 0, sizeof(arg));
+ arg.flags = flags;
arg.type = type;
arg.class = class;
arg.op = drm_fence_create;
@@ -2410,8 +2411,9 @@ int drmFenceSignaled(int fd, drmFence *fence, unsigned fenceType,
int drmFenceEmit(int fd, unsigned flags, drmFence *fence, unsigned emit_type)
{
drm_fence_arg_t arg;
-
+
memset(&arg, 0, sizeof(arg));
+ arg.class = fence->class;
arg.flags = flags;
arg.handle = fence->handle;
arg.type = emit_type;