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
79266243
Commit
79266243
authored
Mar 11, 2016
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/fifo/gf100: identify fault-recovery members more clearly
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
adbe24a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
+8
-8
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h
+4
-2
No files found.
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
View file @
79266243
...
@@ -134,9 +134,9 @@ gf100_fifo_engine(struct gf100_fifo *fifo, u32 engn)
...
@@ -134,9 +134,9 @@ gf100_fifo_engine(struct gf100_fifo *fifo, u32 engn)
}
}
static
void
static
void
gf100_fifo_recover_work
(
struct
work_struct
*
w
ork
)
gf100_fifo_recover_work
(
struct
work_struct
*
w
)
{
{
struct
gf100_fifo
*
fifo
=
container_of
(
w
ork
,
typeof
(
*
fifo
),
fault
);
struct
gf100_fifo
*
fifo
=
container_of
(
w
,
typeof
(
*
fifo
),
recover
.
work
);
struct
nvkm_device
*
device
=
fifo
->
base
.
engine
.
subdev
.
device
;
struct
nvkm_device
*
device
=
fifo
->
base
.
engine
.
subdev
.
device
;
struct
nvkm_engine
*
engine
;
struct
nvkm_engine
*
engine
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -144,8 +144,8 @@ gf100_fifo_recover_work(struct work_struct *work)
...
@@ -144,8 +144,8 @@ gf100_fifo_recover_work(struct work_struct *work)
u64
mask
,
todo
;
u64
mask
,
todo
;
spin_lock_irqsave
(
&
fifo
->
base
.
lock
,
flags
);
spin_lock_irqsave
(
&
fifo
->
base
.
lock
,
flags
);
mask
=
fifo
->
mask
;
mask
=
fifo
->
recover
.
mask
;
fifo
->
mask
=
0ULL
;
fifo
->
recover
.
mask
=
0ULL
;
spin_unlock_irqrestore
(
&
fifo
->
base
.
lock
,
flags
);
spin_unlock_irqrestore
(
&
fifo
->
base
.
lock
,
flags
);
for
(
todo
=
mask
;
engn
=
__ffs64
(
todo
),
todo
;
todo
&=
~
(
1
<<
engn
))
for
(
todo
=
mask
;
engn
=
__ffs64
(
todo
),
todo
;
todo
&=
~
(
1
<<
engn
))
...
@@ -180,8 +180,8 @@ gf100_fifo_recover(struct gf100_fifo *fifo, struct nvkm_engine *engine,
...
@@ -180,8 +180,8 @@ gf100_fifo_recover(struct gf100_fifo *fifo, struct nvkm_engine *engine,
list_del_init
(
&
chan
->
head
);
list_del_init
(
&
chan
->
head
);
chan
->
killed
=
true
;
chan
->
killed
=
true
;
fifo
->
mask
|=
1ULL
<<
engine
->
subdev
.
index
;
fifo
->
recover
.
mask
|=
1ULL
<<
engine
->
subdev
.
index
;
schedule_work
(
&
fifo
->
fault
);
schedule_work
(
&
fifo
->
recover
.
work
);
}
}
static
const
struct
nvkm_enum
static
const
struct
nvkm_enum
...
@@ -587,7 +587,7 @@ static void
...
@@ -587,7 +587,7 @@ static void
gf100_fifo_fini
(
struct
nvkm_fifo
*
base
)
gf100_fifo_fini
(
struct
nvkm_fifo
*
base
)
{
{
struct
gf100_fifo
*
fifo
=
gf100_fifo
(
base
);
struct
gf100_fifo
*
fifo
=
gf100_fifo
(
base
);
flush_work
(
&
fifo
->
fault
);
flush_work
(
&
fifo
->
recover
.
work
);
}
}
static
void
static
void
...
@@ -660,7 +660,7 @@ gf100_fifo_new(struct nvkm_device *device, int index, struct nvkm_fifo **pfifo)
...
@@ -660,7 +660,7 @@ gf100_fifo_new(struct nvkm_device *device, int index, struct nvkm_fifo **pfifo)
if
(
!
(
fifo
=
kzalloc
(
sizeof
(
*
fifo
),
GFP_KERNEL
)))
if
(
!
(
fifo
=
kzalloc
(
sizeof
(
*
fifo
),
GFP_KERNEL
)))
return
-
ENOMEM
;
return
-
ENOMEM
;
INIT_LIST_HEAD
(
&
fifo
->
chan
);
INIT_LIST_HEAD
(
&
fifo
->
chan
);
INIT_WORK
(
&
fifo
->
fault
,
gf100_fifo_recover_work
);
INIT_WORK
(
&
fifo
->
recover
.
work
,
gf100_fifo_recover_work
);
*
pfifo
=
&
fifo
->
base
;
*
pfifo
=
&
fifo
->
base
;
return
nvkm_fifo_ctor
(
&
gf100_fifo
,
device
,
index
,
128
,
&
fifo
->
base
);
return
nvkm_fifo_ctor
(
&
gf100_fifo
,
device
,
index
,
128
,
&
fifo
->
base
);
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h
View file @
79266243
...
@@ -11,8 +11,10 @@ struct gf100_fifo {
...
@@ -11,8 +11,10 @@ struct gf100_fifo {
struct
list_head
chan
;
struct
list_head
chan
;
struct
work_struct
fault
;
struct
{
u64
mask
;
struct
work_struct
work
;
u64
mask
;
}
recover
;
int
pbdma_nr
;
int
pbdma_nr
;
...
...
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