summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/dispnv50/pior507d.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-20 18:09:59 +1000
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 18:51:01 +1000
commit344c2e5a47960a95ef0504d8f0852005d1e199f0 (patch)
treeb5d6e99fec7da76b60dba6d196ff63a06784b489 /drivers/gpu/drm/nouveau/dispnv50/pior507d.c
parent8e650ecbcd5d769afa03618cb4c7f4a21498ecd5 (diff)
downloadlinux-344c2e5a47960a95ef0504d8f0852005d1e199f0.tar.bz2
drm/nouveau/kms/nv50-: use NVIDIA's headers for core or_ctrl()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/pior507d.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/pior507d.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/pior507d.c b/drivers/gpu/drm/nouveau/dispnv50/pior507d.c
index 6af30c1617e5..17d230256bdd 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/pior507d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/pior507d.c
@@ -23,6 +23,9 @@
#include <nvif/push507c.h>
+#include <nvhw/class/cl507d.h>
+#include <nvhw/class/cl837d.h>
+
static int
pior507d_ctrl(struct nv50_core *core, int or, u32 ctrl,
struct nv50_head_atom *asyh)
@@ -31,15 +34,15 @@ pior507d_ctrl(struct nv50_core *core, int or, u32 ctrl,
int ret;
if (asyh) {
- ctrl |= asyh->or.depth << 16;
- ctrl |= asyh->or.nvsync << 13;
- ctrl |= asyh->or.nhsync << 12;
+ ctrl |= NVVAL(NV507D, PIOR_SET_CONTROL, HSYNC_POLARITY, asyh->or.nhsync);
+ ctrl |= NVVAL(NV507D, PIOR_SET_CONTROL, VSYNC_POLARITY, asyh->or.nvsync);
+ ctrl |= NVVAL(NV837D, PIOR_SET_CONTROL, PIXEL_DEPTH, asyh->or.depth);
}
if ((ret = PUSH_WAIT(push, 2)))
return ret;
- PUSH_NVSQ(push, NV507D, 0x0700 + (or * 0x040), ctrl);
+ PUSH_MTHD(push, NV507D, PIOR_SET_CONTROL(or), ctrl);
return 0;
}