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 "atom.h"
24
25static void
26ovly907e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
27{
28 u32 *push;
29 if ((push = evo_wait(&wndw->wndw, 12))) {
30 evo_mthd(push, 0x0084, 1);
31 evo_data(push, asyw->image.interval << 4);
32 evo_mthd(push, 0x00c0, 1);
33 evo_data(push, asyw->image.handle[0]);
34 evo_mthd(push, 0x0100, 1);
35 evo_data(push, 0x00000002);
36 evo_mthd(push, 0x0400, 1);
37 evo_data(push, asyw->image.offset[0] >> 8);
38 evo_mthd(push, 0x0408, 3);
39 evo_data(push, asyw->image.h << 16 | asyw->image.w);
40 evo_data(push, asyw->image.layout << 24 |
41 (asyw->image.pitch[0] >> 8) << 8 |
42 asyw->image.blocks[0] << 8 |
43 asyw->image.blockh);
44 evo_data(push, asyw->image.format << 8 |
45 asyw->image.colorspace);
46 evo_kick(push, &wndw->wndw);
47 }
48}
49
50const struct nv50_wndw_func
51ovly907e = {
52 .acquire = ovly507e_acquire,
53 .release = ovly507e_release,
54 .ntfy_set = ovly507e_ntfy_set,
55 .ntfy_clr = ovly507e_ntfy_clr,
56 .ntfy_reset = ovly827e_ntfy_reset,
57 .ntfy_wait_begun = ovly827e_ntfy_wait_begun,
58 .image_set = ovly907e_image_set,
59 .image_clr = ovly507e_image_clr,
60 .scale_set = ovly507e_scale_set,
61 .update = ovly507e_update,
62};
63
64static const u32
65ovly907e_format[] = {
66 DRM_FORMAT_YUYV,
67 DRM_FORMAT_UYVY,
68 DRM_FORMAT_XRGB8888,
69 DRM_FORMAT_XRGB1555,
70 DRM_FORMAT_XBGR2101010,
71 DRM_FORMAT_XBGR16161616F,
72 0
73};
74
75int
76ovly907e_new(struct nouveau_drm *drm, int head, s32 oclass,
77 struct nv50_wndw **pwndw)
78{
79 return ovly507e_new_(&ovly907e, ovly907e_format, drm, head, oclass,
80 0x00000004 << (head * 4), pwndw);
81}
82