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
0357466d
Commit
0357466d
authored
Jan 28, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nvc0/fifo: rename a couple of units
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
4b6c6fb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
+22
-22
No files found.
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
View file @
0357466d
...
...
@@ -41,8 +41,8 @@
struct
nvc0_fifo_priv
{
struct
nouveau_fifo
base
;
struct
nouveau_gpuobj
*
play
list
[
2
];
int
cur_
play
list
;
struct
nouveau_gpuobj
*
run
list
[
2
];
int
cur_
run
list
;
struct
{
struct
nouveau_gpuobj
*
mem
;
struct
nouveau_vma
bar
;
...
...
@@ -65,15 +65,15 @@ struct nvc0_fifo_chan {
******************************************************************************/
static
void
nvc0_fifo_
play
list_update
(
struct
nvc0_fifo_priv
*
priv
)
nvc0_fifo_
run
list_update
(
struct
nvc0_fifo_priv
*
priv
)
{
struct
nouveau_bar
*
bar
=
nouveau_bar
(
priv
);
struct
nouveau_gpuobj
*
cur
;
int
i
,
p
;
mutex_lock
(
&
nv_subdev
(
priv
)
->
mutex
);
cur
=
priv
->
playlist
[
priv
->
cur_play
list
];
priv
->
cur_
playlist
=
!
priv
->
cur_play
list
;
cur
=
priv
->
runlist
[
priv
->
cur_run
list
];
priv
->
cur_
runlist
=
!
priv
->
cur_run
list
;
for
(
i
=
0
,
p
=
0
;
i
<
128
;
i
++
)
{
if
(
!
(
nv_rd32
(
priv
,
0x003004
+
(
i
*
8
))
&
1
))
...
...
@@ -87,7 +87,7 @@ nvc0_fifo_playlist_update(struct nvc0_fifo_priv *priv)
nv_wr32
(
priv
,
0x002270
,
cur
->
addr
>>
12
);
nv_wr32
(
priv
,
0x002274
,
0x01f00000
|
(
p
>>
3
));
if
(
!
nv_wait
(
priv
,
0x00227c
,
0x00100000
,
0x00000000
))
nv_error
(
priv
,
"
play
list update failed
\n
"
);
nv_error
(
priv
,
"
run
list update failed
\n
"
);
mutex_unlock
(
&
nv_subdev
(
priv
)
->
mutex
);
}
...
...
@@ -240,7 +240,7 @@ nvc0_fifo_chan_init(struct nouveau_object *object)
nv_wr32
(
priv
,
0x003000
+
(
chid
*
8
),
0xc0000000
|
base
->
addr
>>
12
);
nv_wr32
(
priv
,
0x003004
+
(
chid
*
8
),
0x001f0001
);
nvc0_fifo_
play
list_update
(
priv
);
nvc0_fifo_
run
list_update
(
priv
);
return
0
;
}
...
...
@@ -253,7 +253,7 @@ nvc0_fifo_chan_fini(struct nouveau_object *object, bool suspend)
u32
mask
,
engine
;
nv_mask
(
priv
,
0x003004
+
(
chid
*
8
),
0x00000001
,
0x00000000
);
nvc0_fifo_
play
list_update
(
priv
);
nvc0_fifo_
run
list_update
(
priv
);
mask
=
nv_rd32
(
priv
,
0x0025a4
);
for
(
engine
=
0
;
mask
&&
engine
<
16
;
engine
++
)
{
if
(
!
(
mask
&
(
1
<<
engine
)))
...
...
@@ -400,7 +400,7 @@ static const struct nouveau_enum nvc0_fifo_fault_gpcclient[] = {
{}
};
static
const
struct
nouveau_bitfield
nvc0_fifo_
subfifo
_intr
[]
=
{
static
const
struct
nouveau_bitfield
nvc0_fifo_
pbdma
_intr
[]
=
{
/* { 0x00008000, "" } seen with null ib push */
{
0x00200000
,
"ILLEGAL_MTHD"
},
{
0x00800000
,
"EMPTY_SUBC"
},
...
...
@@ -485,7 +485,7 @@ nvc0_fifo_swmthd(struct nvc0_fifo_priv *priv, u32 chid, u32 mthd, u32 data)
}
static
void
nvc0_fifo_isr_
subfifo
_intr
(
struct
nvc0_fifo_priv
*
priv
,
int
unit
)
nvc0_fifo_isr_
pbdma
_intr
(
struct
nvc0_fifo_priv
*
priv
,
int
unit
)
{
u32
stat
=
nv_rd32
(
priv
,
0x040108
+
(
unit
*
0x2000
));
u32
addr
=
nv_rd32
(
priv
,
0x0400c0
+
(
unit
*
0x2000
));
...
...
@@ -501,11 +501,11 @@ nvc0_fifo_isr_subfifo_intr(struct nvc0_fifo_priv *priv, int unit)
}
if
(
show
)
{
nv_error
(
priv
,
"
SUBFIFO
%d:"
,
unit
);
nouveau_bitfield_print
(
nvc0_fifo_
subfifo
_intr
,
show
);
nv_error
(
priv
,
"
PBDMA
%d:"
,
unit
);
nouveau_bitfield_print
(
nvc0_fifo_
pbdma
_intr
,
show
);
pr_cont
(
"
\n
"
);
nv_error
(
priv
,
"
SUBFIFO
%d: ch %d [%s] subc %d mthd 0x%04x data 0x%08x
\n
"
,
"
PBDMA
%d: ch %d [%s] subc %d mthd 0x%04x data 0x%08x
\n
"
,
unit
,
chid
,
nouveau_client_name_for_fifo_chid
(
&
priv
->
base
,
chid
),
subc
,
mthd
,
data
);
...
...
@@ -569,8 +569,8 @@ nvc0_fifo_intr(struct nouveau_subdev *subdev)
u32
u
=
units
;
while
(
u
)
{
int
i
=
ffs
(
u
)
-
1
;
nvc0_fifo_isr_
subfifo
_intr
(
priv
,
i
);
int
i
=
__ffs
(
u
)
;
nvc0_fifo_isr_
pbdma
_intr
(
priv
,
i
);
u
&=
~
(
1
<<
i
);
}
...
...
@@ -628,12 +628,12 @@ nvc0_fifo_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return
ret
;
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x1000
,
0x1000
,
0
,
&
priv
->
play
list
[
0
]);
&
priv
->
run
list
[
0
]);
if
(
ret
)
return
ret
;
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x1000
,
0x1000
,
0
,
&
priv
->
play
list
[
1
]);
&
priv
->
run
list
[
1
]);
if
(
ret
)
return
ret
;
...
...
@@ -665,8 +665,8 @@ nvc0_fifo_dtor(struct nouveau_object *object)
nouveau_gpuobj_unmap
(
&
priv
->
user
.
bar
);
nouveau_gpuobj_ref
(
NULL
,
&
priv
->
user
.
mem
);
nouveau_gpuobj_ref
(
NULL
,
&
priv
->
play
list
[
1
]);
nouveau_gpuobj_ref
(
NULL
,
&
priv
->
play
list
[
0
]);
nouveau_gpuobj_ref
(
NULL
,
&
priv
->
run
list
[
1
]);
nouveau_gpuobj_ref
(
NULL
,
&
priv
->
run
list
[
0
]);
nouveau_fifo_destroy
(
&
priv
->
base
);
}
...
...
@@ -685,9 +685,9 @@ nvc0_fifo_init(struct nouveau_object *object)
nv_wr32
(
priv
,
0x002204
,
0xffffffff
);
priv
->
spoon_nr
=
hweight32
(
nv_rd32
(
priv
,
0x002204
));
nv_debug
(
priv
,
"%d
subfifo
(s)
\n
"
,
priv
->
spoon_nr
);
nv_debug
(
priv
,
"%d
PBDMA unit
(s)
\n
"
,
priv
->
spoon_nr
);
/* assign engines to
subfifo
s */
/* assign engines to
PBDMA
s */
if
(
priv
->
spoon_nr
>=
3
)
{
nv_wr32
(
priv
,
0x002208
,
~
(
1
<<
0
));
/* PGRAPH */
nv_wr32
(
priv
,
0x00220c
,
~
(
1
<<
1
));
/* PVP */
...
...
@@ -697,7 +697,7 @@ nvc0_fifo_init(struct nouveau_object *object)
nv_wr32
(
priv
,
0x00221c
,
~
(
1
<<
1
));
/* PCE1 */
}
/* P
SUBFIFO
[n] */
/* P
BDMA
[n] */
for
(
i
=
0
;
i
<
priv
->
spoon_nr
;
i
++
)
{
nv_mask
(
priv
,
0x04013c
+
(
i
*
0x2000
),
0x10000100
,
0x00000000
);
nv_wr32
(
priv
,
0x040108
+
(
i
*
0x2000
),
0xffffffff
);
/* INTR */
...
...
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