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
fec43a72
Commit
fec43a72
authored
May 13, 2013
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nvc0/gr: port mp trap handling from calim's kepler code
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
16b133df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
6 deletions
+38
-6
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
+38
-6
No files found.
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
View file @
fec43a72
...
@@ -237,6 +237,43 @@ nvc0_graph_ctxctl_isr(struct nvc0_graph_priv *priv)
...
@@ -237,6 +237,43 @@ nvc0_graph_ctxctl_isr(struct nvc0_graph_priv *priv)
nv_wr32
(
priv
,
0x409c20
,
ustat
);
nv_wr32
(
priv
,
0x409c20
,
ustat
);
}
}
static
const
struct
nouveau_enum
nvc0_mp_warp_error
[]
=
{
{
0x00
,
"NO_ERROR"
},
{
0x01
,
"STACK_MISMATCH"
},
{
0x05
,
"MISALIGNED_PC"
},
{
0x08
,
"MISALIGNED_GPR"
},
{
0x09
,
"INVALID_OPCODE"
},
{
0x0d
,
"GPR_OUT_OF_BOUNDS"
},
{
0x0e
,
"MEM_OUT_OF_BOUNDS"
},
{
0x0f
,
"UNALIGNED_MEM_ACCESS"
},
{
0x11
,
"INVALID_PARAM"
},
{}
};
static
const
struct
nouveau_bitfield
nvc0_mp_global_error
[]
=
{
{
0x00000004
,
"MULTIPLE_WARP_ERRORS"
},
{
0x00000008
,
"OUT_OF_STACK_SPACE"
},
{}
};
static
void
nvc0_graph_trap_mp
(
struct
nvc0_graph_priv
*
priv
,
int
gpc
,
int
tpc
)
{
u32
werr
=
nv_rd32
(
priv
,
TPC_UNIT
(
gpc
,
tpc
,
0x648
));
u32
gerr
=
nv_rd32
(
priv
,
TPC_UNIT
(
gpc
,
tpc
,
0x650
));
nv_error
(
priv
,
"GPC%i/TPC%i/MP trap:"
,
gpc
,
tpc
);
nouveau_bitfield_print
(
nvc0_mp_global_error
,
gerr
);
if
(
werr
)
{
pr_cont
(
" "
);
nouveau_enum_print
(
nvc0_mp_warp_error
,
werr
&
0xffff
);
}
pr_cont
(
"
\n
"
);
nv_wr32
(
priv
,
TPC_UNIT
(
gpc
,
tpc
,
0x648
),
0x00000000
);
nv_wr32
(
priv
,
TPC_UNIT
(
gpc
,
tpc
,
0x650
),
gerr
);
}
static
void
static
void
nvc0_graph_trap_tpc
(
struct
nvc0_graph_priv
*
priv
,
int
gpc
,
int
tpc
)
nvc0_graph_trap_tpc
(
struct
nvc0_graph_priv
*
priv
,
int
gpc
,
int
tpc
)
{
{
...
@@ -251,12 +288,7 @@ nvc0_graph_trap_tpc(struct nvc0_graph_priv *priv, int gpc, int tpc)
...
@@ -251,12 +288,7 @@ nvc0_graph_trap_tpc(struct nvc0_graph_priv *priv, int gpc, int tpc)
}
}
if
(
stat
&
0x00000002
)
{
if
(
stat
&
0x00000002
)
{
u32
trap0
=
nv_rd32
(
priv
,
TPC_UNIT
(
gpc
,
tpc
,
0x0644
));
nvc0_graph_trap_mp
(
priv
,
gpc
,
tpc
);
u32
trap1
=
nv_rd32
(
priv
,
TPC_UNIT
(
gpc
,
tpc
,
0x064c
));
nv_error
(
priv
,
"GPC%d/TPC%d/MP: 0x%08x 0x%08x
\n
"
,
gpc
,
tpc
,
trap0
,
trap1
);
nv_wr32
(
priv
,
TPC_UNIT
(
gpc
,
tpc
,
0x0644
),
0x001ffffe
);
nv_wr32
(
priv
,
TPC_UNIT
(
gpc
,
tpc
,
0x064c
),
0x0000000f
);
nv_wr32
(
priv
,
TPC_UNIT
(
gpc
,
tpc
,
0x0508
),
0x00000002
);
nv_wr32
(
priv
,
TPC_UNIT
(
gpc
,
tpc
,
0x0508
),
0x00000002
);
stat
&=
~
0x00000002
;
stat
&=
~
0x00000002
;
}
}
...
...
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