summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/dispnv50/cursc37a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/cursc37a.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/cursc37a.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/cursc37a.c b/drivers/gpu/drm/nouveau/dispnv50/cursc37a.c
index 96dff4f09f57..e39d08698c63 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/cursc37a.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/cursc37a.c
@@ -22,20 +22,29 @@
#include "curs.h"
#include "atom.h"
-static void
+#include <nvhw/class/clc37a.h>
+
+static int
cursc37a_update(struct nv50_wndw *wndw, u32 *interlock)
{
- if (curs507a_space(wndw))
- nvif_wr32(&wndw->wimm.base.user, 0x0200, 0x00000001);
+ struct nvif_object *user = &wndw->wimm.base.user;
+ int ret = nvif_chan_wait(&wndw->wimm, 1);
+ if (ret == 0)
+ NVIF_WR32(user, NVC37A, UPDATE, 0x00000001);
+ return ret;
}
-static void
+static int
cursc37a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
- if (curs507a_space(wndw)) {
- nvif_wr32(&wndw->wimm.base.user, 0x0208, asyw->point.y << 16 |
- asyw->point.x);
+ struct nvif_object *user = &wndw->wimm.base.user;
+ int ret = nvif_chan_wait(&wndw->wimm, 1);
+ if (ret == 0) {
+ NVIF_WR32(user, NVC37A, SET_CURSOR_HOT_SPOT_POINT_OUT(0),
+ NVVAL(NVC37A, SET_CURSOR_HOT_SPOT_POINT_OUT, X, asyw->point.x) |
+ NVVAL(NVC37A, SET_CURSOR_HOT_SPOT_POINT_OUT, Y, asyw->point.y));
}
+ return ret;
}
static const struct nv50_wimm_func