{
drm_fence_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.type = type;
arg.class = class;
arg.op = drm_fence_create;
{
drm_fence_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.flags = flags;
arg.op = drm_fence_buffers;
if (ioctl(fd, DRM_IOCTL_FENCE, &arg))
{
drm_fence_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.handle = fence->handle;
arg.op = drm_fence_destroy;
if (ioctl(fd, DRM_IOCTL_FENCE, &arg))
{
drm_fence_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.handle = handle;
arg.op = drm_fence_reference;
if (ioctl(fd, DRM_IOCTL_FENCE, &arg))
{
drm_fence_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.handle = fence->handle;
arg.op = drm_fence_unreference;
if (ioctl(fd, DRM_IOCTL_FENCE, &arg))
{
drm_fence_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.handle = fence->handle;
arg.type = flush_type;
arg.op = drm_fence_flush;
{
drm_fence_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.handle = fence->handle;
arg.op = drm_fence_signaled;
if (ioctl(fd, DRM_IOCTL_FENCE, &arg))
{
drm_fence_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.flags = flags;
arg.handle = fence->handle;
arg.type = emit_type;
}
}
+ memset(&arg, 0, sizeof(arg));
arg.handle = fence->handle;
arg.type = flush_type;
arg.flags = flags;
{
drm_ttm_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.op = drm_ttm_create;
arg.flags = flags;
arg.size = size;
{
drm_ttm_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.op = drm_ttm_destroy;
arg.handle = ttm->handle;
if (ioctl(fd, DRM_IOCTL_TTM, &arg))
{
drm_ttm_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.handle = handle;
arg.op = drm_ttm_reference;
if (ioctl(fd, DRM_IOCTL_TTM, &arg))
{
drm_ttm_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.op = drm_ttm_destroy;
arg.handle = ttm->handle;
if (ioctl(fd, DRM_IOCTL_TTM, &arg))
drm_bo_arg_t arg;
drm_bo_arg_request_t *req = &arg.d.req;
drm_bo_arg_reply_t *rep = &arg.d.rep;
-
- arg.handled = 0;
+
+ memset(buf, 0, sizeof(*buf));
+ memset(&arg, 0, sizeof(arg));
req->mask = mask;
req->hint = hint;
req->size = size;
return -EINVAL;
}
req->op = drm_bo_create;
- arg.next = 0;
if (ioctl(fd, DRM_IOCTL_BUFOBJ, &arg))
return -errno;
buf->virtual = NULL;
}
- arg.handled = 0;
+ memset(&arg, 0, sizeof(arg));
req->handle = buf->handle;
req->op = drm_bo_destroy;
- arg.next = 0;
if (ioctl(fd, DRM_IOCTL_BUFOBJ, &arg))
return -errno;
drm_bo_arg_request_t *req = &arg.d.req;
drm_bo_arg_reply_t *rep = &arg.d.rep;
- arg.handled = 0;
+ memset(&arg, 0, sizeof(arg));
req->handle = handle;
req->op = drm_bo_reference;
- arg.next = 0;
if (ioctl(fd, DRM_IOCTL_BUFOBJ, &arg))
return -errno;
buf->virtual = NULL;
}
- arg.handled = 0;
+ memset(&arg, 0, sizeof(arg));
req->handle = buf->handle;
req->op = drm_bo_unreference;
- arg.next = 0;
if (ioctl(fd, DRM_IOCTL_BUFOBJ, &arg))
return -errno;
#endif
}
- arg.handled = 0;
+ memset(&arg, 0, sizeof(arg));
req->handle = buf->handle;
req->mask = mapFlags;
req->hint = mapHint;
req->op = drm_bo_map;
- arg.next = 0;
/*
* May hang if the buffer object is busy.
drm_bo_arg_reply_t *rep = &arg.d.rep;
- arg.handled = 0;
+ memset(&arg, 0, sizeof(arg));
req->handle = buf->handle;
req->op = drm_bo_unmap;
- arg.next = 0;
if (ioctl(fd, DRM_IOCTL_BUFOBJ, &arg)) {
return -errno;
drm_bo_arg_reply_t *rep = &arg.d.rep;
int ret = 0;
- arg.handled = 0;
+ memset(&arg, 0, sizeof(arg));
req->handle = buf->handle;
req->mask = flags;
req->hint = hint;
req->arg_handle = mask; /* Encode mask in the arg_handle field :/ */
req->op = drm_bo_validate;
- arg.next = 0;
-
do{
ret = ioctl(fd, DRM_IOCTL_BUFOBJ, &arg);
} while (ret && errno == EAGAIN);
-
if (ret)
return ret;
if (!arg.handled)
drm_bo_arg_reply_t *rep = &arg.d.rep;
int ret = 0;
- arg.handled = 0;
+ memset(&arg, 0, sizeof(arg));
req->handle = buf->handle;
req->mask = flags;
req->arg_handle = fenceHandle;
req->op = drm_bo_validate;
- arg.next = 0;
ret = ioctl(fd, DRM_IOCTL_BUFOBJ, &arg);
drm_bo_arg_reply_t *rep = &arg.d.rep;
int ret = 0;
- arg.handled = 0;
+ memset(&arg, 0, sizeof(arg));
req->handle = buf->handle;
req->op = drm_bo_info;
- arg.next = 0;
ret = ioctl(fd, DRM_IOCTL_BUFOBJ, &arg);
if ((buf->flags & DRM_BO_FLAG_SHAREABLE) ||
(buf->replyFlags & DRM_BO_REP_BUSY)) {
- arg.handled = 0;
+ memset(&arg, 0, sizeof(arg));
req->handle = buf->handle;
req->op = drm_bo_wait_idle;
req->hint = hint;
- arg.next = 0;
do {
ret = ioctl(fd, DRM_IOCTL_BUFOBJ, &arg);
if (prevNext)
*prevNext = (unsigned long) arg;
- arg->next = 0;
+ memset(arg, 0, sizeof(*arg));
prevNext = &arg->next;
- arg->handled = 0;
req->handle = node->buf->handle;
req->op = drm_bo_validate;
req->mask = node->arg0;
if (prevNext)
*prevNext = (unsigned long) arg;
- arg->next = 0;
+ memset(arg, 0, sizeof(*arg));
prevNext = &arg->next;
- arg->handled = 0;
req->handle = node->buf->handle;
req->op = drm_bo_fence;
req->mask = node->arg0;
{
drm_mm_init_arg_t arg;
+ memset(&arg, 0, sizeof(arg));
arg.req.op = mm_init;
arg.req.vr_p_offset = vramPOffset;
arg.req.vr_p_size = vramPSize;
int drmMMTakedown(int fd)
{
drm_mm_init_arg_t arg;
+
+
+ memset(&arg, 0, sizeof(arg));
arg.req.op = mm_takedown;
if (ioctl(fd, DRM_IOCTL_MM_INIT, &arg))