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
Kirill Smelkov
linux
Commits
3bfcec35
Commit
3bfcec35
authored
Oct 03, 2013
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv50-/sw: share engine/channel struct definitions between implementations
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
ac51bb09
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
24 deletions
+25
-24
drivers/gpu/drm/nouveau/core/engine/software/nv50.c
drivers/gpu/drm/nouveau/core/engine/software/nv50.c
+1
-8
drivers/gpu/drm/nouveau/core/engine/software/nv50.h
drivers/gpu/drm/nouveau/core/engine/software/nv50.h
+14
-0
drivers/gpu/drm/nouveau/core/engine/software/nvc0.c
drivers/gpu/drm/nouveau/core/engine/software/nvc0.c
+10
-16
No files found.
drivers/gpu/drm/nouveau/core/engine/software/nv50.c
View file @
3bfcec35
...
...
@@ -32,16 +32,9 @@
#include <subdev/bar.h>
#include <engine/software.h>
#include <engine/disp.h>
struct
nv50_software_priv
{
struct
nouveau_software
base
;
};
struct
nv50_software_chan
{
struct
nouveau_software_chan
base
;
};
#include "nv50.h"
/*******************************************************************************
* software object classes
...
...
drivers/gpu/drm/nouveau/core/engine/software/nv50.h
0 → 100644
View file @
3bfcec35
#ifndef __NVKM_SW_NV50_H__
#define __NVKM_SW_NV50_H__
#include <engine/software.h>
struct
nv50_software_priv
{
struct
nouveau_software
base
;
};
struct
nv50_software_chan
{
struct
nouveau_software_chan
base
;
};
#endif
drivers/gpu/drm/nouveau/core/engine/software/nvc0.c
View file @
3bfcec35
...
...
@@ -32,13 +32,7 @@
#include <engine/software.h>
#include <engine/disp.h>
struct
nvc0_software_priv
{
struct
nouveau_software
base
;
};
struct
nvc0_software_chan
{
struct
nouveau_software_chan
base
;
};
#include "nv50.h"
/*******************************************************************************
* software object classes
...
...
@@ -48,7 +42,7 @@ static int
nvc0_software_mthd_vblsem_offset
(
struct
nouveau_object
*
object
,
u32
mthd
,
void
*
args
,
u32
size
)
{
struct
nv
c
0_software_chan
*
chan
=
(
void
*
)
nv_engctx
(
object
->
parent
);
struct
nv
5
0_software_chan
*
chan
=
(
void
*
)
nv_engctx
(
object
->
parent
);
u64
data
=
*
(
u32
*
)
args
;
if
(
mthd
==
0x0400
)
{
chan
->
base
.
vblank
.
offset
&=
0x00ffffffffULL
;
...
...
@@ -64,7 +58,7 @@ static int
nvc0_software_mthd_vblsem_value
(
struct
nouveau_object
*
object
,
u32
mthd
,
void
*
args
,
u32
size
)
{
struct
nv
c
0_software_chan
*
chan
=
(
void
*
)
nv_engctx
(
object
->
parent
);
struct
nv
5
0_software_chan
*
chan
=
(
void
*
)
nv_engctx
(
object
->
parent
);
chan
->
base
.
vblank
.
value
=
*
(
u32
*
)
args
;
return
0
;
}
...
...
@@ -73,7 +67,7 @@ static int
nvc0_software_mthd_vblsem_release
(
struct
nouveau_object
*
object
,
u32
mthd
,
void
*
args
,
u32
size
)
{
struct
nv
c
0_software_chan
*
chan
=
(
void
*
)
nv_engctx
(
object
->
parent
);
struct
nv
5
0_software_chan
*
chan
=
(
void
*
)
nv_engctx
(
object
->
parent
);
struct
nouveau_disp
*
disp
=
nouveau_disp
(
object
);
u32
crtc
=
*
(
u32
*
)
args
;
...
...
@@ -88,7 +82,7 @@ static int
nvc0_software_mthd_flip
(
struct
nouveau_object
*
object
,
u32
mthd
,
void
*
args
,
u32
size
)
{
struct
nv
c
0_software_chan
*
chan
=
(
void
*
)
nv_engctx
(
object
->
parent
);
struct
nv
5
0_software_chan
*
chan
=
(
void
*
)
nv_engctx
(
object
->
parent
);
if
(
chan
->
base
.
flip
)
return
chan
->
base
.
flip
(
chan
->
base
.
flip_data
);
return
-
EINVAL
;
...
...
@@ -98,8 +92,8 @@ static int
nvc0_software_mthd_mp_control
(
struct
nouveau_object
*
object
,
u32
mthd
,
void
*
args
,
u32
size
)
{
struct
nv
c
0_software_chan
*
chan
=
(
void
*
)
nv_engctx
(
object
->
parent
);
struct
nv
c
0_software_priv
*
priv
=
(
void
*
)
nv_object
(
chan
)
->
engine
;
struct
nv
5
0_software_chan
*
chan
=
(
void
*
)
nv_engctx
(
object
->
parent
);
struct
nv
5
0_software_priv
*
priv
=
(
void
*
)
nv_object
(
chan
)
->
engine
;
u32
data
=
*
(
u32
*
)
args
;
switch
(
mthd
)
{
...
...
@@ -148,7 +142,7 @@ nvc0_software_vblsem_release(struct nouveau_eventh *event, int head)
{
struct
nouveau_software_chan
*
chan
=
container_of
(
event
,
struct
nouveau_software_chan
,
vblank
.
event
);
struct
nv
c
0_software_priv
*
priv
=
(
void
*
)
nv_object
(
chan
)
->
engine
;
struct
nv
5
0_software_priv
*
priv
=
(
void
*
)
nv_object
(
chan
)
->
engine
;
struct
nouveau_bar
*
bar
=
nouveau_bar
(
priv
);
nv_wr32
(
priv
,
0x001718
,
0x80000000
|
chan
->
vblank
.
channel
);
...
...
@@ -166,7 +160,7 @@ nvc0_software_context_ctor(struct nouveau_object *parent,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv
c
0_software_chan
*
chan
;
struct
nv
5
0_software_chan
*
chan
;
int
ret
;
ret
=
nouveau_software_context_create
(
parent
,
engine
,
oclass
,
&
chan
);
...
...
@@ -199,7 +193,7 @@ nvc0_software_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv
c
0_software_priv
*
priv
;
struct
nv
5
0_software_priv
*
priv
;
int
ret
;
ret
=
nouveau_software_create
(
parent
,
engine
,
oclass
,
&
priv
);
...
...
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