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
3534821d
Commit
3534821d
authored
Jan 18, 2017
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/fifo/gk104-: directly use new recovery code for mmu faults
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
eaa5ed65
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
8 deletions
+37
-8
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
+14
-4
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+20
-4
drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h
+3
-0
No files found.
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
View file @
3534821d
...
@@ -66,19 +66,29 @@ nvkm_fifo_chan_put(struct nvkm_fifo *fifo, unsigned long flags,
...
@@ -66,19 +66,29 @@ nvkm_fifo_chan_put(struct nvkm_fifo *fifo, unsigned long flags,
}
}
struct
nvkm_fifo_chan
*
struct
nvkm_fifo_chan
*
nvkm_fifo_chan_inst
(
struct
nvkm_fifo
*
fifo
,
u64
inst
,
unsigned
long
*
rflags
)
nvkm_fifo_chan_inst
_locked
(
struct
nvkm_fifo
*
fifo
,
u64
inst
)
{
{
struct
nvkm_fifo_chan
*
chan
;
struct
nvkm_fifo_chan
*
chan
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
fifo
->
lock
,
flags
);
list_for_each_entry
(
chan
,
&
fifo
->
chan
,
head
)
{
list_for_each_entry
(
chan
,
&
fifo
->
chan
,
head
)
{
if
(
chan
->
inst
->
addr
==
inst
)
{
if
(
chan
->
inst
->
addr
==
inst
)
{
list_del
(
&
chan
->
head
);
list_del
(
&
chan
->
head
);
list_add
(
&
chan
->
head
,
&
fifo
->
chan
);
list_add
(
&
chan
->
head
,
&
fifo
->
chan
);
*
rflags
=
flags
;
return
chan
;
return
chan
;
}
}
}
}
return
NULL
;
}
struct
nvkm_fifo_chan
*
nvkm_fifo_chan_inst
(
struct
nvkm_fifo
*
fifo
,
u64
inst
,
unsigned
long
*
rflags
)
{
struct
nvkm_fifo_chan
*
chan
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
fifo
->
lock
,
flags
);
if
((
chan
=
nvkm_fifo_chan_inst_locked
(
fifo
,
inst
)))
{
*
rflags
=
flags
;
return
chan
;
}
spin_unlock_irqrestore
(
&
fifo
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
fifo
->
lock
,
flags
);
return
NULL
;
return
NULL
;
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
View file @
3534821d
...
@@ -435,6 +435,7 @@ gk104_fifo_intr_fault(struct gk104_fifo *fifo, int unit)
...
@@ -435,6 +435,7 @@ gk104_fifo_intr_fault(struct gk104_fifo *fifo, int unit)
struct
nvkm_fifo_chan
*
chan
;
struct
nvkm_fifo_chan
*
chan
;
unsigned
long
flags
;
unsigned
long
flags
;
char
gpcid
[
8
]
=
""
,
en
[
16
]
=
""
;
char
gpcid
[
8
]
=
""
,
en
[
16
]
=
""
;
int
engn
;
er
=
nvkm_enum_find
(
fifo
->
func
->
fault
.
reason
,
reason
);
er
=
nvkm_enum_find
(
fifo
->
func
->
fault
.
reason
,
reason
);
eu
=
nvkm_enum_find
(
fifo
->
func
->
fault
.
engine
,
unit
);
eu
=
nvkm_enum_find
(
fifo
->
func
->
fault
.
engine
,
unit
);
...
@@ -476,7 +477,8 @@ gk104_fifo_intr_fault(struct gk104_fifo *fifo, int unit)
...
@@ -476,7 +477,8 @@ gk104_fifo_intr_fault(struct gk104_fifo *fifo, int unit)
snprintf
(
en
,
sizeof
(
en
),
"%s"
,
eu
->
name
);
snprintf
(
en
,
sizeof
(
en
),
"%s"
,
eu
->
name
);
}
}
chan
=
nvkm_fifo_chan_inst
(
&
fifo
->
base
,
(
u64
)
inst
<<
12
,
&
flags
);
spin_lock_irqsave
(
&
fifo
->
base
.
lock
,
flags
);
chan
=
nvkm_fifo_chan_inst_locked
(
&
fifo
->
base
,
(
u64
)
inst
<<
12
);
nvkm_error
(
subdev
,
nvkm_error
(
subdev
,
"%s fault at %010llx engine %02x [%s] client %02x [%s%s] "
"%s fault at %010llx engine %02x [%s] client %02x [%s%s] "
...
@@ -487,9 +489,23 @@ gk104_fifo_intr_fault(struct gk104_fifo *fifo, int unit)
...
@@ -487,9 +489,23 @@ gk104_fifo_intr_fault(struct gk104_fifo *fifo, int unit)
(
u64
)
inst
<<
12
,
(
u64
)
inst
<<
12
,
chan
?
chan
->
object
.
client
->
name
:
"unknown"
);
chan
?
chan
->
object
.
client
->
name
:
"unknown"
);
if
(
engine
&&
chan
)
gk104_fifo_recover
(
fifo
,
engine
,
(
void
*
)
chan
);
/* Kill the channel that caused the fault. */
nvkm_fifo_chan_put
(
&
fifo
->
base
,
flags
,
&
chan
);
if
(
chan
)
gk104_fifo_recover_chan
(
&
fifo
->
base
,
chan
->
chid
);
/* Channel recovery will probably have already done this for the
* correct engine(s), but just in case we can't find the channel
* information...
*/
for
(
engn
=
0
;
engn
<
fifo
->
engine_nr
&&
engine
;
engn
++
)
{
if
(
fifo
->
engine
[
engn
].
engine
==
engine
)
{
gk104_fifo_recover_engn
(
fifo
,
engn
);
break
;
}
}
spin_unlock_irqrestore
(
&
fifo
->
base
.
lock
,
flags
);
}
}
static
const
struct
nvkm_bitfield
gk104_fifo_pbdma_intr_0
[]
=
{
static
const
struct
nvkm_bitfield
gk104_fifo_pbdma_intr_0
[]
=
{
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h
View file @
3534821d
...
@@ -10,6 +10,9 @@ void nvkm_fifo_cevent(struct nvkm_fifo *);
...
@@ -10,6 +10,9 @@ void nvkm_fifo_cevent(struct nvkm_fifo *);
void
nvkm_fifo_kevent
(
struct
nvkm_fifo
*
,
int
chid
);
void
nvkm_fifo_kevent
(
struct
nvkm_fifo
*
,
int
chid
);
void
nvkm_fifo_recover_chan
(
struct
nvkm_fifo
*
,
int
chid
);
void
nvkm_fifo_recover_chan
(
struct
nvkm_fifo
*
,
int
chid
);
struct
nvkm_fifo_chan
*
nvkm_fifo_chan_inst_locked
(
struct
nvkm_fifo
*
,
u64
inst
);
struct
nvkm_fifo_chan_oclass
;
struct
nvkm_fifo_chan_oclass
;
struct
nvkm_fifo_func
{
struct
nvkm_fifo_func
{
void
*
(
*
dtor
)(
struct
nvkm_fifo
*
);
void
*
(
*
dtor
)(
struct
nvkm_fifo
*
);
...
...
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