| .. | .. |
|---|
| 24 | 24 | #include "wndw.h" |
|---|
| 25 | 25 | |
|---|
| 26 | 26 | #include <nvif/clc37b.h> |
|---|
| 27 | +#include <nvif/pushc37b.h> |
|---|
| 27 | 28 | |
|---|
| 28 | | -static void |
|---|
| 29 | +#include <nvhw/class/clc37b.h> |
|---|
| 30 | + |
|---|
| 31 | +static int |
|---|
| 29 | 32 | wimmc37b_update(struct nv50_wndw *wndw, u32 *interlock) |
|---|
| 30 | 33 | { |
|---|
| 31 | | - u32 *push; |
|---|
| 32 | | - if ((push = evo_wait(&wndw->wimm, 2))) { |
|---|
| 33 | | - evo_mthd(push, 0x0200, 1); |
|---|
| 34 | | - if (interlock[NV50_DISP_INTERLOCK_WNDW] & wndw->interlock.data) |
|---|
| 35 | | - evo_data(push, 0x00000003); |
|---|
| 36 | | - else |
|---|
| 37 | | - evo_data(push, 0x00000001); |
|---|
| 38 | | - evo_kick(push, &wndw->wimm); |
|---|
| 39 | | - } |
|---|
| 34 | + struct nvif_push *push = wndw->wimm.push; |
|---|
| 35 | + int ret; |
|---|
| 36 | + |
|---|
| 37 | + if ((ret = PUSH_WAIT(push, 2))) |
|---|
| 38 | + return ret; |
|---|
| 39 | + |
|---|
| 40 | + PUSH_MTHD(push, NVC37B, UPDATE, 0x00000001 | |
|---|
| 41 | + NVVAL(NVC37B, UPDATE, INTERLOCK_WITH_WINDOW, |
|---|
| 42 | + !!(interlock[NV50_DISP_INTERLOCK_WNDW] & wndw->interlock.data))); |
|---|
| 43 | + return PUSH_KICK(push); |
|---|
| 40 | 44 | } |
|---|
| 41 | 45 | |
|---|
| 42 | | -static void |
|---|
| 46 | +static int |
|---|
| 43 | 47 | wimmc37b_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) |
|---|
| 44 | 48 | { |
|---|
| 45 | | - u32 *push; |
|---|
| 46 | | - if ((push = evo_wait(&wndw->wimm, 2))) { |
|---|
| 47 | | - evo_mthd(push, 0x0208, 1); |
|---|
| 48 | | - evo_data(push, asyw->point.y << 16 | asyw->point.x); |
|---|
| 49 | | - evo_kick(push, &wndw->wimm); |
|---|
| 50 | | - } |
|---|
| 49 | + struct nvif_push *push = wndw->wimm.push; |
|---|
| 50 | + int ret; |
|---|
| 51 | + |
|---|
| 52 | + if ((ret = PUSH_WAIT(push, 2))) |
|---|
| 53 | + return ret; |
|---|
| 54 | + |
|---|
| 55 | + PUSH_MTHD(push, NVC37B, SET_POINT_OUT(0), |
|---|
| 56 | + NVVAL(NVC37B, SET_POINT_OUT, X, asyw->point.x) | |
|---|
| 57 | + NVVAL(NVC37B, SET_POINT_OUT, Y, asyw->point.y)); |
|---|
| 58 | + return 0; |
|---|
| 51 | 59 | } |
|---|
| 52 | 60 | |
|---|
| 53 | 61 | static const struct nv50_wimm_func |
|---|