diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:15 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:40:31 +1000 |
commit | a1e88736221d2e971726931c449ed7d0af31755b (patch) | |
tree | 64d2d987780d3ef023be7216d7b1813e4aa57b54 /drivers/gpu/drm/nouveau/nvkm/engine/disp | |
parent | a1bfb29a33521efa6b1714589bf68cb4afebacb1 (diff) | |
download | talos-op-linux-a1e88736221d2e971726931c449ed7d0af31755b.tar.gz talos-op-linux-a1e88736221d2e971726931c449ed7d0af31755b.zip |
drm/nouveau/device: decouple from engine machinery
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/disp')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c index 5079ea3df4bf..9d7ac6a15bd7 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c @@ -26,7 +26,7 @@ #include "outpdp.h" #include <core/client.h> -#include <core/engctx.h> +#include <core/gpuobj.h> #include <core/enum.h> #include <core/handle.h> #include <core/ramht.h> @@ -1292,8 +1292,8 @@ nv50_disp_data_ctor(struct nvkm_object *parent, struct nvkm_object **pobject) { struct nv50_disp *disp = (void *)engine; - struct nvkm_engctx *ectx; - int ret = -EBUSY; + struct nvkm_gpuobj *gpuobj; + int ret; /* no context needed for channel objects... */ if (nv_mclass(parent) != NV_DEVICE) { @@ -1303,26 +1303,26 @@ nv50_disp_data_ctor(struct nvkm_object *parent, } /* allocate display hardware to client */ + ret = nvkm_gpuobj_create(parent, engine, oclass, 0, NULL, + 0x10000, 0x10000, NVOBJ_FLAG_HEAP, + &gpuobj); + *pobject = nv_object(gpuobj); mutex_lock(&nv_subdev(disp)->mutex); - if (list_empty(&nv_engine(disp)->contexts)) { - ret = nvkm_engctx_create(parent, engine, oclass, NULL, 0x10000, - 0x10000, NVOBJ_FLAG_HEAP, &ectx); - *pobject = nv_object(ectx); - } + if (!list_empty(&nv_engine(disp)->contexts)) + ret = -EBUSY; mutex_unlock(&nv_subdev(disp)->mutex); return ret; } struct nvkm_oclass nv50_disp_cclass = { - .handle = NV_ENGCTX(DISP, 0x50), .ofuncs = &(struct nvkm_ofuncs) { .ctor = nv50_disp_data_ctor, - .dtor = _nvkm_engctx_dtor, - .init = _nvkm_engctx_init, - .fini = _nvkm_engctx_fini, - .rd32 = _nvkm_engctx_rd32, - .wr32 = _nvkm_engctx_wr32, + .dtor = _nvkm_gpuobj_dtor, + .init = _nvkm_gpuobj_init, + .fini = _nvkm_gpuobj_fini, + .rd32 = _nvkm_gpuobj_rd32, + .wr32 = _nvkm_gpuobj_wr32, }, }; |