File: conn.h

package info (click to toggle)
linux 3.16.7-ckt2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 734,120 kB
  • ctags: 2,369,605
  • sloc: ansic: 12,212,866; asm: 277,256; perl: 53,999; xml: 47,771; makefile: 30,481; sh: 8,035; python: 6,583; cpp: 5,121; yacc: 4,254; lex: 2,215; awk: 741; pascal: 231; lisp: 218; sed: 30
file content (59 lines) | stat: -rw-r--r-- 2,082 bytes parent folder | download | duplicates (11)
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
53
54
55
56
57
58
59
#ifndef __NVKM_DISP_CONN_H__
#define __NVKM_DISP_CONN_H__

#include "priv.h"

struct nvkm_connector {
	struct nouveau_object base;
	struct list_head head;

	struct nvbios_connE info;
	int index;

	struct {
		struct nouveau_eventh *event;
		struct work_struct work;
	} hpd;
};

#define nvkm_connector_create(p,e,c,b,i,d)                                     \
	nvkm_connector_create_((p), (e), (c), (b), (i), sizeof(**d), (void **)d)
#define nvkm_connector_destroy(d) ({                                           \
	struct nvkm_connector *disp = (d);                                     \
	_nvkm_connector_dtor(nv_object(disp));                                 \
})
#define nvkm_connector_init(d) ({                                              \
	struct nvkm_connector *disp = (d);                                     \
	_nvkm_connector_init(nv_object(disp));                                 \
})
#define nvkm_connector_fini(d,s) ({                                            \
	struct nvkm_connector *disp = (d);                                     \
	_nvkm_connector_fini(nv_object(disp), (s));                            \
})

int nvkm_connector_create_(struct nouveau_object *, struct nouveau_object *,
			   struct nouveau_oclass *, struct nvbios_connE *,
			   int, int, void **);

int  _nvkm_connector_ctor(struct nouveau_object *, struct nouveau_object *,
			  struct nouveau_oclass *, void *, u32,
			  struct nouveau_object **);
void _nvkm_connector_dtor(struct nouveau_object *);
int  _nvkm_connector_init(struct nouveau_object *);
int  _nvkm_connector_fini(struct nouveau_object *, bool);

struct nvkm_connector_impl {
	struct nouveau_oclass base;
};

#ifndef MSG
#define MSG(l,f,a...) do {                                                     \
	struct nvkm_connector *_conn = (void *)conn;                           \
	nv_##l(nv_object(conn)->engine, "%02x:%02x%02x: "f, _conn->index,      \
	       _conn->info.location, _conn->info.type, ##a);                   \
} while(0)
#define DBG(f,a...) MSG(debug, f, ##a)
#define ERR(f,a...) MSG(error, f, ##a)
#endif

#endif