Skip to content

Commit a66a096

Browse files
author
Ben Skeggs
committed
drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_olut_clr()
Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]>
1 parent a41ef36 commit a66a096

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

drivers/gpu/drm/nouveau/dispnv50/head507d.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ head507d_olut_clr(struct nv50_head *head)
256256
if ((ret = PUSH_WAIT(push, 2)))
257257
return ret;
258258

259-
PUSH_NVSQ(push, NV507D, 0x0840 + (i * 0x400), 0x00000000);
259+
PUSH_MTHD(push, NV507D, HEAD_SET_BASE_LUT_LO(i),
260+
NVDEF(NV507D, HEAD_SET_BASE_LUT_LO, ENABLE, DISABLE));
260261
return 0;
261262
}
262263

drivers/gpu/drm/nouveau/dispnv50/head827d.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ head827d_olut_clr(struct nv50_head *head)
9191
if ((ret = PUSH_WAIT(push, 4)))
9292
return ret;
9393

94-
PUSH_NVSQ(push, NV827D, 0x0840 + (i * 0x400), 0x00000000);
95-
PUSH_NVSQ(push, NV827D, 0x085c + (i * 0x400), 0x00000000);
94+
PUSH_MTHD(push, NV827D, HEAD_SET_BASE_LUT_LO(i),
95+
NVDEF(NV827D, HEAD_SET_BASE_LUT_LO, ENABLE, DISABLE));
96+
97+
PUSH_MTHD(push, NV827D, HEAD_SET_CONTEXT_DMA_LUT(i), 0x00000000);
9698
return 0;
9799
}
98100

drivers/gpu/drm/nouveau/dispnv50/head907d.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,10 @@ head907d_olut_clr(struct nv50_head *head)
220220
if ((ret = PUSH_WAIT(push, 4)))
221221
return ret;
222222

223-
PUSH_NVSQ(push, NV907D, 0x0448 + (i * 0x300), 0x00000000);
224-
PUSH_NVSQ(push, NV907D, 0x045c + (i * 0x300), 0x00000000);
223+
PUSH_MTHD(push, NV907D, HEAD_SET_OUTPUT_LUT_LO(i),
224+
NVDEF(NV907D, HEAD_SET_OUTPUT_LUT_LO, ENABLE, DISABLE));
225+
226+
PUSH_MTHD(push, NV907D, HEAD_SET_CONTEXT_DMA_LUT(i), 0x00000000);
225227
return 0;
226228
}
227229

drivers/gpu/drm/nouveau/dispnv50/headc37d.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ headc37d_olut_clr(struct nv50_head *head)
143143
if ((ret = PUSH_WAIT(push, 2)))
144144
return ret;
145145

146-
PUSH_NVSQ(push, NVC37D, 0x20ac + (i * 0x400), 0x00000000);
146+
PUSH_MTHD(push, NVC37D, HEAD_SET_CONTEXT_DMA_OUTPUT_LUT(i), 0x00000000);
147147
return 0;
148148
}
149149

drivers/gpu/drm/nouveau/dispnv50/headc57d.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ headc57d_olut_clr(struct nv50_head *head)
8585
if ((ret = PUSH_WAIT(push, 2)))
8686
return ret;
8787

88-
PUSH_NVSQ(push, NVC57D, 0x2288 + (i * 0x400), 0x00000000);
88+
PUSH_MTHD(push, NVC57D, HEAD_SET_CONTEXT_DMA_OLUT(i), 0x00000000);
8989
return 0;
9090
}
9191

0 commit comments

Comments
 (0)