summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-21 12:46:31 +1000
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 18:51:03 +1000
commitc854bf9464500d195f1a1a2c79ef887291b9300b (patch)
treee26d99d55deb1a5e84c89672ad68ab3765d95e70 /drivers/gpu/drm/nouveau/dispnv50/headc37d.c
parent29ace860ecdf716164d9059545bbaae14cced901 (diff)
downloadlinux-stable-c854bf9464500d195f1a1a2c79ef887291b9300b.tar.gz
linux-stable-c854bf9464500d195f1a1a2c79ef887291b9300b.tar.bz2
linux-stable-c854bf9464500d195f1a1a2c79ef887291b9300b.zip
drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_or()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/headc37d.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/headc37d.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
index ba2dc5a64a69..63adfeba50e5 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
@@ -52,10 +52,12 @@ headc37d_or(struct nv50_head *head, struct nv50_head_atom *asyh)
if ((ret = PUSH_WAIT(push, 2)))
return ret;
- PUSH_NVSQ(push, NVC37D, 0x2004 + (i * 0x400), depth << 4 |
- asyh->or.nvsync << 3 |
- asyh->or.nhsync << 2 |
- asyh->or.crc_raster);
+ PUSH_MTHD(push, NVC37D, HEAD_SET_CONTROL_OUTPUT_RESOURCE(i),
+ NVVAL(NVC37D, HEAD_SET_CONTROL_OUTPUT_RESOURCE, CRC_MODE, asyh->or.crc_raster) |
+ NVVAL(NVC37D, HEAD_SET_CONTROL_OUTPUT_RESOURCE, HSYNC_POLARITY, asyh->or.nhsync) |
+ NVVAL(NVC37D, HEAD_SET_CONTROL_OUTPUT_RESOURCE, VSYNC_POLARITY, asyh->or.nvsync) |
+ NVVAL(NVC37D, HEAD_SET_CONTROL_OUTPUT_RESOURCE, PIXEL_DEPTH, depth) |
+ NVDEF(NVC37D, HEAD_SET_CONTROL_OUTPUT_RESOURCE, COLOR_SPACE_OVERRIDE, DISABLE));
return 0;
}