summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2016-11-16 14:49:35 +1000
committerBen Skeggs <bskeggs@redhat.com>2016-11-16 15:18:48 +1000
commit0d874f550816a6d7038658c3ec78c992e40c132f (patch)
treefcf1ac6eb0faf12a8023f852774dba0576931ea6
parent88a1b714678ad1f5bda441052383e70a9d52f100 (diff)
downloadnouveau-0d874f550816a6d7038658c3ec78c992e40c132f.tar.gz
disp/nv50-: specify ctrl/user separately when constructing classes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drm/nouveau/nvkm/engine/disp/channv50.c11
-rw-r--r--drm/nouveau/nvkm/engine/disp/channv50.h15
-rw-r--r--drm/nouveau/nvkm/engine/disp/cursg84.c2
-rw-r--r--drm/nouveau/nvkm/engine/disp/cursgf119.c2
-rw-r--r--drm/nouveau/nvkm/engine/disp/cursgk104.c2
-rw-r--r--drm/nouveau/nvkm/engine/disp/cursgt215.c2
-rw-r--r--drm/nouveau/nvkm/engine/disp/cursnv50.c6
-rw-r--r--drm/nouveau/nvkm/engine/disp/dmacnv50.c2
-rw-r--r--drm/nouveau/nvkm/engine/disp/oimmg84.c2
-rw-r--r--drm/nouveau/nvkm/engine/disp/oimmgf119.c2
-rw-r--r--drm/nouveau/nvkm/engine/disp/oimmgk104.c2
-rw-r--r--drm/nouveau/nvkm/engine/disp/oimmgt215.c2
-rw-r--r--drm/nouveau/nvkm/engine/disp/oimmnv50.c6
-rw-r--r--drm/nouveau/nvkm/engine/disp/rootnv50.c4
14 files changed, 32 insertions, 28 deletions
diff --git a/drm/nouveau/nvkm/engine/disp/channv50.c b/drm/nouveau/nvkm/engine/disp/channv50.c
index 566d2d1b8..524a24eae 100644
--- a/drm/nouveau/nvkm/engine/disp/channv50.c
+++ b/drm/nouveau/nvkm/engine/disp/channv50.c
@@ -263,7 +263,7 @@ nv50_disp_chan = {
int
nv50_disp_chan_ctor(const struct nv50_disp_chan_func *func,
const struct nv50_disp_chan_mthd *mthd,
- struct nv50_disp_root *root, int chid, int head,
+ struct nv50_disp_root *root, int ctrl, int user, int head,
const struct nvkm_oclass *oclass,
struct nv50_disp_chan *chan)
{
@@ -273,8 +273,8 @@ nv50_disp_chan_ctor(const struct nv50_disp_chan_func *func,
chan->func = func;
chan->mthd = mthd;
chan->root = root;
- chan->chid.ctrl = chid;
- chan->chid.user = chid;
+ chan->chid.ctrl = ctrl;
+ chan->chid.user = user;
chan->head = head;
if (disp->chan[chan->chid.user]) {
@@ -288,7 +288,7 @@ nv50_disp_chan_ctor(const struct nv50_disp_chan_func *func,
int
nv50_disp_chan_new_(const struct nv50_disp_chan_func *func,
const struct nv50_disp_chan_mthd *mthd,
- struct nv50_disp_root *root, int chid, int head,
+ struct nv50_disp_root *root, int ctrl, int user, int head,
const struct nvkm_oclass *oclass,
struct nvkm_object **pobject)
{
@@ -298,5 +298,6 @@ nv50_disp_chan_new_(const struct nv50_disp_chan_func *func,
return -ENOMEM;
*pobject = &chan->object;
- return nv50_disp_chan_ctor(func, mthd, root, chid, head, oclass, chan);
+ return nv50_disp_chan_ctor(func, mthd, root, ctrl, user,
+ head, oclass, chan);
}
diff --git a/drm/nouveau/nvkm/engine/disp/channv50.h b/drm/nouveau/nvkm/engine/disp/channv50.h
index de8db9cfe..1897e5b67 100644
--- a/drm/nouveau/nvkm/engine/disp/channv50.h
+++ b/drm/nouveau/nvkm/engine/disp/channv50.h
@@ -29,11 +29,11 @@ struct nv50_disp_chan_func {
int nv50_disp_chan_ctor(const struct nv50_disp_chan_func *,
const struct nv50_disp_chan_mthd *,
- struct nv50_disp_root *, int chid, int head,
+ struct nv50_disp_root *, int ctrl, int user, int head,
const struct nvkm_oclass *, struct nv50_disp_chan *);
int nv50_disp_chan_new_(const struct nv50_disp_chan_func *,
const struct nv50_disp_chan_mthd *,
- struct nv50_disp_root *, int chid, int head,
+ struct nv50_disp_root *, int ctrl, int user, int head,
const struct nvkm_oclass *, struct nvkm_object **);
extern const struct nv50_disp_chan_func nv50_disp_pioc_func;
@@ -94,13 +94,16 @@ extern const struct nv50_disp_chan_mthd gk104_disp_ovly_chan_mthd;
struct nv50_disp_pioc_oclass {
int (*ctor)(const struct nv50_disp_chan_func *,
const struct nv50_disp_chan_mthd *,
- struct nv50_disp_root *, int chid,
+ struct nv50_disp_root *, int ctrl, int user,
const struct nvkm_oclass *, void *data, u32 size,
struct nvkm_object **);
struct nvkm_sclass base;
const struct nv50_disp_chan_func *func;
const struct nv50_disp_chan_mthd *mthd;
- int chid;
+ struct {
+ int ctrl;
+ int user;
+ } chid;
};
extern const struct nv50_disp_pioc_oclass nv50_disp_oimm_oclass;
@@ -121,12 +124,12 @@ extern const struct nv50_disp_pioc_oclass gk104_disp_curs_oclass;
int nv50_disp_curs_new(const struct nv50_disp_chan_func *,
const struct nv50_disp_chan_mthd *,
- struct nv50_disp_root *, int chid,
+ struct nv50_disp_root *, int ctrl, int user,
const struct nvkm_oclass *, void *data, u32 size,
struct nvkm_object **);
int nv50_disp_oimm_new(const struct nv50_disp_chan_func *,
const struct nv50_disp_chan_mthd *,
- struct nv50_disp_root *, int chid,
+ struct nv50_disp_root *, int ctrl, int user,
const struct nvkm_oclass *, void *data, u32 size,
struct nvkm_object **);
#endif
diff --git a/drm/nouveau/nvkm/engine/disp/cursg84.c b/drm/nouveau/nvkm/engine/disp/cursg84.c
index dd99fc706..fa781b5a7 100644
--- a/drm/nouveau/nvkm/engine/disp/cursg84.c
+++ b/drm/nouveau/nvkm/engine/disp/cursg84.c
@@ -33,5 +33,5 @@ g84_disp_curs_oclass = {
.base.maxver = 0,
.ctor = nv50_disp_curs_new,
.func = &nv50_disp_pioc_func,
- .chid = 7,
+ .chid = { 7, 7 },
};
diff --git a/drm/nouveau/nvkm/engine/disp/cursgf119.c b/drm/nouveau/nvkm/engine/disp/cursgf119.c
index 2a1574e06..2be6fb052 100644
--- a/drm/nouveau/nvkm/engine/disp/cursgf119.c
+++ b/drm/nouveau/nvkm/engine/disp/cursgf119.c
@@ -33,5 +33,5 @@ gf119_disp_curs_oclass = {
.base.maxver = 0,
.ctor = nv50_disp_curs_new,
.func = &gf119_disp_pioc_func,
- .chid = 13,
+ .chid = { 13, 13 },
};
diff --git a/drm/nouveau/nvkm/engine/disp/cursgk104.c b/drm/nouveau/nvkm/engine/disp/cursgk104.c
index 28e8f06c9..2a99db4bf 100644
--- a/drm/nouveau/nvkm/engine/disp/cursgk104.c
+++ b/drm/nouveau/nvkm/engine/disp/cursgk104.c
@@ -33,5 +33,5 @@ gk104_disp_curs_oclass = {
.base.maxver = 0,
.ctor = nv50_disp_curs_new,
.func = &gf119_disp_pioc_func,
- .chid = 13,
+ .chid = { 13, 13 },
};
diff --git a/drm/nouveau/nvkm/engine/disp/cursgt215.c b/drm/nouveau/nvkm/engine/disp/cursgt215.c
index d8a4b9ca1..00a7f3564 100644
--- a/drm/nouveau/nvkm/engine/disp/cursgt215.c
+++ b/drm/nouveau/nvkm/engine/disp/cursgt215.c
@@ -33,5 +33,5 @@ gt215_disp_curs_oclass = {
.base.maxver = 0,
.ctor = nv50_disp_curs_new,
.func = &nv50_disp_pioc_func,
- .chid = 7,
+ .chid = { 7, 7 },
};
diff --git a/drm/nouveau/nvkm/engine/disp/cursnv50.c b/drm/nouveau/nvkm/engine/disp/cursnv50.c
index 8b1320499..82ff82d8c 100644
--- a/drm/nouveau/nvkm/engine/disp/cursnv50.c
+++ b/drm/nouveau/nvkm/engine/disp/cursnv50.c
@@ -33,7 +33,7 @@
int
nv50_disp_curs_new(const struct nv50_disp_chan_func *func,
const struct nv50_disp_chan_mthd *mthd,
- struct nv50_disp_root *root, int chid,
+ struct nv50_disp_root *root, int ctrl, int user,
const struct nvkm_oclass *oclass, void *data, u32 size,
struct nvkm_object **pobject)
{
@@ -54,7 +54,7 @@ nv50_disp_curs_new(const struct nv50_disp_chan_func *func,
} else
return ret;
- return nv50_disp_chan_new_(func, mthd, root, chid + head,
+ return nv50_disp_chan_new_(func, mthd, root, ctrl + head, user + head,
head, oclass, pobject);
}
@@ -65,5 +65,5 @@ nv50_disp_curs_oclass = {
.base.maxver = 0,
.ctor = nv50_disp_curs_new,
.func = &nv50_disp_pioc_func,
- .chid = 7,
+ .chid = { 7, 7 },
};
diff --git a/drm/nouveau/nvkm/engine/disp/dmacnv50.c b/drm/nouveau/nvkm/engine/disp/dmacnv50.c
index cfba994be..0a1381a84 100644
--- a/drm/nouveau/nvkm/engine/disp/dmacnv50.c
+++ b/drm/nouveau/nvkm/engine/disp/dmacnv50.c
@@ -149,7 +149,7 @@ nv50_disp_dmac_new_(const struct nv50_disp_dmac_func *func,
chan->func = func;
ret = nv50_disp_chan_ctor(&nv50_disp_dmac_func_, mthd, root,
- chid, head, oclass, &chan->base);
+ chid, chid, head, oclass, &chan->base);
if (ret)
return ret;
diff --git a/drm/nouveau/nvkm/engine/disp/oimmg84.c b/drm/nouveau/nvkm/engine/disp/oimmg84.c
index 54a4ae8d6..5ad5d0f5d 100644
--- a/drm/nouveau/nvkm/engine/disp/oimmg84.c
+++ b/drm/nouveau/nvkm/engine/disp/oimmg84.c
@@ -33,5 +33,5 @@ g84_disp_oimm_oclass = {
.base.maxver = 0,
.ctor = nv50_disp_oimm_new,
.func = &nv50_disp_pioc_func,
- .chid = 5,
+ .chid = { 5, 5 },
};
diff --git a/drm/nouveau/nvkm/engine/disp/oimmgf119.c b/drm/nouveau/nvkm/engine/disp/oimmgf119.c
index c658db54a..1f9fd3403 100644
--- a/drm/nouveau/nvkm/engine/disp/oimmgf119.c
+++ b/drm/nouveau/nvkm/engine/disp/oimmgf119.c
@@ -33,5 +33,5 @@ gf119_disp_oimm_oclass = {
.base.maxver = 0,
.ctor = nv50_disp_oimm_new,
.func = &gf119_disp_pioc_func,
- .chid = 9,
+ .chid = { 9, 9 },
};
diff --git a/drm/nouveau/nvkm/engine/disp/oimmgk104.c b/drm/nouveau/nvkm/engine/disp/oimmgk104.c
index b1fde8c12..0c09fe85e 100644
--- a/drm/nouveau/nvkm/engine/disp/oimmgk104.c
+++ b/drm/nouveau/nvkm/engine/disp/oimmgk104.c
@@ -33,5 +33,5 @@ gk104_disp_oimm_oclass = {
.base.maxver = 0,
.ctor = nv50_disp_oimm_new,
.func = &gf119_disp_pioc_func,
- .chid = 9,
+ .chid = { 9, 9 },
};
diff --git a/drm/nouveau/nvkm/engine/disp/oimmgt215.c b/drm/nouveau/nvkm/engine/disp/oimmgt215.c
index f4e7eb3d1..1281db28a 100644
--- a/drm/nouveau/nvkm/engine/disp/oimmgt215.c
+++ b/drm/nouveau/nvkm/engine/disp/oimmgt215.c
@@ -33,5 +33,5 @@ gt215_disp_oimm_oclass = {
.base.maxver = 0,
.ctor = nv50_disp_oimm_new,
.func = &nv50_disp_pioc_func,
- .chid = 5,
+ .chid = { 5, 5 },
};
diff --git a/drm/nouveau/nvkm/engine/disp/oimmnv50.c b/drm/nouveau/nvkm/engine/disp/oimmnv50.c
index 3940b9c96..07540f3d3 100644
--- a/drm/nouveau/nvkm/engine/disp/oimmnv50.c
+++ b/drm/nouveau/nvkm/engine/disp/oimmnv50.c
@@ -33,7 +33,7 @@
int
nv50_disp_oimm_new(const struct nv50_disp_chan_func *func,
const struct nv50_disp_chan_mthd *mthd,
- struct nv50_disp_root *root, int chid,
+ struct nv50_disp_root *root, int ctrl, int user,
const struct nvkm_oclass *oclass, void *data, u32 size,
struct nvkm_object **pobject)
{
@@ -54,7 +54,7 @@ nv50_disp_oimm_new(const struct nv50_disp_chan_func *func,
} else
return ret;
- return nv50_disp_chan_new_(func, mthd, root, chid + head,
+ return nv50_disp_chan_new_(func, mthd, root, ctrl + head, user + head,
head, oclass, pobject);
}
@@ -65,5 +65,5 @@ nv50_disp_oimm_oclass = {
.base.maxver = 0,
.ctor = nv50_disp_oimm_new,
.func = &nv50_disp_pioc_func,
- .chid = 5,
+ .chid = { 5, 5 },
};
diff --git a/drm/nouveau/nvkm/engine/disp/rootnv50.c b/drm/nouveau/nvkm/engine/disp/rootnv50.c
index c1158b22a..e70dc6a9f 100644
--- a/drm/nouveau/nvkm/engine/disp/rootnv50.c
+++ b/drm/nouveau/nvkm/engine/disp/rootnv50.c
@@ -250,8 +250,8 @@ nv50_disp_root_pioc_new_(const struct nvkm_oclass *oclass,
{
const struct nv50_disp_pioc_oclass *sclass = oclass->priv;
struct nv50_disp_root *root = nv50_disp_root(oclass->parent);
- return sclass->ctor(sclass->func, sclass->mthd, root, sclass->chid,
- oclass, data, size, pobject);
+ return sclass->ctor(sclass->func, sclass->mthd, root, sclass->chid.ctrl,
+ sclass->chid.user, oclass, data, size, pobject);
}
static int