blob: c0d59960ceef743bf241d39ca60a5edeba2e9430 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/*
* Copyright 2017 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Authors: Jérôme Glisse <jglisse@redhat.com>
*/
#ifndef COMPOTE_H
#define COMPOTE_H
#include <linux/list.h>
#include "nouveau_drv.h"
#define COMPOTE_DEVICE_NAME "compote"
struct compote_device {
struct device *device;
struct nouveau_drm *nvdrm;
struct cdev cdev;
int minor;
uint8_t chipset;
};
struct compote_file {
struct compote_device *cdevice;
struct file *file;
struct nouveau_cli nvclient;
};
struct compote_mo {
struct kref kref;
struct compote_file *cfile;
struct nouveau_bo *nvbo;
uint64_t npages;
uint64_t foffset;
};
long compote_ioctl_mem_alloc(struct compote_file *cfile, void __user *uarg);
long compote_ioctl_mem_free(struct compote_file *cfile, void __user *uarg);
void compote_mo_ref(struct compote_mo *mo);
void compote_mo_unref(struct compote_mo *mo);
#endif /* COMPOTE_H */
|