base907c.c (261fcfa96991d6652b061262c1879cc0bdd1aa3a) base907c.c (53e0a3e70de69dc9f498d26c6b5495b2771ee374)
1/*
2 * Copyright 2018 Red Hat Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the

--- 7 unchanged lines hidden (view full) ---

16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 */
22#include "base.h"
23
1/*
2 * Copyright 2018 Red Hat Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the

--- 7 unchanged lines hidden (view full) ---

16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 */
22#include "base.h"
23
24static u32
25base907c_update(struct nv50_wndw *wndw, u32 interlock)
26{
27 u32 *push;
28 if ((push = evo_wait(&wndw->wndw, 2))) {
29 evo_mthd(push, 0x0080, 1);
30 evo_data(push, interlock);
31 evo_kick(push, &wndw->wndw);
32 return interlock ? 2 << (wndw->id * 4) : 0;
33 }
34 return 0;
35}
36
37static void
38base907c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
39{
40 u32 *push;
41 if ((push = evo_wait(&wndw->wndw, 10))) {
42 evo_mthd(push, 0x0084, 1);
43 evo_data(push, asyw->image.mode << 8 |
44 asyw->image.interval << 4);

--- 19 unchanged lines hidden (view full) ---

64 .sema_clr = base507c_sema_clr,
65 .ntfy_reset = base507c_ntfy_reset,
66 .ntfy_set = base507c_ntfy_set,
67 .ntfy_clr = base507c_ntfy_clr,
68 .ntfy_wait_begun = base507c_ntfy_wait_begun,
69 .image_set = base907c_image_set,
70 .image_clr = base507c_image_clr,
71 .lut = base507c_lut,
24static void
25base907c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
26{
27 u32 *push;
28 if ((push = evo_wait(&wndw->wndw, 10))) {
29 evo_mthd(push, 0x0084, 1);
30 evo_data(push, asyw->image.mode << 8 |
31 asyw->image.interval << 4);

--- 19 unchanged lines hidden (view full) ---

51 .sema_clr = base507c_sema_clr,
52 .ntfy_reset = base507c_ntfy_reset,
53 .ntfy_set = base507c_ntfy_set,
54 .ntfy_clr = base507c_ntfy_clr,
55 .ntfy_wait_begun = base507c_ntfy_wait_begun,
56 .image_set = base907c_image_set,
57 .image_clr = base507c_image_clr,
58 .lut = base507c_lut,
72 .update = base907c_update,
59 .update = base507c_update,
73};
74
75int
76base907c_new(struct nouveau_drm *drm, int head, s32 oclass,
77 struct nv50_wndw **pwndw)
78{
60};
61
62int
63base907c_new(struct nouveau_drm *drm, int head, s32 oclass,
64 struct nv50_wndw **pwndw)
65{
79 return base507c_new_(&base907c, base507c_format, drm, head, oclass, pwndw);
66 return base507c_new_(&base907c, base507c_format, drm, head, oclass,
67 0x00000002 << (head * 4), pwndw);
80}
68}