Blame tests/radeon/rbo.h

Packit Service 103f6b
/*
Packit Service 103f6b
 * Copyright © 2011 Red Hat
Packit Service 103f6b
 *
Packit Service 103f6b
 * Permission is hereby granted, free of charge, to any person obtaining a
Packit Service 103f6b
 * copy of this software and associated documentation files (the "Software"),
Packit Service 103f6b
 * to deal in the Software without restriction, including without limitation
Packit Service 103f6b
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Packit Service 103f6b
 * and/or sell copies of the Software, and to permit persons to whom the
Packit Service 103f6b
 * Software is furnished to do so, subject to the following conditions:
Packit Service 103f6b
 *
Packit Service 103f6b
 * The above copyright notice and this permission notice (including the next
Packit Service 103f6b
 * paragraph) shall be included in all copies or substantial portions of the
Packit Service 103f6b
 * Software.
Packit Service 103f6b
 *
Packit Service 103f6b
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit Service 103f6b
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit Service 103f6b
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
Packit Service 103f6b
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
Packit Service 103f6b
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
Packit Service 103f6b
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
Packit Service 103f6b
 * IN THE SOFTWARE.
Packit Service 103f6b
 *
Packit Service 103f6b
 * Authors:
Packit Service 103f6b
 *    Jerome Glisse <j.glisse@gmail.com>
Packit Service 103f6b
 */
Packit Service 103f6b
#ifndef RBO_H
Packit Service 103f6b
#define RBO_H
Packit Service 103f6b
Packit Service 103f6b
#include "util_double_list.h"
Packit Service 103f6b
Packit Service 103f6b
struct rbo {
Packit Service 103f6b
    struct list_head    list;
Packit Service 103f6b
    int                 fd;
Packit Service 103f6b
    unsigned            refcount;
Packit Service 103f6b
    unsigned            mapcount;
Packit Service 103f6b
    unsigned            handle;
Packit Service 103f6b
    unsigned            size;
Packit Service 103f6b
    unsigned            alignment;
Packit Service 103f6b
    void                *data;
Packit Service 103f6b
};
Packit Service 103f6b
Packit Service 103f6b
struct rbo *rbo(int fd, unsigned handle, unsigned size,
Packit Service 103f6b
                unsigned alignment, void *ptr);
Packit Service 103f6b
int rbo_map(struct rbo *bo);
Packit Service 103f6b
void rbo_unmap(struct rbo *bo);
Packit Service 103f6b
struct rbo *rbo_incref(struct rbo *bo);
Packit Service 103f6b
struct rbo *rbo_decref(struct rbo *bo);
Packit Service 103f6b
int rbo_wait(struct rbo *bo);
Packit Service 103f6b
Packit Service 103f6b
#endif