summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-21 04:40:59 +0200
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 10:51:03 +0200
commit29ace860ecdf716164d9059545bbaae14cced901 (patch)
tree04f35d912b057a72ab98b30c18516dd4633ea3c8 /drivers/gpu/drm/nouveau/dispnv50/headc37d.c
parentdrm/nouveau/kms/nv50-: use NVIDIA's headers for core head_dither() (diff)
downloadlinux-29ace860ecdf716164d9059545bbaae14cced901.tar.xz
linux-29ace860ecdf716164d9059545bbaae14cced901.zip
drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_procamp()
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.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
index 172773b6f41b..ba2dc5a64a69 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
@@ -69,9 +69,14 @@ headc37d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
if ((ret = PUSH_WAIT(push, 2)))
return ret;
- PUSH_NVSQ(push, NVC37D, 0x2000 + (i * 0x400), 0x80000000 |
- asyh->procamp.sat.sin << 16 |
- asyh->procamp.sat.cos << 4);
+ PUSH_MTHD(push, NVC37D, HEAD_SET_PROCAMP(i),
+ NVDEF(NVC37D, HEAD_SET_PROCAMP, COLOR_SPACE, RGB) |
+ NVDEF(NVC37D, HEAD_SET_PROCAMP, CHROMA_LPF, DISABLE) |
+ NVVAL(NVC37D, HEAD_SET_PROCAMP, SAT_COS, asyh->procamp.sat.cos) |
+ NVVAL(NVC37D, HEAD_SET_PROCAMP, SAT_SINE, asyh->procamp.sat.sin) |
+ NVDEF(NVC37D, HEAD_SET_PROCAMP, DYNAMIC_RANGE, VESA) |
+ NVDEF(NVC37D, HEAD_SET_PROCAMP, RANGE_COMPRESSION, DISABLE) |
+ NVDEF(NVC37D, HEAD_SET_PROCAMP, BLACK_LEVEL, GRAPHICS));
return 0;
}