| .. | .. |
|---|
| 22 | 22 | #include "curs.h" |
|---|
| 23 | 23 | #include "atom.h" |
|---|
| 24 | 24 | |
|---|
| 25 | | -static void |
|---|
| 25 | +#include <nvhw/class/clc37a.h> |
|---|
| 26 | + |
|---|
| 27 | +static int |
|---|
| 26 | 28 | cursc37a_update(struct nv50_wndw *wndw, u32 *interlock) |
|---|
| 27 | 29 | { |
|---|
| 28 | | - nvif_wr32(&wndw->wimm.base.user, 0x0200, 0x00000001); |
|---|
| 30 | + struct nvif_object *user = &wndw->wimm.base.user; |
|---|
| 31 | + int ret = nvif_chan_wait(&wndw->wimm, 1); |
|---|
| 32 | + if (ret == 0) |
|---|
| 33 | + NVIF_WR32(user, NVC37A, UPDATE, 0x00000001); |
|---|
| 34 | + return ret; |
|---|
| 29 | 35 | } |
|---|
| 30 | 36 | |
|---|
| 31 | | -static void |
|---|
| 37 | +static int |
|---|
| 32 | 38 | cursc37a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) |
|---|
| 33 | 39 | { |
|---|
| 34 | | - nvif_wr32(&wndw->wimm.base.user, 0x0208, asyw->point.y << 16 | |
|---|
| 35 | | - asyw->point.x); |
|---|
| 40 | + struct nvif_object *user = &wndw->wimm.base.user; |
|---|
| 41 | + int ret = nvif_chan_wait(&wndw->wimm, 1); |
|---|
| 42 | + if (ret == 0) { |
|---|
| 43 | + NVIF_WR32(user, NVC37A, SET_CURSOR_HOT_SPOT_POINT_OUT(0), |
|---|
| 44 | + NVVAL(NVC37A, SET_CURSOR_HOT_SPOT_POINT_OUT, X, asyw->point.x) | |
|---|
| 45 | + NVVAL(NVC37A, SET_CURSOR_HOT_SPOT_POINT_OUT, Y, asyw->point.y)); |
|---|
| 46 | + } |
|---|
| 47 | + return ret; |
|---|
| 36 | 48 | } |
|---|
| 37 | 49 | |
|---|
| 38 | 50 | static const struct nv50_wimm_func |
|---|