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
e99bf010
Commit
e99bf010
authored
Feb 22, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nvc0/fifo: engine intr
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
22a7a27b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
12 deletions
+40
-12
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
+40
-12
No files found.
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
View file @
e99bf010
...
@@ -244,23 +244,20 @@ nvc0_fifo_chan_init(struct nouveau_object *object)
...
@@ -244,23 +244,20 @@ nvc0_fifo_chan_init(struct nouveau_object *object)
return
0
;
return
0
;
}
}
static
void
nvc0_fifo_intr_engine
(
struct
nvc0_fifo_priv
*
priv
);
static
int
static
int
nvc0_fifo_chan_fini
(
struct
nouveau_object
*
object
,
bool
suspend
)
nvc0_fifo_chan_fini
(
struct
nouveau_object
*
object
,
bool
suspend
)
{
{
struct
nvc0_fifo_priv
*
priv
=
(
void
*
)
object
->
engine
;
struct
nvc0_fifo_priv
*
priv
=
(
void
*
)
object
->
engine
;
struct
nvc0_fifo_chan
*
chan
=
(
void
*
)
object
;
struct
nvc0_fifo_chan
*
chan
=
(
void
*
)
object
;
u32
chid
=
chan
->
base
.
chid
;
u32
chid
=
chan
->
base
.
chid
;
u32
mask
,
engine
;
nv_mask
(
priv
,
0x003004
+
(
chid
*
8
),
0x00000001
,
0x00000000
);
nv_mask
(
priv
,
0x003004
+
(
chid
*
8
),
0x00000001
,
0x00000000
);
nvc0_fifo_runlist_update
(
priv
);
nvc0_fifo_runlist_update
(
priv
);
mask
=
nv_rd32
(
priv
,
0x0025a4
);
for
(
engine
=
0
;
mask
&&
engine
<
16
;
engine
++
)
{
nvc0_fifo_intr_engine
(
priv
);
if
(
!
(
mask
&
(
1
<<
engine
)))
continue
;
nv_mask
(
priv
,
0x0025a8
+
(
engine
*
4
),
0x00000000
,
0x00000000
);
mask
&=
~
(
1
<<
engine
);
}
nv_wr32
(
priv
,
0x003000
+
(
chid
*
8
),
0x00000000
);
nv_wr32
(
priv
,
0x003000
+
(
chid
*
8
),
0x00000000
);
return
nouveau_fifo_channel_fini
(
&
chan
->
base
,
suspend
);
return
nouveau_fifo_channel_fini
(
&
chan
->
base
,
suspend
);
...
@@ -515,6 +512,39 @@ nvc0_fifo_isr_pbdma_intr(struct nvc0_fifo_priv *priv, int unit)
...
@@ -515,6 +512,39 @@ nvc0_fifo_isr_pbdma_intr(struct nvc0_fifo_priv *priv, int unit)
nv_wr32
(
priv
,
0x040108
+
(
unit
*
0x2000
),
stat
);
nv_wr32
(
priv
,
0x040108
+
(
unit
*
0x2000
),
stat
);
}
}
static
void
nvc0_fifo_intr_engine_unit
(
struct
nvc0_fifo_priv
*
priv
,
int
engn
)
{
u32
intr
=
nv_rd32
(
priv
,
0x0025a8
+
(
engn
*
0x04
));
u32
inte
=
nv_rd32
(
priv
,
0x002628
);
u32
unkn
;
for
(
unkn
=
0
;
unkn
<
8
;
unkn
++
)
{
u32
ints
=
(
intr
>>
(
unkn
*
0x04
))
&
inte
;
if
(
ints
&
0x1
)
{
nouveau_event_trigger
(
priv
->
base
.
uevent
,
0
);
ints
&=
~
1
;
}
if
(
ints
)
{
nv_error
(
priv
,
"ENGINE %d %d %01x"
,
engn
,
unkn
,
ints
);
nv_mask
(
priv
,
0x002628
,
ints
,
0
);
}
}
nv_wr32
(
priv
,
0x0025a8
+
(
engn
*
0x04
),
intr
);
}
static
void
nvc0_fifo_intr_engine
(
struct
nvc0_fifo_priv
*
priv
)
{
u32
mask
=
nv_rd32
(
priv
,
0x0025a4
);
while
(
mask
)
{
u32
unit
=
__ffs
(
mask
);
nvc0_fifo_intr_engine_unit
(
priv
,
unit
);
mask
&=
~
(
1
<<
unit
);
}
}
static
void
static
void
nvc0_fifo_intr
(
struct
nouveau_subdev
*
subdev
)
nvc0_fifo_intr
(
struct
nouveau_subdev
*
subdev
)
{
{
...
@@ -587,9 +617,7 @@ nvc0_fifo_intr(struct nouveau_subdev *subdev)
...
@@ -587,9 +617,7 @@ nvc0_fifo_intr(struct nouveau_subdev *subdev)
}
}
if
(
stat
&
0x80000000
)
{
if
(
stat
&
0x80000000
)
{
u32
intr
=
nv_mask
(
priv
,
0x0025a8
,
0x00000000
,
0x00000000
);
nvc0_fifo_intr_engine
(
priv
);
nouveau_event_trigger
(
priv
->
base
.
uevent
,
0
);
nv_debug
(
priv
,
"INTR 0x80000000: 0x%08x
\n
"
,
intr
);
stat
&=
~
0x80000000
;
stat
&=
~
0x80000000
;
}
}
...
@@ -710,7 +738,7 @@ nvc0_fifo_init(struct nouveau_object *object)
...
@@ -710,7 +738,7 @@ nvc0_fifo_init(struct nouveau_object *object)
nv_wr32
(
priv
,
0x002a00
,
0xffffffff
);
/* clears PFIFO.INTR bit 30 */
nv_wr32
(
priv
,
0x002a00
,
0xffffffff
);
/* clears PFIFO.INTR bit 30 */
nv_wr32
(
priv
,
0x002100
,
0xffffffff
);
nv_wr32
(
priv
,
0x002100
,
0xffffffff
);
nv_wr32
(
priv
,
0x002140
,
0x3fffffff
);
nv_wr32
(
priv
,
0x002140
,
0x3fffffff
);
nv_wr32
(
priv
,
0x002628
,
0x00000001
);
/*
makes mthd 0x20 work
*/
nv_wr32
(
priv
,
0x002628
,
0x00000001
);
/*
ENGINE_INTR_EN
*/
return
0
;
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