|
@@ -23,31 +23,28 @@
|
|
|
*/
|
|
|
#include "dmacnv50.h"
|
|
|
#include "head.h"
|
|
|
-#include "rootnv50.h"
|
|
|
|
|
|
#include <core/client.h>
|
|
|
|
|
|
-#include <nvif/class.h>
|
|
|
#include <nvif/cl507e.h>
|
|
|
#include <nvif/unpack.h>
|
|
|
|
|
|
int
|
|
|
-nv50_disp_ovly_new(const struct nv50_disp_dmac_func *func,
|
|
|
- const struct nv50_disp_chan_mthd *mthd,
|
|
|
- struct nv50_disp_root *root, int chid,
|
|
|
- const struct nvkm_oclass *oclass, void *data, u32 size,
|
|
|
- struct nvkm_object **pobject)
|
|
|
+nv50_disp_ovly_new_(const struct nv50_disp_dmac_func *func,
|
|
|
+ const struct nv50_disp_chan_mthd *mthd,
|
|
|
+ struct nv50_disp *disp, int chid,
|
|
|
+ const struct nvkm_oclass *oclass, void *argv, u32 argc,
|
|
|
+ struct nvkm_object **pobject)
|
|
|
{
|
|
|
union {
|
|
|
struct nv50_disp_overlay_channel_dma_v0 v0;
|
|
|
- } *args = data;
|
|
|
+ } *args = argv;
|
|
|
struct nvkm_object *parent = oclass->parent;
|
|
|
- struct nv50_disp *disp = root->disp;
|
|
|
int head, ret = -ENOSYS;
|
|
|
u64 push;
|
|
|
|
|
|
- nvif_ioctl(parent, "create disp overlay channel dma size %d\n", size);
|
|
|
- if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, false))) {
|
|
|
+ nvif_ioctl(parent, "create disp overlay channel dma size %d\n", argc);
|
|
|
+ if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, false))) {
|
|
|
nvif_ioctl(parent, "create disp overlay channel dma vers %d "
|
|
|
"pushbuf %016llx head %d\n",
|
|
|
args->v0.version, args->v0.pushbuf, args->v0.head);
|
|
@@ -91,7 +88,7 @@ nv50_disp_ovly_mthd_base = {
|
|
|
};
|
|
|
|
|
|
static const struct nv50_disp_chan_mthd
|
|
|
-nv50_disp_ovly_chan_mthd = {
|
|
|
+nv50_disp_ovly_mthd = {
|
|
|
.name = "Overlay",
|
|
|
.addr = 0x000540,
|
|
|
.prev = 0x000004,
|
|
@@ -101,13 +98,10 @@ nv50_disp_ovly_chan_mthd = {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-const struct nv50_disp_dmac_oclass
|
|
|
-nv50_disp_ovly_oclass = {
|
|
|
- .base.oclass = NV50_DISP_OVERLAY_CHANNEL_DMA,
|
|
|
- .base.minver = 0,
|
|
|
- .base.maxver = 0,
|
|
|
- .ctor = nv50_disp_ovly_new,
|
|
|
- .func = &nv50_disp_dmac_func,
|
|
|
- .mthd = &nv50_disp_ovly_chan_mthd,
|
|
|
- .chid = 3,
|
|
|
-};
|
|
|
+int
|
|
|
+nv50_disp_ovly_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
|
|
|
+ struct nv50_disp *disp, struct nvkm_object **pobject)
|
|
|
+{
|
|
|
+ return nv50_disp_ovly_new_(&nv50_disp_dmac_func, &nv50_disp_ovly_mthd,
|
|
|
+ disp, 3, oclass, argv, argc, pobject);
|
|
|
+}
|