Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
9d498e0f
Commit
9d498e0f
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/falcon: convert user classes to new-style nvkm_object
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
8f0649b5
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
132 additions
and
400 deletions
+132
-400
drivers/gpu/drm/nouveau/include/nvif/class.h
drivers/gpu/drm/nouveau/include/nvif/class.h
+22
-0
drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h
drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h
+3
-23
drivers/gpu/drm/nouveau/nvkm/engine/ce/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/ce/gf100.c
+17
-52
drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c
drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c
+5
-33
drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
+36
-0
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/g98.c
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/g98.c
+6
-33
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/gf100.c
+5
-32
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/gk104.c
+5
-32
drivers/gpu/drm/nouveau/nvkm/engine/msppp/g98.c
drivers/gpu/drm/nouveau/nvkm/engine/msppp/g98.c
+6
-33
drivers/gpu/drm/nouveau/nvkm/engine/msppp/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/msppp/gf100.c
+5
-32
drivers/gpu/drm/nouveau/nvkm/engine/msvld/g98.c
drivers/gpu/drm/nouveau/nvkm/engine/msvld/g98.c
+7
-34
drivers/gpu/drm/nouveau/nvkm/engine/msvld/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/msvld/gf100.c
+5
-32
drivers/gpu/drm/nouveau/nvkm/engine/msvld/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/msvld/gk104.c
+5
-32
drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c
drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c
+5
-32
No files found.
drivers/gpu/drm/nouveau/include/nvif/class.h
View file @
9d498e0f
...
...
@@ -94,6 +94,28 @@
#define MAXWELL_A 0x0000b097
#define MAXWELL_B 0x0000b197
#define GT212_MSVLD 0x000085b1
#define IGT21A_MSVLD 0x000086b1
#define G98_MSVLD 0x000088b1
#define GF100_MSVLD 0x000090b1
#define GK104_MSVLD 0x000095b1
#define GT212_MSPDEC 0x000085b2
#define G98_MSPDEC 0x000088b2
#define GF100_MSPDEC 0x000090b2
#define GK104_MSPDEC 0x000095b2
#define GT212_MSPPP 0x000085b3
#define G98_MSPPP 0x000088b3
#define GF100_MSPPP 0x000090b3
#define G98_SEC 0x000088b4
#define GT212_DMA 0x000085b5
#define FERMI_DMA 0x000090b5
#define FERMI_DECOMPRESS 0x000090b8
#define FERMI_COMPUTE_A 0x000090c0
#define FERMI_COMPUTE_B 0x000091c0
...
...
drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h
View file @
9d498e0f
#ifndef __NVKM_FALCON_H__
#define __NVKM_FALCON_H__
#include <core/engctx.h>
#define nvkm_falcon(p) container_of((p), struct nvkm_falcon, engine)
#include <core/engine.h>
struct
nvkm_fifo_chan
;
struct
nvkm_falcon_chan
{
struct
nvkm_engctx
base
;
};
#define nvkm_falcon_context_create(p,e,c,g,s,a,f,d) \
nvkm_engctx_create((p), (e), (c), (g), (s), (a), (f), (d))
#define nvkm_falcon_context_destroy(d) \
nvkm_engctx_destroy(&(d)->base)
#define nvkm_falcon_context_init(d) \
nvkm_engctx_init(&(d)->base)
#define nvkm_falcon_context_fini(d,s) \
nvkm_engctx_fini(&(d)->base, (s))
#define _nvkm_falcon_context_ctor _nvkm_engctx_ctor
#define _nvkm_falcon_context_dtor _nvkm_engctx_dtor
#define _nvkm_falcon_context_init _nvkm_engctx_init
#define _nvkm_falcon_context_fini _nvkm_engctx_fini
#define _nvkm_falcon_context_rd32 _nvkm_engctx_rd32
#define _nvkm_falcon_context_wr32 _nvkm_engctx_wr32
struct
nvkm_falcon_data
{
bool
external
;
};
#include <core/engine.h>
struct
nvkm_falcon
{
struct
nvkm_engine
engine
;
const
struct
nvkm_falcon_func
*
func
;
...
...
@@ -55,6 +34,7 @@ struct nvkm_falcon {
struct
nvkm_falcon_func
{
void
(
*
intr
)(
struct
nvkm_falcon
*
,
struct
nvkm_fifo_chan
*
);
struct
nvkm_sclass
sclass
[];
};
#define nv_falcon(priv) ((struct nvkm_falcon *)priv)
...
...
drivers/gpu/drm/nouveau/nvkm/engine/ce/gf100.c
View file @
9d498e0f
...
...
@@ -25,51 +25,7 @@
#include <engine/falcon.h>
#include "fuc/gf100.fuc3.h"
/*******************************************************************************
* Copy object classes
******************************************************************************/
static
struct
nvkm_oclass
gf100_ce0_sclass
[]
=
{
{
0x90b5
,
&
nvkm_object_ofuncs
},
{},
};
static
struct
nvkm_oclass
gf100_ce1_sclass
[]
=
{
{
0x90b8
,
&
nvkm_object_ofuncs
},
{},
};
/*******************************************************************************
* PCE context
******************************************************************************/
static
struct
nvkm_ofuncs
gf100_ce_context_ofuncs
=
{
.
ctor
=
_nvkm_falcon_context_ctor
,
.
dtor
=
_nvkm_falcon_context_dtor
,
.
init
=
_nvkm_falcon_context_init
,
.
fini
=
_nvkm_falcon_context_fini
,
.
rd32
=
_nvkm_falcon_context_rd32
,
.
wr32
=
_nvkm_falcon_context_wr32
,
};
static
struct
nvkm_oclass
gf100_ce0_cclass
=
{
.
handle
=
NV_ENGCTX
(
CE0
,
0xc0
),
.
ofuncs
=
&
gf100_ce_context_ofuncs
,
};
static
struct
nvkm_oclass
gf100_ce1_cclass
=
{
.
handle
=
NV_ENGCTX
(
CE1
,
0xc0
),
.
ofuncs
=
&
gf100_ce_context_ofuncs
,
};
/*******************************************************************************
* PCE engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
int
gf100_ce_init
(
struct
nvkm_object
*
object
)
...
...
@@ -89,8 +45,12 @@ gf100_ce_init(struct nvkm_object *object)
}
static
const
struct
nvkm_falcon_func
gf100_ce_func
=
{
gf100_ce
0
_func
=
{
.
intr
=
gt215_ce_intr
,
.
sclass
=
{
{
-
1
,
-
1
,
FERMI_DMA
},
{}
}
};
static
int
...
...
@@ -101,15 +61,13 @@ gf100_ce0_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nvkm_falcon
*
ce
;
int
ret
;
ret
=
nvkm_falcon_create
(
&
gf100_ce_func
,
parent
,
engine
,
oclass
,
ret
=
nvkm_falcon_create
(
&
gf100_ce
0
_func
,
parent
,
engine
,
oclass
,
0x104000
,
true
,
"PCE0"
,
"ce0"
,
&
ce
);
*
pobject
=
nv_object
(
ce
);
if
(
ret
)
return
ret
;
nv_subdev
(
ce
)
->
unit
=
0x00000040
;
nv_engine
(
ce
)
->
cclass
=
&
gf100_ce0_cclass
;
nv_engine
(
ce
)
->
sclass
=
gf100_ce0_sclass
;
nv_falcon
(
ce
)
->
code
.
data
=
gf100_ce_code
;
nv_falcon
(
ce
)
->
code
.
size
=
sizeof
(
gf100_ce_code
);
nv_falcon
(
ce
)
->
data
.
data
=
gf100_ce_data
;
...
...
@@ -117,6 +75,15 @@ gf100_ce0_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
0
;
}
static
const
struct
nvkm_falcon_func
gf100_ce1_func
=
{
.
intr
=
gt215_ce_intr
,
.
sclass
=
{
{
-
1
,
-
1
,
FERMI_DECOMPRESS
},
{}
}
};
static
int
gf100_ce1_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
...
...
@@ -125,15 +92,13 @@ gf100_ce1_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nvkm_falcon
*
ce
;
int
ret
;
ret
=
nvkm_falcon_create
(
&
gf100_ce_func
,
parent
,
engine
,
oclass
,
ret
=
nvkm_falcon_create
(
&
gf100_ce
1
_func
,
parent
,
engine
,
oclass
,
0x105000
,
true
,
"PCE1"
,
"ce1"
,
&
ce
);
*
pobject
=
nv_object
(
ce
);
if
(
ret
)
return
ret
;
nv_subdev
(
ce
)
->
unit
=
0x00000080
;
nv_engine
(
ce
)
->
cclass
=
&
gf100_ce1_cclass
;
nv_engine
(
ce
)
->
sclass
=
gf100_ce1_sclass
;
nv_falcon
(
ce
)
->
code
.
data
=
gf100_ce_code
;
nv_falcon
(
ce
)
->
code
.
size
=
sizeof
(
gf100_ce_code
);
nv_falcon
(
ce
)
->
data
.
data
=
gf100_ce_data
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c
View file @
9d498e0f
...
...
@@ -28,37 +28,7 @@
#include <core/client.h>
#include <core/enum.h>
/*******************************************************************************
* Copy object classes
******************************************************************************/
static
struct
nvkm_oclass
gt215_ce_sclass
[]
=
{
{
0x85b5
,
&
nvkm_object_ofuncs
},
{}
};
/*******************************************************************************
* PCE context
******************************************************************************/
static
struct
nvkm_oclass
gt215_ce_cclass
=
{
.
handle
=
NV_ENGCTX
(
CE0
,
0xa3
),
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_falcon_context_ctor
,
.
dtor
=
_nvkm_falcon_context_dtor
,
.
init
=
_nvkm_falcon_context_init
,
.
fini
=
_nvkm_falcon_context_fini
,
.
rd32
=
_nvkm_falcon_context_rd32
,
.
wr32
=
_nvkm_falcon_context_wr32
,
},
};
/*******************************************************************************
* PCE engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
const
struct
nvkm_enum
gt215_ce_isr_error_name
[]
=
{
...
...
@@ -93,6 +63,10 @@ gt215_ce_intr(struct nvkm_falcon *ce, struct nvkm_fifo_chan *chan)
static
const
struct
nvkm_falcon_func
gt215_ce_func
=
{
.
intr
=
gt215_ce_intr
,
.
sclass
=
{
{
-
1
,
-
1
,
GT212_DMA
},
{}
}
};
static
int
...
...
@@ -111,8 +85,6 @@ gt215_ce_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
nv_subdev
(
ce
)
->
unit
=
0x00802000
;
nv_engine
(
ce
)
->
cclass
=
&
gt215_ce_cclass
;
nv_engine
(
ce
)
->
sclass
=
gt215_ce_sclass
;
nv_falcon
(
ce
)
->
code
.
data
=
gt215_ce_code
;
nv_falcon
(
ce
)
->
code
.
size
=
sizeof
(
gt215_ce_code
);
nv_falcon
(
ce
)
->
data
.
data
=
gt215_ce_data
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
View file @
9d498e0f
...
...
@@ -24,6 +24,35 @@
#include <subdev/timer.h>
static
int
nvkm_falcon_oclass_get
(
struct
nvkm_oclass
*
oclass
,
int
index
)
{
struct
nvkm_falcon
*
falcon
=
nvkm_falcon
(
oclass
->
engine
);
int
c
=
0
;
while
(
falcon
->
func
->
sclass
[
c
].
oclass
)
{
if
(
c
++
==
index
)
{
oclass
->
base
=
falcon
->
func
->
sclass
[
index
];
return
index
;
}
}
return
c
;
}
static
int
nvkm_falcon_cclass_bind
(
struct
nvkm_object
*
object
,
struct
nvkm_gpuobj
*
parent
,
int
align
,
struct
nvkm_gpuobj
**
pgpuobj
)
{
return
nvkm_gpuobj_new
(
object
->
engine
->
subdev
.
device
,
256
,
align
,
true
,
parent
,
pgpuobj
);
}
static
const
struct
nvkm_object_func
nvkm_falcon_cclass
=
{
.
bind
=
nvkm_falcon_cclass_bind
,
};
static
void
nvkm_falcon_intr
(
struct
nvkm_subdev
*
subdev
)
{
...
...
@@ -275,6 +304,12 @@ _nvkm_falcon_fini(struct nvkm_object *object, bool suspend)
return
nvkm_engine_fini_old
(
&
falcon
->
engine
,
suspend
);
}
static
const
struct
nvkm_engine_func
nvkm_falcon
=
{
.
fifo
.
sclass
=
nvkm_falcon_oclass_get
,
.
cclass
=
&
nvkm_falcon_cclass
,
};
int
nvkm_falcon_create_
(
const
struct
nvkm_falcon_func
*
func
,
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
...
...
@@ -292,6 +327,7 @@ nvkm_falcon_create_(const struct nvkm_falcon_func *func,
return
ret
;
falcon
->
engine
.
subdev
.
intr
=
nvkm_falcon_intr
;
falcon
->
engine
.
func
=
&
nvkm_falcon
;
falcon
->
func
=
func
;
falcon
->
addr
=
addr
;
return
0
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/g98.c
View file @
9d498e0f
...
...
@@ -24,37 +24,7 @@
#include <engine/mspdec.h>
#include <engine/falcon.h>
/*******************************************************************************
* MSPDEC object classes
******************************************************************************/
static
struct
nvkm_oclass
g98_mspdec_sclass
[]
=
{
{
0x88b2
,
&
nvkm_object_ofuncs
},
{
0x85b2
,
&
nvkm_object_ofuncs
},
{},
};
/*******************************************************************************
* PMSPDEC context
******************************************************************************/
static
struct
nvkm_oclass
g98_mspdec_cclass
=
{
.
handle
=
NV_ENGCTX
(
MSPDEC
,
0x98
),
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_falcon_context_ctor
,
.
dtor
=
_nvkm_falcon_context_dtor
,
.
init
=
_nvkm_falcon_context_init
,
.
fini
=
_nvkm_falcon_context_fini
,
.
rd32
=
_nvkm_falcon_context_rd32
,
.
wr32
=
_nvkm_falcon_context_wr32
,
},
};
/*******************************************************************************
* PMSPDEC engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
int
g98_mspdec_init
(
struct
nvkm_object
*
object
)
...
...
@@ -74,6 +44,11 @@ g98_mspdec_init(struct nvkm_object *object)
static
const
struct
nvkm_falcon_func
g98_mspdec_func
=
{
.
sclass
=
{
{
-
1
,
-
1
,
G98_MSPDEC
},
{
-
1
,
-
1
,
GT212_MSPDEC
},
{}
},
};
static
int
...
...
@@ -91,8 +66,6 @@ g98_mspdec_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
nv_subdev
(
mspdec
)
->
unit
=
0x01020000
;
nv_engine
(
mspdec
)
->
cclass
=
&
g98_mspdec_cclass
;
nv_engine
(
mspdec
)
->
sclass
=
g98_mspdec_sclass
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/gf100.c
View file @
9d498e0f
...
...
@@ -24,36 +24,7 @@
#include <engine/mspdec.h>
#include <engine/falcon.h>
/*******************************************************************************
* MSPDEC object classes
******************************************************************************/
static
struct
nvkm_oclass
gf100_mspdec_sclass
[]
=
{
{
0x90b2
,
&
nvkm_object_ofuncs
},
{},
};
/*******************************************************************************
* PMSPDEC context
******************************************************************************/
static
struct
nvkm_oclass
gf100_mspdec_cclass
=
{
.
handle
=
NV_ENGCTX
(
MSPDEC
,
0xc0
),
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_falcon_context_ctor
,
.
dtor
=
_nvkm_falcon_context_dtor
,
.
init
=
_nvkm_falcon_context_init
,
.
fini
=
_nvkm_falcon_context_fini
,
.
rd32
=
_nvkm_falcon_context_rd32
,
.
wr32
=
_nvkm_falcon_context_wr32
,
},
};
/*******************************************************************************
* PMSPDEC engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
int
gf100_mspdec_init
(
struct
nvkm_object
*
object
)
...
...
@@ -73,6 +44,10 @@ gf100_mspdec_init(struct nvkm_object *object)
static
const
struct
nvkm_falcon_func
gf100_mspdec_func
=
{
.
sclass
=
{
{
-
1
,
-
1
,
GF100_MSPDEC
},
{}
}
};
static
int
...
...
@@ -90,8 +65,6 @@ gf100_mspdec_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
nv_subdev
(
mspdec
)
->
unit
=
0x00020000
;
nv_engine
(
mspdec
)
->
cclass
=
&
gf100_mspdec_cclass
;
nv_engine
(
mspdec
)
->
sclass
=
gf100_mspdec_sclass
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/gk104.c
View file @
9d498e0f
...
...
@@ -24,36 +24,7 @@
#include <engine/mspdec.h>
#include <engine/falcon.h>
/*******************************************************************************
* MSPDEC object classes
******************************************************************************/
static
struct
nvkm_oclass
gk104_mspdec_sclass
[]
=
{
{
0x95b2
,
&
nvkm_object_ofuncs
},
{},
};
/*******************************************************************************
* PMSPDEC context
******************************************************************************/
static
struct
nvkm_oclass
gk104_mspdec_cclass
=
{
.
handle
=
NV_ENGCTX
(
MSPDEC
,
0xe0
),
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_falcon_context_ctor
,
.
dtor
=
_nvkm_falcon_context_dtor
,
.
init
=
_nvkm_falcon_context_init
,
.
fini
=
_nvkm_falcon_context_fini
,
.
rd32
=
_nvkm_falcon_context_rd32
,
.
wr32
=
_nvkm_falcon_context_wr32
,
},
};
/*******************************************************************************
* PMSPDEC engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
int
gk104_mspdec_init
(
struct
nvkm_object
*
object
)
...
...
@@ -73,6 +44,10 @@ gk104_mspdec_init(struct nvkm_object *object)
static
const
struct
nvkm_falcon_func
gk104_mspdec_func
=
{
.
sclass
=
{
{
-
1
,
-
1
,
GK104_MSPDEC
},
{}
}
};
static
int
...
...
@@ -90,8 +65,6 @@ gk104_mspdec_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
nv_subdev
(
falcon
)
->
unit
=
0x00020000
;
nv_engine
(
falcon
)
->
cclass
=
&
gk104_mspdec_cclass
;
nv_engine
(
falcon
)
->
sclass
=
gk104_mspdec_sclass
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/msppp/g98.c
View file @
9d498e0f
...
...
@@ -24,37 +24,7 @@
#include <engine/msppp.h>
#include <engine/falcon.h>
/*******************************************************************************
* MSPPP object classes
******************************************************************************/
static
struct
nvkm_oclass
g98_msppp_sclass
[]
=
{
{
0x88b3
,
&
nvkm_object_ofuncs
},
{
0x85b3
,
&
nvkm_object_ofuncs
},
{},
};
/*******************************************************************************
* PMSPPP context
******************************************************************************/
static
struct
nvkm_oclass
g98_msppp_cclass
=
{
.
handle
=
NV_ENGCTX
(
MSPPP
,
0x98
),
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_falcon_context_ctor
,
.
dtor
=
_nvkm_falcon_context_dtor
,
.
init
=
_nvkm_falcon_context_init
,
.
fini
=
_nvkm_falcon_context_fini
,
.
rd32
=
_nvkm_falcon_context_rd32
,
.
wr32
=
_nvkm_falcon_context_wr32
,
},
};
/*******************************************************************************
* PMSPPP engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
int
g98_msppp_init
(
struct
nvkm_object
*
object
)
...
...
@@ -74,6 +44,11 @@ g98_msppp_init(struct nvkm_object *object)
static
const
struct
nvkm_falcon_func
g98_msppp_func
=
{
.
sclass
=
{
{
-
1
,
-
1
,
G98_MSPPP
},
{
-
1
,
-
1
,
GT212_MSPPP
},
{}
}
};
static
int
...
...
@@ -91,8 +66,6 @@ g98_msppp_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
nv_subdev
(
msppp
)
->
unit
=
0x00400002
;
nv_engine
(
msppp
)
->
cclass
=
&
g98_msppp_cclass
;
nv_engine
(
msppp
)
->
sclass
=
g98_msppp_sclass
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/msppp/gf100.c
View file @
9d498e0f
...
...
@@ -24,36 +24,7 @@
#include <engine/msppp.h>
#include <engine/falcon.h>
/*******************************************************************************
* MSPPP object classes
******************************************************************************/
static
struct
nvkm_oclass
gf100_msppp_sclass
[]
=
{
{
0x90b3
,
&
nvkm_object_ofuncs
},
{},
};
/*******************************************************************************
* PMSPPP context
******************************************************************************/
static
struct
nvkm_oclass
gf100_msppp_cclass
=
{
.
handle
=
NV_ENGCTX
(
MSPPP
,
0xc0
),
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_falcon_context_ctor
,
.
dtor
=
_nvkm_falcon_context_dtor
,
.
init
=
_nvkm_falcon_context_init
,
.
fini
=
_nvkm_falcon_context_fini
,
.
rd32
=
_nvkm_falcon_context_rd32
,
.
wr32
=
_nvkm_falcon_context_wr32
,
},
};
/*******************************************************************************
* PMSPPP engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
int
gf100_msppp_init
(
struct
nvkm_object
*
object
)
...
...
@@ -73,6 +44,10 @@ gf100_msppp_init(struct nvkm_object *object)
static
const
struct
nvkm_falcon_func
gf100_msppp_func
=
{
.
sclass
=
{
{
-
1
,
-
1
,
GF100_MSPPP
},
{}
}
};
static
int
...
...
@@ -90,8 +65,6 @@ gf100_msppp_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
nv_subdev
(
msppp
)
->
unit
=
0x00000002
;
nv_engine
(
msppp
)
->
cclass
=
&
gf100_msppp_cclass
;
nv_engine
(
msppp
)
->
sclass
=
gf100_msppp_sclass
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/msvld/g98.c
View file @
9d498e0f
...
...
@@ -24,38 +24,7 @@
#include <engine/msvld.h>
#include <engine/falcon.h>
/*******************************************************************************
* MSVLD object classes
******************************************************************************/
static
struct
nvkm_oclass
g98_msvld_sclass
[]
=
{
{
0x88b1
,
&
nvkm_object_ofuncs
},
{
0x85b1
,
&
nvkm_object_ofuncs
},
{
0x86b1
,
&
nvkm_object_ofuncs
},
{},
};
/*******************************************************************************
* PMSVLD context
******************************************************************************/
static
struct
nvkm_oclass
g98_msvld_cclass
=
{
.
handle
=
NV_ENGCTX
(
MSVLD
,
0x98
),
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_falcon_context_ctor
,
.
dtor
=
_nvkm_falcon_context_dtor
,
.
init
=
_nvkm_falcon_context_init
,
.
fini
=
_nvkm_falcon_context_fini
,
.
rd32
=
_nvkm_falcon_context_rd32
,
.
wr32
=
_nvkm_falcon_context_wr32
,
},
};
/*******************************************************************************
* PMSVLD engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
int
g98_msvld_init
(
struct
nvkm_object
*
object
)
...
...
@@ -75,6 +44,12 @@ g98_msvld_init(struct nvkm_object *object)
static
const
struct
nvkm_falcon_func
g98_msvld_func
=
{
.
sclass
=
{
{
-
1
,
-
1
,
G98_MSVLD
},
{
-
1
,
-
1
,
GT212_MSVLD
},
{
-
1
,
-
1
,
IGT21A_MSVLD
},
{}
}
};
static
int
...
...
@@ -92,8 +67,6 @@ g98_msvld_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
nv_subdev
(
msvld
)
->
unit
=
0x04008000
;
nv_engine
(
msvld
)
->
cclass
=
&
g98_msvld_cclass
;
nv_engine
(
msvld
)
->
sclass
=
g98_msvld_sclass
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/msvld/gf100.c
View file @
9d498e0f
...
...
@@ -24,36 +24,7 @@
#include <engine/msvld.h>
#include <engine/falcon.h>
/*******************************************************************************
* MSVLD object classes
******************************************************************************/
static
struct
nvkm_oclass
gf100_msvld_sclass
[]
=
{
{
0x90b1
,
&
nvkm_object_ofuncs
},
{},
};
/*******************************************************************************
* PMSVLD context
******************************************************************************/
static
struct
nvkm_oclass
gf100_msvld_cclass
=
{
.
handle
=
NV_ENGCTX
(
MSVLD
,
0xc0
),
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_falcon_context_ctor
,
.
dtor
=
_nvkm_falcon_context_dtor
,
.
init
=
_nvkm_falcon_context_init
,
.
fini
=
_nvkm_falcon_context_fini
,
.
rd32
=
_nvkm_falcon_context_rd32
,
.
wr32
=
_nvkm_falcon_context_wr32
,
},
};
/*******************************************************************************
* PMSVLD engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
int
gf100_msvld_init
(
struct
nvkm_object
*
object
)
...
...
@@ -73,6 +44,10 @@ gf100_msvld_init(struct nvkm_object *object)
static
const
struct
nvkm_falcon_func
gf100_msvld_func
=
{
.
sclass
=
{
{
-
1
,
-
1
,
GF100_MSVLD
},
{}
}
};
static
int
...
...
@@ -90,8 +65,6 @@ gf100_msvld_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
nv_subdev
(
msvld
)
->
unit
=
0x00008000
;
nv_engine
(
msvld
)
->
cclass
=
&
gf100_msvld_cclass
;
nv_engine
(
msvld
)
->
sclass
=
gf100_msvld_sclass
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/msvld/gk104.c
View file @
9d498e0f
...
...
@@ -24,36 +24,7 @@
#include <engine/msvld.h>
#include <engine/falcon.h>
/*******************************************************************************
* MSVLD object classes
******************************************************************************/
static
struct
nvkm_oclass
gk104_msvld_sclass
[]
=
{
{
0x95b1
,
&
nvkm_object_ofuncs
},
{},
};
/*******************************************************************************
* PMSVLD context
******************************************************************************/
static
struct
nvkm_oclass
gk104_msvld_cclass
=
{
.
handle
=
NV_ENGCTX
(
MSVLD
,
0xe0
),
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_falcon_context_ctor
,
.
dtor
=
_nvkm_falcon_context_dtor
,
.
init
=
_nvkm_falcon_context_init
,
.
fini
=
_nvkm_falcon_context_fini
,
.
rd32
=
_nvkm_falcon_context_rd32
,
.
wr32
=
_nvkm_falcon_context_wr32
,
},
};
/*******************************************************************************
* PMSVLD engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
int
gk104_msvld_init
(
struct
nvkm_object
*
object
)
...
...
@@ -73,6 +44,10 @@ gk104_msvld_init(struct nvkm_object *object)
static
const
struct
nvkm_falcon_func
gk104_msvld_func
=
{
.
sclass
=
{
{
-
1
,
-
1
,
GK104_MSVLD
},
{}
}
};
static
int
...
...
@@ -90,8 +65,6 @@ gk104_msvld_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
nv_subdev
(
msvld
)
->
unit
=
0x00008000
;
nv_engine
(
msvld
)
->
cclass
=
&
gk104_msvld_cclass
;
nv_engine
(
msvld
)
->
sclass
=
gk104_msvld_sclass
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c
View file @
9d498e0f
...
...
@@ -29,36 +29,7 @@
#include <core/client.h>
#include <core/enum.h>
/*******************************************************************************
* Crypt object classes
******************************************************************************/
static
struct
nvkm_oclass
g98_sec_sclass
[]
=
{
{
0x88b4
,
&
nvkm_object_ofuncs
},
{},
};
/*******************************************************************************
* PSEC context
******************************************************************************/
static
struct
nvkm_oclass
g98_sec_cclass
=
{
.
handle
=
NV_ENGCTX
(
SEC
,
0x98
),
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_falcon_context_ctor
,
.
dtor
=
_nvkm_falcon_context_dtor
,
.
init
=
_nvkm_falcon_context_init
,
.
fini
=
_nvkm_falcon_context_fini
,
.
rd32
=
_nvkm_falcon_context_rd32
,
.
wr32
=
_nvkm_falcon_context_wr32
,
},
};
/*******************************************************************************
* PSEC engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
const
struct
nvkm_enum
g98_sec_isr_error_name
[]
=
{
{
0x0000
,
"ILLEGAL_MTHD"
},
...
...
@@ -92,6 +63,10 @@ g98_sec_intr(struct nvkm_falcon *sec, struct nvkm_fifo_chan *chan)
static
const
struct
nvkm_falcon_func
g98_sec_func
=
{
.
intr
=
g98_sec_intr
,
.
sclass
=
{
{
-
1
,
-
1
,
G98_SEC
},
{}
}
};
static
int
...
...
@@ -109,8 +84,6 @@ g98_sec_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
ret
;
nv_subdev
(
sec
)
->
unit
=
0x00004000
;
nv_engine
(
sec
)
->
cclass
=
&
g98_sec_cclass
;
nv_engine
(
sec
)
->
sclass
=
g98_sec_sclass
;
nv_falcon
(
sec
)
->
code
.
data
=
g98_sec_code
;
nv_falcon
(
sec
)
->
code
.
size
=
sizeof
(
g98_sec_code
);
nv_falcon
(
sec
)
->
data
.
data
=
g98_sec_data
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment