Skip to content

Commit 35cefc5

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

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,21 @@ head507d_ovly(struct nv50_head *head, struct nv50_head_atom *asyh)
6767

6868
if (asyh->ovly.cpp) {
6969
switch (asyh->ovly.cpp) {
70-
case 4: bounds |= 0x00000300; break;
71-
case 2: bounds |= 0x00000100; break;
70+
case 4: bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_32); break;
71+
case 2: bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_16); break;
7272
default:
7373
WARN_ON(1);
7474
break;
7575
}
76-
bounds |= 0x00000001;
76+
bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, USABLE, TRUE);
7777
} else {
78-
bounds |= 0x00000100;
78+
bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_16);
7979
}
8080

8181
if ((ret = PUSH_WAIT(push, 2)))
8282
return ret;
8383

84-
PUSH_NVSQ(push, NV507D, 0x0904 + (i * 0x400), bounds);
84+
PUSH_MTHD(push, NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS(i), bounds);
8585
return 0;
8686
}
8787

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,22 @@ head907d_ovly(struct nv50_head *head, struct nv50_head_atom *asyh)
9494

9595
if (asyh->ovly.cpp) {
9696
switch (asyh->ovly.cpp) {
97-
case 8: bounds |= 0x00000500; break;
98-
case 4: bounds |= 0x00000300; break;
99-
case 2: bounds |= 0x00000100; break;
97+
case 8: bounds |= NVDEF(NV907D, HEAD_SET_OVERLAY_USAGE_BOUNDS, PIXEL_DEPTH, BPP_64); break;
98+
case 4: bounds |= NVDEF(NV907D, HEAD_SET_OVERLAY_USAGE_BOUNDS, PIXEL_DEPTH, BPP_32); break;
99+
case 2: bounds |= NVDEF(NV907D, HEAD_SET_OVERLAY_USAGE_BOUNDS, PIXEL_DEPTH, BPP_16); break;
100100
default:
101101
WARN_ON(1);
102102
break;
103103
}
104-
bounds |= 0x00000001;
104+
bounds |= NVDEF(NV907D, HEAD_SET_OVERLAY_USAGE_BOUNDS, USABLE, TRUE);
105105
} else {
106-
bounds |= 0x00000100;
106+
bounds |= NVDEF(NV907D, HEAD_SET_OVERLAY_USAGE_BOUNDS, PIXEL_DEPTH, BPP_16);
107107
}
108108

109109
if ((ret = PUSH_WAIT(push, 2)))
110110
return ret;
111111

112-
PUSH_NVSQ(push, NV907D, 0x04d4 + (i * 0x300), bounds);
112+
PUSH_MTHD(push, NV907D, HEAD_SET_OVERLAY_USAGE_BOUNDS(i), bounds);
113113
return 0;
114114
}
115115

0 commit comments

Comments
 (0)