aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/dispnv50
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-21 11:47:21 +1000
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 18:51:02 +1000
commita66a096d784843f6d4c8e4c0b028524baf747f4c (patch)
tree9a683b50cfc5f2517049fe6428578ff302782dc5 /drivers/gpu/drm/nouveau/dispnv50
parentdrm/nouveau/kms/nv50-: use NVIDIA's headers for core head_olut_set() (diff)
downloadlinux-dev-a66a096d784843f6d4c8e4c0b028524baf747f4c.tar.xz
linux-dev-a66a096d784843f6d4c8e4c0b028524baf747f4c.zip
drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_olut_clr()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/head507d.c3
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/head827d.c6
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/head907d.c6
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/headc37d.c2
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/headc57d.c2
5 files changed, 12 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head507d.c b/drivers/gpu/drm/nouveau/dispnv50/head507d.c
index f46603cc6f01..0bdacc9697f1 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/head507d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/head507d.c
@@ -256,7 +256,8 @@ head507d_olut_clr(struct nv50_head *head)
if ((ret = PUSH_WAIT(push, 2)))
return ret;
- PUSH_NVSQ(push, NV507D, 0x0840 + (i * 0x400), 0x00000000);
+ PUSH_MTHD(push, NV507D, HEAD_SET_BASE_LUT_LO(i),
+ NVDEF(NV507D, HEAD_SET_BASE_LUT_LO, ENABLE, DISABLE));
return 0;
}
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head827d.c b/drivers/gpu/drm/nouveau/dispnv50/head827d.c
index 01a8887f4bbe..6cae23fb7b44 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/head827d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/head827d.c
@@ -91,8 +91,10 @@ head827d_olut_clr(struct nv50_head *head)
if ((ret = PUSH_WAIT(push, 4)))
return ret;
- PUSH_NVSQ(push, NV827D, 0x0840 + (i * 0x400), 0x00000000);
- PUSH_NVSQ(push, NV827D, 0x085c + (i * 0x400), 0x00000000);
+ PUSH_MTHD(push, NV827D, HEAD_SET_BASE_LUT_LO(i),
+ NVDEF(NV827D, HEAD_SET_BASE_LUT_LO, ENABLE, DISABLE));
+
+ PUSH_MTHD(push, NV827D, HEAD_SET_CONTEXT_DMA_LUT(i), 0x00000000);
return 0;
}
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head907d.c b/drivers/gpu/drm/nouveau/dispnv50/head907d.c
index 69aa24bc7678..a54ac9e6d8a4 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/head907d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/head907d.c
@@ -220,8 +220,10 @@ head907d_olut_clr(struct nv50_head *head)
if ((ret = PUSH_WAIT(push, 4)))
return ret;
- PUSH_NVSQ(push, NV907D, 0x0448 + (i * 0x300), 0x00000000);
- PUSH_NVSQ(push, NV907D, 0x045c + (i * 0x300), 0x00000000);
+ PUSH_MTHD(push, NV907D, HEAD_SET_OUTPUT_LUT_LO(i),
+ NVDEF(NV907D, HEAD_SET_OUTPUT_LUT_LO, ENABLE, DISABLE));
+
+ PUSH_MTHD(push, NV907D, HEAD_SET_CONTEXT_DMA_LUT(i), 0x00000000);
return 0;
}
diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
index eb81ed1e0707..8898b65d0c41 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
@@ -143,7 +143,7 @@ headc37d_olut_clr(struct nv50_head *head)
if ((ret = PUSH_WAIT(push, 2)))
return ret;
- PUSH_NVSQ(push, NVC37D, 0x20ac + (i * 0x400), 0x00000000);
+ PUSH_MTHD(push, NVC37D, HEAD_SET_CONTEXT_DMA_OUTPUT_LUT(i), 0x00000000);
return 0;
}
diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc57d.c b/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
index 9cd4781a52ed..3c0001cd0a6a 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
@@ -85,7 +85,7 @@ headc57d_olut_clr(struct nv50_head *head)
if ((ret = PUSH_WAIT(push, 2)))
return ret;
- PUSH_NVSQ(push, NVC57D, 0x2288 + (i * 0x400), 0x00000000);
+ PUSH_MTHD(push, NVC57D, HEAD_SET_CONTEXT_DMA_OLUT(i), 0x00000000);
return 0;
}