diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-20 18:09:59 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 18:51:01 +1000 |
commit | 344c2e5a47960a95ef0504d8f0852005d1e199f0 (patch) | |
tree | b5d6e99fec7da76b60dba6d196ff63a06784b489 /drivers/gpu/drm/nouveau/dispnv50/dac507d.c | |
parent | 8e650ecbcd5d769afa03618cb4c7f4a21498ecd5 (diff) |
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/dac507d.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/dac507d.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/dac507d.c b/drivers/gpu/drm/nouveau/dispnv50/dac507d.c index 4f424c65ebf9..09de78d96679 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/dac507d.c +++ b/drivers/gpu/drm/nouveau/dispnv50/dac507d.c @@ -23,6 +23,8 @@ #include <nvif/push507c.h> +#include <nvhw/class/cl507d.h> + static int dac507d_ctrl(struct nv50_core *core, int or, u32 ctrl, struct nv50_head_atom *asyh) @@ -32,15 +34,15 @@ dac507d_ctrl(struct nv50_core *core, int or, u32 ctrl, int ret; if (asyh) { - sync |= asyh->or.nvsync << 1; - sync |= asyh->or.nhsync; + sync |= NVVAL(NV507D, DAC_SET_POLARITY, HSYNC, asyh->or.nhsync); + sync |= NVVAL(NV507D, DAC_SET_POLARITY, VSYNC, asyh->or.nvsync); } if ((ret = PUSH_WAIT(push, 3))) return ret; - PUSH_NVSQ(push, NV507D, 0x0400 + (or * 0x080), ctrl, - 0x0404 + (or * 0x080), sync); + PUSH_MTHD(push, NV507D, DAC_SET_CONTROL(or), ctrl, + DAC_SET_POLARITY(or), sync); return 0; } |