Commit b11d8ca1 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/kms/nv50-: use NVIDIA's headers for core init()

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 9f7ffb49
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include <nvif/push507c.h> #include <nvif/push507c.h>
#include <nvif/timer.h> #include <nvif/timer.h>
#include <nvhw/class/cl507d.h>
#include "nouveau_bo.h" #include "nouveau_bo.h"
int int
...@@ -86,7 +88,7 @@ core507d_init(struct nv50_core *core) ...@@ -86,7 +88,7 @@ core507d_init(struct nv50_core *core)
if ((ret = PUSH_WAIT(push, 2))) if ((ret = PUSH_WAIT(push, 2)))
return ret; return ret;
PUSH_NVSQ(push, NV507D, 0x0088, core->chan.sync.handle); PUSH_MTHD(push, NV507D, SET_CONTEXT_DMA_NOTIFIER, core->chan.sync.handle);
return PUSH_KICK(push); return PUSH_KICK(push);
} }
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include <nvif/pushc37b.h> #include <nvif/pushc37b.h>
#include <nvif/timer.h> #include <nvif/timer.h>
#include <nvhw/class/clc37d.h>
#include <nouveau_bo.h> #include <nouveau_bo.h>
int int
...@@ -123,12 +125,23 @@ corec37d_init(struct nv50_core *core) ...@@ -123,12 +125,23 @@ corec37d_init(struct nv50_core *core)
if ((ret = PUSH_WAIT(push, 2 + windows * 5))) if ((ret = PUSH_WAIT(push, 2 + windows * 5)))
return ret; return ret;
PUSH_NVSQ(push, NVC37D, 0x0208, core->chan.sync.handle); PUSH_MTHD(push, NVC37D, SET_CONTEXT_DMA_NOTIFIER, core->chan.sync.handle);
for (i = 0; i < windows; i++) { for (i = 0; i < windows; i++) {
PUSH_NVSQ(push, NVC37D, 0x1004 + (i * 0x080), 0x0000001f, PUSH_MTHD(push, NVC37D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS(i),
0x1008 + (i * 0x080), 0x00000000); NVDEF(NVC37D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, RGB_PACKED1BPP, TRUE) |
PUSH_NVSQ(push, NVC37D, 0x1010 + (i * 0x080), 0x00127fff); NVDEF(NVC37D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, RGB_PACKED2BPP, TRUE) |
NVDEF(NVC37D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, RGB_PACKED4BPP, TRUE) |
NVDEF(NVC37D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, RGB_PACKED8BPP, TRUE) |
NVDEF(NVC37D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, YUV_PACKED422, TRUE),
WINDOW_SET_WINDOW_ROTATED_FORMAT_USAGE_BOUNDS(i), 0x00000000);
PUSH_MTHD(push, NVC37D, WINDOW_SET_WINDOW_USAGE_BOUNDS(i),
NVVAL(NVC37D, WINDOW_SET_WINDOW_USAGE_BOUNDS, MAX_PIXELS_FETCHED_PER_LINE, 0x7fff) |
NVDEF(NVC37D, WINDOW_SET_WINDOW_USAGE_BOUNDS, INPUT_LUT, USAGE_1025) |
NVDEF(NVC37D, WINDOW_SET_WINDOW_USAGE_BOUNDS, INPUT_SCALER_TAPS, TAPS_2) |
NVDEF(NVC37D, WINDOW_SET_WINDOW_USAGE_BOUNDS, UPSCALING_ALLOWED, FALSE));
} }
core->assign_windows = true; core->assign_windows = true;
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#include <nvif/pushc37b.h> #include <nvif/pushc37b.h>
#include <nvhw/class/clc57d.h>
static int static int
corec57d_init(struct nv50_core *core) corec57d_init(struct nv50_core *core)
{ {
...@@ -34,12 +36,22 @@ corec57d_init(struct nv50_core *core) ...@@ -34,12 +36,22 @@ corec57d_init(struct nv50_core *core)
if ((ret = PUSH_WAIT(push, 2 + windows * 5))) if ((ret = PUSH_WAIT(push, 2 + windows * 5)))
return ret; return ret;
PUSH_NVSQ(push, NVC57D, 0x0208, core->chan.sync.handle); PUSH_MTHD(push, NVC57D, SET_CONTEXT_DMA_NOTIFIER, core->chan.sync.handle);
for (i = 0; i < windows; i++) { for (i = 0; i < windows; i++) {
PUSH_NVSQ(push, NVC57D, 0x1004 + (i * 0x080), 0x0000000f, PUSH_MTHD(push, NVC57D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS(i),
0x1008 + (i * 0x080), 0x00000000); NVDEF(NVC57D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, RGB_PACKED1BPP, TRUE) |
PUSH_NVSQ(push, NVC57D, 0x1010 + (i * 0x080), 0x00117fff); NVDEF(NVC57D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, RGB_PACKED2BPP, TRUE) |
NVDEF(NVC57D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, RGB_PACKED4BPP, TRUE) |
NVDEF(NVC57D, WINDOW_SET_WINDOW_FORMAT_USAGE_BOUNDS, RGB_PACKED8BPP, TRUE),
WINDOW_SET_WINDOW_ROTATED_FORMAT_USAGE_BOUNDS(i), 0x00000000);
PUSH_MTHD(push, NVC57D, WINDOW_SET_WINDOW_USAGE_BOUNDS(i),
NVVAL(NVC57D, WINDOW_SET_WINDOW_USAGE_BOUNDS, MAX_PIXELS_FETCHED_PER_LINE, 0x7fff) |
NVDEF(NVC57D, WINDOW_SET_WINDOW_USAGE_BOUNDS, ILUT_ALLOWED, TRUE) |
NVDEF(NVC57D, WINDOW_SET_WINDOW_USAGE_BOUNDS, INPUT_SCALER_TAPS, TAPS_2) |
NVDEF(NVC57D, WINDOW_SET_WINDOW_USAGE_BOUNDS, UPSCALING_ALLOWED, FALSE));
} }
core->assign_windows = true; core->assign_windows = true;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment