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
117e1633
Commit
117e1633
authored
Feb 21, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nv50/disp: decode the known error codes to human readable form
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
a8f8b489
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
20 deletions
+43
-20
drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
+43
-20
No files found.
drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
View file @
117e1633
...
...
@@ -26,6 +26,7 @@
#include <core/parent.h>
#include <core/handle.h>
#include <core/class.h>
#include <core/enum.h>
#include <subdev/bios.h>
#include <subdev/bios/dcb.h>
...
...
@@ -780,25 +781,46 @@ nv50_disp_cclass = {
* Display engine implementation
******************************************************************************/
static
void
nv50_disp_intr_error
(
struct
nv50_disp_priv
*
priv
)
{
u32
channels
=
(
nv_rd32
(
priv
,
0x610020
)
&
0x001f0000
)
>>
16
;
u32
addr
,
data
;
int
chid
;
for
(
chid
=
0
;
chid
<
5
;
chid
++
)
{
if
(
!
(
channels
&
(
1
<<
chid
)))
continue
;
static
const
struct
nouveau_enum
nv50_disp_intr_error_type
[]
=
{
{
3
,
"ILLEGAL_MTHD"
},
{
4
,
"INVALID_VALUE"
},
{
5
,
"INVALID_STATE"
},
{
7
,
"INVALID_HANDLE"
},
{}
};
nv_wr32
(
priv
,
0x610020
,
0x00010000
<<
chid
);
addr
=
nv_rd32
(
priv
,
0x610080
+
(
chid
*
0x08
));
data
=
nv_rd32
(
priv
,
0x610084
+
(
chid
*
0x08
));
nv_wr32
(
priv
,
0x610080
+
(
chid
*
0x08
),
0x90000000
);
static
const
struct
nouveau_enum
nv50_disp_intr_error_code
[]
=
{
{
0x00
,
""
},
{}
};
nv_error
(
priv
,
"chid %d mthd 0x%04x data 0x%08x 0x%08x
\n
"
,
chid
,
addr
&
0xffc
,
data
,
addr
);
}
static
void
nv50_disp_intr_error
(
struct
nv50_disp_priv
*
priv
,
int
chid
)
{
u32
data
=
nv_rd32
(
priv
,
0x610084
+
(
chid
*
0x08
));
u32
addr
=
nv_rd32
(
priv
,
0x610080
+
(
chid
*
0x08
));
u32
code
=
(
addr
&
0x00ff0000
)
>>
16
;
u32
type
=
(
addr
&
0x00007000
)
>>
12
;
u32
mthd
=
(
addr
&
0x00000ffc
);
const
struct
nouveau_enum
*
ec
,
*
et
;
char
ecunk
[
6
],
etunk
[
6
];
et
=
nouveau_enum_find
(
nv50_disp_intr_error_type
,
type
);
if
(
!
et
)
snprintf
(
etunk
,
sizeof
(
etunk
),
"UNK%02X"
,
type
);
ec
=
nouveau_enum_find
(
nv50_disp_intr_error_code
,
code
);
if
(
!
ec
)
snprintf
(
ecunk
,
sizeof
(
ecunk
),
"UNK%02X"
,
code
);
nv_error
(
priv
,
"%s [%s] chid %d mthd 0x%04x data 0x%08x
\n
"
,
et
?
et
->
name
:
etunk
,
ec
?
ec
->
name
:
ecunk
,
chid
,
mthd
,
data
);
nv_wr32
(
priv
,
0x610020
,
0x00010000
<<
chid
);
nv_wr32
(
priv
,
0x610080
+
(
chid
*
0x08
),
0x90000000
);
}
static
u16
...
...
@@ -1288,9 +1310,10 @@ nv50_disp_intr(struct nouveau_subdev *subdev)
u32
intr0
=
nv_rd32
(
priv
,
0x610020
);
u32
intr1
=
nv_rd32
(
priv
,
0x610024
);
if
(
intr0
&
0x001f0000
)
{
nv50_disp_intr_error
(
priv
);
intr0
&=
~
0x001f0000
;
while
(
intr0
&
0x001f0000
)
{
u32
chid
=
__ffs
(
intr0
&
0x001f0000
)
-
16
;
nv50_disp_intr_error
(
priv
,
chid
);
intr0
&=
~
(
0x00010000
<<
chid
);
}
if
(
intr1
&
0x00000004
)
{
...
...
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