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
e5ff1127
Commit
e5ff1127
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/ce: convert user classes to new-style nvkm_object
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
c79a191b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
82 deletions
+28
-82
drivers/gpu/drm/nouveau/include/nvif/class.h
drivers/gpu/drm/nouveau/include/nvif/class.h
+2
-0
drivers/gpu/drm/nouveau/nvkm/engine/ce/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/ce/gk104.c
+13
-41
drivers/gpu/drm/nouveau/nvkm/engine/ce/gm204.c
drivers/gpu/drm/nouveau/nvkm/engine/ce/gm204.c
+13
-41
No files found.
drivers/gpu/drm/nouveau/include/nvif/class.h
View file @
e5ff1127
...
...
@@ -117,6 +117,8 @@
#define GT212_DMA 0x000085b5
#define FERMI_DMA 0x000090b5
#define KEPLER_DMA_COPY_A 0x0000a0b5
#define MAXWELL_DMA_COPY_A 0x0000b0b5
#define FERMI_DECOMPRESS 0x000090b8
...
...
drivers/gpu/drm/nouveau/nvkm/engine/ce/gk104.c
View file @
e5ff1127
...
...
@@ -22,42 +22,9 @@
* Authors: Ben Skeggs
*/
#include <engine/ce.h>
#include <engine/fifo.h>
#include <core/engctx.h>
/*******************************************************************************
* Copy object classes
******************************************************************************/
static
struct
nvkm_oclass
gk104_ce_sclass
[]
=
{
{
0xa0b5
,
&
nvkm_object_ofuncs
},
{},
};
/*******************************************************************************
* PCE context
******************************************************************************/
static
struct
nvkm_ofuncs
gk104_ce_context_ofuncs
=
{
.
ctor
=
_nvkm_engctx_ctor
,
.
dtor
=
_nvkm_engctx_dtor
,
.
init
=
_nvkm_engctx_init
,
.
fini
=
_nvkm_engctx_fini
,
.
rd32
=
_nvkm_engctx_rd32
,
.
wr32
=
_nvkm_engctx_wr32
,
};
static
struct
nvkm_oclass
gk104_ce_cclass
=
{
.
handle
=
NV_ENGCTX
(
CE0
,
0xc0
),
.
ofuncs
=
&
gk104_ce_context_ofuncs
,
};
/*******************************************************************************
* PCE engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
void
gk104_ce_intr
(
struct
nvkm_subdev
*
subdev
)
...
...
@@ -72,6 +39,14 @@ gk104_ce_intr(struct nvkm_subdev *subdev)
}
}
static
const
struct
nvkm_engine_func
gk104_ce
=
{
.
sclass
=
{
{
-
1
,
-
1
,
KEPLER_DMA_COPY_A
},
{}
}
};
static
int
gk104_ce0_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
...
...
@@ -86,10 +61,9 @@ gk104_ce0_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
return
ret
;
ce
->
func
=
&
gk104_ce
;
nv_subdev
(
ce
)
->
unit
=
0x00000040
;
nv_subdev
(
ce
)
->
intr
=
gk104_ce_intr
;
nv_engine
(
ce
)
->
cclass
=
&
gk104_ce_cclass
;
nv_engine
(
ce
)
->
sclass
=
gk104_ce_sclass
;
return
0
;
}
...
...
@@ -107,10 +81,9 @@ gk104_ce1_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
return
ret
;
ce
->
func
=
&
gk104_ce
;
nv_subdev
(
ce
)
->
unit
=
0x00000080
;
nv_subdev
(
ce
)
->
intr
=
gk104_ce_intr
;
nv_engine
(
ce
)
->
cclass
=
&
gk104_ce_cclass
;
nv_engine
(
ce
)
->
sclass
=
gk104_ce_sclass
;
return
0
;
}
...
...
@@ -128,10 +101,9 @@ gk104_ce2_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
return
ret
;
ce
->
func
=
&
gk104_ce
;
nv_subdev
(
ce
)
->
unit
=
0x00200000
;
nv_subdev
(
ce
)
->
intr
=
gk104_ce_intr
;
nv_engine
(
ce
)
->
cclass
=
&
gk104_ce_cclass
;
nv_engine
(
ce
)
->
sclass
=
gk104_ce_sclass
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/ce/gm204.c
View file @
e5ff1127
...
...
@@ -22,42 +22,9 @@
* Authors: Ben Skeggs
*/
#include <engine/ce.h>
#include <engine/fifo.h>
#include <core/engctx.h>
/*******************************************************************************
* Copy object classes
******************************************************************************/
static
struct
nvkm_oclass
gm204_ce_sclass
[]
=
{
{
0xb0b5
,
&
nvkm_object_ofuncs
},
{},
};
/*******************************************************************************
* PCE context
******************************************************************************/
static
struct
nvkm_ofuncs
gm204_ce_context_ofuncs
=
{
.
ctor
=
_nvkm_engctx_ctor
,
.
dtor
=
_nvkm_engctx_dtor
,
.
init
=
_nvkm_engctx_init
,
.
fini
=
_nvkm_engctx_fini
,
.
rd32
=
_nvkm_engctx_rd32
,
.
wr32
=
_nvkm_engctx_wr32
,
};
static
struct
nvkm_oclass
gm204_ce_cclass
=
{
.
handle
=
NV_ENGCTX
(
CE0
,
0x24
),
.
ofuncs
=
&
gm204_ce_context_ofuncs
,
};
/*******************************************************************************
* PCE engine/subdev functions
******************************************************************************/
#include <nvif/class.h>
static
void
gm204_ce_intr
(
struct
nvkm_subdev
*
subdev
)
...
...
@@ -72,6 +39,14 @@ gm204_ce_intr(struct nvkm_subdev *subdev)
}
}
static
const
struct
nvkm_engine_func
gm204_ce
=
{
.
sclass
=
{
{
-
1
,
-
1
,
MAXWELL_DMA_COPY_A
},
{}
}
};
static
int
gm204_ce0_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
...
...
@@ -86,10 +61,9 @@ gm204_ce0_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
return
ret
;
ce
->
func
=
&
gm204_ce
;
nv_subdev
(
ce
)
->
unit
=
0x00000040
;
nv_subdev
(
ce
)
->
intr
=
gm204_ce_intr
;
nv_engine
(
ce
)
->
cclass
=
&
gm204_ce_cclass
;
nv_engine
(
ce
)
->
sclass
=
gm204_ce_sclass
;
return
0
;
}
...
...
@@ -107,10 +81,9 @@ gm204_ce1_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
return
ret
;
ce
->
func
=
&
gm204_ce
;
nv_subdev
(
ce
)
->
unit
=
0x00000080
;
nv_subdev
(
ce
)
->
intr
=
gm204_ce_intr
;
nv_engine
(
ce
)
->
cclass
=
&
gm204_ce_cclass
;
nv_engine
(
ce
)
->
sclass
=
gm204_ce_sclass
;
return
0
;
}
...
...
@@ -128,10 +101,9 @@ gm204_ce2_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
return
ret
;
ce
->
func
=
&
gm204_ce
;
nv_subdev
(
ce
)
->
unit
=
0x00200000
;
nv_subdev
(
ce
)
->
intr
=
gm204_ce_intr
;
nv_engine
(
ce
)
->
cclass
=
&
gm204_ce_cclass
;
nv_engine
(
ce
)
->
sclass
=
gm204_ce_sclass
;
return
0
;
}
...
...
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