Loading drivers/gpu/drm/nouveau/dispnv50/curs507a.c +4 −2 Original line number Original line Diff line number Diff line Loading @@ -55,10 +55,12 @@ curs507a_update(struct nv50_wndw *wndw, u32 *interlock) static int static int curs507a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) curs507a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) { { struct nvif_object *user = &wndw->wimm.base.user; int ret = nvif_chan_wait(&wndw->wimm, 1); int ret = nvif_chan_wait(&wndw->wimm, 1); if (ret == 0) { if (ret == 0) { nvif_wr32(&wndw->wimm.base.user, 0x0084, asyw->point.y << 16 | NVIF_WR32(user, NV507A, SET_CURSOR_HOT_SPOT_POINT_OUT, asyw->point.x); NVVAL(NV507A, SET_CURSOR_HOT_SPOT_POINT_OUT, X, asyw->point.x) | NVVAL(NV507A, SET_CURSOR_HOT_SPOT_POINT_OUT, Y, asyw->point.y)); } } return ret; return ret; } } Loading drivers/gpu/drm/nouveau/dispnv50/cursc37a.c +6 −2 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,8 @@ #include "curs.h" #include "curs.h" #include "atom.h" #include "atom.h" #include <nvhw/class/clc37a.h> static int static int cursc37a_update(struct nv50_wndw *wndw, u32 *interlock) cursc37a_update(struct nv50_wndw *wndw, u32 *interlock) { { Loading @@ -34,10 +36,12 @@ cursc37a_update(struct nv50_wndw *wndw, u32 *interlock) static int static int cursc37a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) cursc37a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) { { struct nvif_object *user = &wndw->wimm.base.user; int ret = nvif_chan_wait(&wndw->wimm, 1); int ret = nvif_chan_wait(&wndw->wimm, 1); if (ret == 0) { if (ret == 0) { nvif_wr32(&wndw->wimm.base.user, 0x0208, asyw->point.y << 16 | NVIF_WR32(user, NVC37A, SET_CURSOR_HOT_SPOT_POINT_OUT(0), asyw->point.x); 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; return ret; } } Loading drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c +5 −1 Original line number Original line Diff line number Diff line Loading @@ -26,6 +26,8 @@ #include <nvif/clc37b.h> #include <nvif/clc37b.h> #include <nvif/pushc37b.h> #include <nvif/pushc37b.h> #include <nvhw/class/clc37b.h> static int static int wimmc37b_update(struct nv50_wndw *wndw, u32 *interlock) wimmc37b_update(struct nv50_wndw *wndw, u32 *interlock) { { Loading @@ -50,7 +52,9 @@ wimmc37b_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) if ((ret = PUSH_WAIT(push, 2))) if ((ret = PUSH_WAIT(push, 2))) return ret; return ret; PUSH_NVSQ(push, NVC37B, 0x0208, asyw->point.y << 16 | asyw->point.x); PUSH_MTHD(push, NVC37B, SET_POINT_OUT(0), NVVAL(NVC37B, SET_POINT_OUT, X, asyw->point.x) | NVVAL(NVC37B, SET_POINT_OUT, Y, asyw->point.y)); return 0; return 0; } } Loading drivers/gpu/drm/nouveau/include/nvhw/class/clc37a.h 0 → 100644 +31 −0 Original line number Original line Diff line number Diff line /* * Copyright (c) 1993-2017, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #ifndef _clc37a__h_ #define _clc37a__h_ #define NVC37A_UPDATE (0x00000200) #define NVC37A_SET_CURSOR_HOT_SPOT_POINT_OUT(b) (0x00000208 + (b)*0x00000004) #define NVC37A_SET_CURSOR_HOT_SPOT_POINT_OUT_X 15:0 #define NVC37A_SET_CURSOR_HOT_SPOT_POINT_OUT_Y 31:16 #endif // _clc37a_h Loading
drivers/gpu/drm/nouveau/dispnv50/curs507a.c +4 −2 Original line number Original line Diff line number Diff line Loading @@ -55,10 +55,12 @@ curs507a_update(struct nv50_wndw *wndw, u32 *interlock) static int static int curs507a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) curs507a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) { { struct nvif_object *user = &wndw->wimm.base.user; int ret = nvif_chan_wait(&wndw->wimm, 1); int ret = nvif_chan_wait(&wndw->wimm, 1); if (ret == 0) { if (ret == 0) { nvif_wr32(&wndw->wimm.base.user, 0x0084, asyw->point.y << 16 | NVIF_WR32(user, NV507A, SET_CURSOR_HOT_SPOT_POINT_OUT, asyw->point.x); NVVAL(NV507A, SET_CURSOR_HOT_SPOT_POINT_OUT, X, asyw->point.x) | NVVAL(NV507A, SET_CURSOR_HOT_SPOT_POINT_OUT, Y, asyw->point.y)); } } return ret; return ret; } } Loading
drivers/gpu/drm/nouveau/dispnv50/cursc37a.c +6 −2 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,8 @@ #include "curs.h" #include "curs.h" #include "atom.h" #include "atom.h" #include <nvhw/class/clc37a.h> static int static int cursc37a_update(struct nv50_wndw *wndw, u32 *interlock) cursc37a_update(struct nv50_wndw *wndw, u32 *interlock) { { Loading @@ -34,10 +36,12 @@ cursc37a_update(struct nv50_wndw *wndw, u32 *interlock) static int static int cursc37a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) cursc37a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) { { struct nvif_object *user = &wndw->wimm.base.user; int ret = nvif_chan_wait(&wndw->wimm, 1); int ret = nvif_chan_wait(&wndw->wimm, 1); if (ret == 0) { if (ret == 0) { nvif_wr32(&wndw->wimm.base.user, 0x0208, asyw->point.y << 16 | NVIF_WR32(user, NVC37A, SET_CURSOR_HOT_SPOT_POINT_OUT(0), asyw->point.x); 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; return ret; } } Loading
drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c +5 −1 Original line number Original line Diff line number Diff line Loading @@ -26,6 +26,8 @@ #include <nvif/clc37b.h> #include <nvif/clc37b.h> #include <nvif/pushc37b.h> #include <nvif/pushc37b.h> #include <nvhw/class/clc37b.h> static int static int wimmc37b_update(struct nv50_wndw *wndw, u32 *interlock) wimmc37b_update(struct nv50_wndw *wndw, u32 *interlock) { { Loading @@ -50,7 +52,9 @@ wimmc37b_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) if ((ret = PUSH_WAIT(push, 2))) if ((ret = PUSH_WAIT(push, 2))) return ret; return ret; PUSH_NVSQ(push, NVC37B, 0x0208, asyw->point.y << 16 | asyw->point.x); PUSH_MTHD(push, NVC37B, SET_POINT_OUT(0), NVVAL(NVC37B, SET_POINT_OUT, X, asyw->point.x) | NVVAL(NVC37B, SET_POINT_OUT, Y, asyw->point.y)); return 0; return 0; } } Loading
drivers/gpu/drm/nouveau/include/nvhw/class/clc37a.h 0 → 100644 +31 −0 Original line number Original line Diff line number Diff line /* * Copyright (c) 1993-2017, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #ifndef _clc37a__h_ #define _clc37a__h_ #define NVC37A_UPDATE (0x00000200) #define NVC37A_SET_CURSOR_HOT_SPOT_POINT_OUT(b) (0x00000208 + (b)*0x00000004) #define NVC37A_SET_CURSOR_HOT_SPOT_POINT_OUT_X 15:0 #define NVC37A_SET_CURSOR_HOT_SPOT_POINT_OUT_Y 31:16 #endif // _clc37a_h