This source file includes following definitions.
- nv50_ovly_new
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #include "ovly.h"
23 #include "oimm.h"
24
25 #include <nvif/class.h>
26
27 int
28 nv50_ovly_new(struct nouveau_drm *drm, int head, struct nv50_wndw **pwndw)
29 {
30 static const struct {
31 s32 oclass;
32 int version;
33 int (*new)(struct nouveau_drm *, int, s32, struct nv50_wndw **);
34 } ovlys[] = {
35 { GK104_DISP_OVERLAY_CONTROL_DMA, 0, ovly917e_new },
36 { GF110_DISP_OVERLAY_CONTROL_DMA, 0, ovly907e_new },
37 { GT214_DISP_OVERLAY_CHANNEL_DMA, 0, ovly827e_new },
38 { GT200_DISP_OVERLAY_CHANNEL_DMA, 0, ovly827e_new },
39 { G82_DISP_OVERLAY_CHANNEL_DMA, 0, ovly827e_new },
40 { NV50_DISP_OVERLAY_CHANNEL_DMA, 0, ovly507e_new },
41 {}
42 };
43 struct nv50_disp *disp = nv50_disp(drm->dev);
44 int cid, ret;
45
46 cid = nvif_mclass(&disp->disp->object, ovlys);
47 if (cid < 0) {
48 NV_ERROR(drm, "No supported overlay class\n");
49 return cid;
50 }
51
52 ret = ovlys[cid].new(drm, head, ovlys[cid].oclass, pwndw);
53 if (ret)
54 return ret;
55
56 return nv50_oimm_init(drm, *pwndw);
57 }