]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
drm/nouveau/disp/nv50-: specify ctrl/user separately when constructing classes
authorBen Skeggs <bskeggs@redhat.com>
Wed, 16 Nov 2016 04:49:35 +0000 (14:49 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 16 Nov 2016 23:50:38 +0000 (09:50 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 files changed:
drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/cursg84.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgk104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgt215.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/cursnv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/oimmg84.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/oimmgf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/oimmgk104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/oimmgt215.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/oimmnv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c

index 566d2d1b8cb2e8fb837b584fc9c7d65e3f6041c2..524a24eae1a0da5d39688dc7af255fd33da034d6 100644 (file)
@@ -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);
 }
index de8db9cfe87dcc6e0467abe4b154489d1918762f..1897e5b674a846c9bdcdedb8b7a114524593d48a 100644 (file)
@@ -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
index dd99fc7060b19690bf9d3e88a8d6195436d054a8..fa781b5a7e07f73476a91598a42d59eef56a5759 100644 (file)
@@ -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 },
 };
index 2a1574e06ad6e90362d36fca82b75d19c19eede0..2be6fb052c65ff5e1819bd4158cb7b931c1a10e1 100644 (file)
@@ -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 },
 };
index 28e8f06c9472ba7309e9fc19c698b624279ad72a..2a99db4bf8f8a09ce8bb4a9458fa17db4951488c 100644 (file)
@@ -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 },
 };
index d8a4b9ca139c64af24722b97e78386b38de9a5c4..00a7f356445060ca9ff61b868538e632e7de405b 100644 (file)
@@ -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 },
 };
index 8b1320499a0fddfca218b00c77bcd8854aa529db..82ff82d8c1abcc423da4cf814a087bd45461dc7c 100644 (file)
@@ -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 },
 };
index cfba994bef4d3fc1fe8d317a5fe72d786292f514..0a1381a84552dced96167738295512f36cf8ddb1 100644 (file)
@@ -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;
 
index 54a4ae8d66c6f611de28a7d7cf75a71145086d8f..5ad5d0f5db05aa77bdeb3983d037c5b2aa4b3675 100644 (file)
@@ -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 },
 };
index c658db54afc5101b2ea275bda8a360237b8efc09..1f9fd3403f07dcd78b487a091d5f7f393b2fa6cf 100644 (file)
@@ -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 },
 };
index b1fde8c125d6716d0e076b51ebc92b02462ba75e..0c09fe85e952c0e3e373a83d69c3ef530d486bfa 100644 (file)
@@ -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 },
 };
index f4e7eb3d1177a31342935ff52b57695fdf5e48b7..1281db28aebd2ac4606374afc00aef9e69051faf 100644 (file)
@@ -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 },
 };
index 3940b9c966ec9c2c9473db6804460b006dae1b65..07540f3d32dc3256f005a4d630c73e4fe1e9d087 100644 (file)
@@ -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 },
 };
index c1158b22a7212f16c41ff20a537fef5f8fc84b1e..e70dc6a9ff7d5fe65d4e2ef42d8dc8cd99372be4 100644 (file)
@@ -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