|
@@ -26,9 +26,9 @@
|
|
#include <core/enum.h>
|
|
#include <core/enum.h>
|
|
#include <core/engctx.h>
|
|
#include <core/engctx.h>
|
|
|
|
|
|
-#include <engine/copy.h>
|
|
|
|
|
|
+#include <engine/ce.h>
|
|
|
|
|
|
-struct nve0_copy_priv {
|
|
|
|
|
|
+struct nve0_ce_priv {
|
|
struct nouveau_engine base;
|
|
struct nouveau_engine base;
|
|
};
|
|
};
|
|
|
|
|
|
@@ -37,17 +37,17 @@ struct nve0_copy_priv {
|
|
******************************************************************************/
|
|
******************************************************************************/
|
|
|
|
|
|
static struct nouveau_oclass
|
|
static struct nouveau_oclass
|
|
-nve0_copy_sclass[] = {
|
|
|
|
|
|
+nve0_ce_sclass[] = {
|
|
{ 0xa0b5, &nouveau_object_ofuncs },
|
|
{ 0xa0b5, &nouveau_object_ofuncs },
|
|
{},
|
|
{},
|
|
};
|
|
};
|
|
|
|
|
|
/*******************************************************************************
|
|
/*******************************************************************************
|
|
- * PCOPY context
|
|
|
|
|
|
+ * PCE context
|
|
******************************************************************************/
|
|
******************************************************************************/
|
|
|
|
|
|
static struct nouveau_ofuncs
|
|
static struct nouveau_ofuncs
|
|
-nve0_copy_context_ofuncs = {
|
|
|
|
|
|
+nve0_ce_context_ofuncs = {
|
|
.ctor = _nouveau_engctx_ctor,
|
|
.ctor = _nouveau_engctx_ctor,
|
|
.dtor = _nouveau_engctx_dtor,
|
|
.dtor = _nouveau_engctx_dtor,
|
|
.init = _nouveau_engctx_init,
|
|
.init = _nouveau_engctx_init,
|
|
@@ -57,20 +57,20 @@ nve0_copy_context_ofuncs = {
|
|
};
|
|
};
|
|
|
|
|
|
static struct nouveau_oclass
|
|
static struct nouveau_oclass
|
|
-nve0_copy_cclass = {
|
|
|
|
- .handle = NV_ENGCTX(COPY0, 0xc0),
|
|
|
|
- .ofuncs = &nve0_copy_context_ofuncs,
|
|
|
|
|
|
+nve0_ce_cclass = {
|
|
|
|
+ .handle = NV_ENGCTX(CE0, 0xc0),
|
|
|
|
+ .ofuncs = &nve0_ce_context_ofuncs,
|
|
};
|
|
};
|
|
|
|
|
|
/*******************************************************************************
|
|
/*******************************************************************************
|
|
- * PCOPY engine/subdev functions
|
|
|
|
|
|
+ * PCE engine/subdev functions
|
|
******************************************************************************/
|
|
******************************************************************************/
|
|
|
|
|
|
static void
|
|
static void
|
|
-nve0_copy_intr(struct nouveau_subdev *subdev)
|
|
|
|
|
|
+nve0_ce_intr(struct nouveau_subdev *subdev)
|
|
{
|
|
{
|
|
- const int ce = nv_subidx(subdev) - NVDEV_ENGINE_COPY0;
|
|
|
|
- struct nve0_copy_priv *priv = (void *)subdev;
|
|
|
|
|
|
+ const int ce = nv_subidx(subdev) - NVDEV_ENGINE_CE0;
|
|
|
|
+ struct nve0_ce_priv *priv = (void *)subdev;
|
|
u32 stat = nv_rd32(priv, 0x104908 + (ce * 0x1000));
|
|
u32 stat = nv_rd32(priv, 0x104908 + (ce * 0x1000));
|
|
|
|
|
|
if (stat) {
|
|
if (stat) {
|
|
@@ -80,73 +80,73 @@ nve0_copy_intr(struct nouveau_subdev *subdev)
|
|
}
|
|
}
|
|
|
|
|
|
static int
|
|
static int
|
|
-nve0_copy0_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
|
|
|
|
|
+nve0_ce0_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
|
struct nouveau_oclass *oclass, void *data, u32 size,
|
|
struct nouveau_oclass *oclass, void *data, u32 size,
|
|
struct nouveau_object **pobject)
|
|
struct nouveau_object **pobject)
|
|
{
|
|
{
|
|
- struct nve0_copy_priv *priv;
|
|
|
|
|
|
+ struct nve0_ce_priv *priv;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
ret = nouveau_engine_create(parent, engine, oclass, true,
|
|
ret = nouveau_engine_create(parent, engine, oclass, true,
|
|
- "PCE0", "copy0", &priv);
|
|
|
|
|
|
+ "PCE0", "ce0", &priv);
|
|
*pobject = nv_object(priv);
|
|
*pobject = nv_object(priv);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
nv_subdev(priv)->unit = 0x00000040;
|
|
nv_subdev(priv)->unit = 0x00000040;
|
|
- nv_subdev(priv)->intr = nve0_copy_intr;
|
|
|
|
- nv_engine(priv)->cclass = &nve0_copy_cclass;
|
|
|
|
- nv_engine(priv)->sclass = nve0_copy_sclass;
|
|
|
|
|
|
+ nv_subdev(priv)->intr = nve0_ce_intr;
|
|
|
|
+ nv_engine(priv)->cclass = &nve0_ce_cclass;
|
|
|
|
+ nv_engine(priv)->sclass = nve0_ce_sclass;
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
static int
|
|
static int
|
|
-nve0_copy1_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
|
|
|
|
|
+nve0_ce1_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
|
struct nouveau_oclass *oclass, void *data, u32 size,
|
|
struct nouveau_oclass *oclass, void *data, u32 size,
|
|
struct nouveau_object **pobject)
|
|
struct nouveau_object **pobject)
|
|
{
|
|
{
|
|
- struct nve0_copy_priv *priv;
|
|
|
|
|
|
+ struct nve0_ce_priv *priv;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
ret = nouveau_engine_create(parent, engine, oclass, true,
|
|
ret = nouveau_engine_create(parent, engine, oclass, true,
|
|
- "PCE1", "copy1", &priv);
|
|
|
|
|
|
+ "PCE1", "ce1", &priv);
|
|
*pobject = nv_object(priv);
|
|
*pobject = nv_object(priv);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
nv_subdev(priv)->unit = 0x00000080;
|
|
nv_subdev(priv)->unit = 0x00000080;
|
|
- nv_subdev(priv)->intr = nve0_copy_intr;
|
|
|
|
- nv_engine(priv)->cclass = &nve0_copy_cclass;
|
|
|
|
- nv_engine(priv)->sclass = nve0_copy_sclass;
|
|
|
|
|
|
+ nv_subdev(priv)->intr = nve0_ce_intr;
|
|
|
|
+ nv_engine(priv)->cclass = &nve0_ce_cclass;
|
|
|
|
+ nv_engine(priv)->sclass = nve0_ce_sclass;
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
static int
|
|
static int
|
|
-nve0_copy2_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
|
|
|
|
|
+nve0_ce2_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
|
struct nouveau_oclass *oclass, void *data, u32 size,
|
|
struct nouveau_oclass *oclass, void *data, u32 size,
|
|
struct nouveau_object **pobject)
|
|
struct nouveau_object **pobject)
|
|
{
|
|
{
|
|
- struct nve0_copy_priv *priv;
|
|
|
|
|
|
+ struct nve0_ce_priv *priv;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
ret = nouveau_engine_create(parent, engine, oclass, true,
|
|
ret = nouveau_engine_create(parent, engine, oclass, true,
|
|
- "PCE2", "copy2", &priv);
|
|
|
|
|
|
+ "PCE2", "ce2", &priv);
|
|
*pobject = nv_object(priv);
|
|
*pobject = nv_object(priv);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
nv_subdev(priv)->unit = 0x00200000;
|
|
nv_subdev(priv)->unit = 0x00200000;
|
|
- nv_subdev(priv)->intr = nve0_copy_intr;
|
|
|
|
- nv_engine(priv)->cclass = &nve0_copy_cclass;
|
|
|
|
- nv_engine(priv)->sclass = nve0_copy_sclass;
|
|
|
|
|
|
+ nv_subdev(priv)->intr = nve0_ce_intr;
|
|
|
|
+ nv_engine(priv)->cclass = &nve0_ce_cclass;
|
|
|
|
+ nv_engine(priv)->sclass = nve0_ce_sclass;
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
struct nouveau_oclass
|
|
struct nouveau_oclass
|
|
-nve0_copy0_oclass = {
|
|
|
|
- .handle = NV_ENGINE(COPY0, 0xe0),
|
|
|
|
|
|
+nve0_ce0_oclass = {
|
|
|
|
+ .handle = NV_ENGINE(CE0, 0xe0),
|
|
.ofuncs = &(struct nouveau_ofuncs) {
|
|
.ofuncs = &(struct nouveau_ofuncs) {
|
|
- .ctor = nve0_copy0_ctor,
|
|
|
|
|
|
+ .ctor = nve0_ce0_ctor,
|
|
.dtor = _nouveau_engine_dtor,
|
|
.dtor = _nouveau_engine_dtor,
|
|
.init = _nouveau_engine_init,
|
|
.init = _nouveau_engine_init,
|
|
.fini = _nouveau_engine_fini,
|
|
.fini = _nouveau_engine_fini,
|
|
@@ -154,10 +154,10 @@ nve0_copy0_oclass = {
|
|
};
|
|
};
|
|
|
|
|
|
struct nouveau_oclass
|
|
struct nouveau_oclass
|
|
-nve0_copy1_oclass = {
|
|
|
|
- .handle = NV_ENGINE(COPY1, 0xe0),
|
|
|
|
|
|
+nve0_ce1_oclass = {
|
|
|
|
+ .handle = NV_ENGINE(CE1, 0xe0),
|
|
.ofuncs = &(struct nouveau_ofuncs) {
|
|
.ofuncs = &(struct nouveau_ofuncs) {
|
|
- .ctor = nve0_copy1_ctor,
|
|
|
|
|
|
+ .ctor = nve0_ce1_ctor,
|
|
.dtor = _nouveau_engine_dtor,
|
|
.dtor = _nouveau_engine_dtor,
|
|
.init = _nouveau_engine_init,
|
|
.init = _nouveau_engine_init,
|
|
.fini = _nouveau_engine_fini,
|
|
.fini = _nouveau_engine_fini,
|
|
@@ -165,10 +165,10 @@ nve0_copy1_oclass = {
|
|
};
|
|
};
|
|
|
|
|
|
struct nouveau_oclass
|
|
struct nouveau_oclass
|
|
-nve0_copy2_oclass = {
|
|
|
|
- .handle = NV_ENGINE(COPY2, 0xe0),
|
|
|
|
|
|
+nve0_ce2_oclass = {
|
|
|
|
+ .handle = NV_ENGINE(CE2, 0xe0),
|
|
.ofuncs = &(struct nouveau_ofuncs) {
|
|
.ofuncs = &(struct nouveau_ofuncs) {
|
|
- .ctor = nve0_copy2_ctor,
|
|
|
|
|
|
+ .ctor = nve0_ce2_ctor,
|
|
.dtor = _nouveau_engine_dtor,
|
|
.dtor = _nouveau_engine_dtor,
|
|
.init = _nouveau_engine_init,
|
|
.init = _nouveau_engine_init,
|
|
.fini = _nouveau_engine_fini,
|
|
.fini = _nouveau_engine_fini,
|