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
a699a85a
Commit
a699a85a
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bus: switch to subdev printk macros
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
60b29d20
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
45 deletions
+49
-45
drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c
+9
-9
drivers/gpu/drm/nouveau/nvkm/subdev/bus/hwsq.c
drivers/gpu/drm/nouveau/nvkm/subdev/bus/hwsq.c
+9
-8
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv04.c
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv04.c
+8
-7
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv31.c
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv31.c
+14
-12
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c
+9
-9
No files found.
drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c
View file @
a699a85a
...
@@ -27,20 +27,20 @@
...
@@ -27,20 +27,20 @@
static
void
static
void
gf100_bus_intr
(
struct
nvkm_subdev
*
subdev
)
gf100_bus_intr
(
struct
nvkm_subdev
*
subdev
)
{
{
struct
nvkm_bus
*
bus
=
nvkm_bus
(
subdev
);
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_device
*
device
=
bus
->
subdev
.
device
;
u32
stat
=
nvkm_rd32
(
device
,
0x001100
)
&
nvkm_rd32
(
device
,
0x001140
);
u32
stat
=
nvkm_rd32
(
device
,
0x001100
)
&
nvkm_rd32
(
device
,
0x001140
);
if
(
stat
&
0x0000000e
)
{
if
(
stat
&
0x0000000e
)
{
u32
addr
=
nvkm_rd32
(
device
,
0x009084
);
u32
addr
=
nvkm_rd32
(
device
,
0x009084
);
u32
data
=
nvkm_rd32
(
device
,
0x009088
);
u32
data
=
nvkm_rd32
(
device
,
0x009088
);
nv_error
(
bus
,
"MMIO %s of 0x%08x FAULT at 0x%06x [ %s%s%s]
\n
"
,
nvkm_error
(
subdev
,
(
addr
&
0x00000002
)
?
"write"
:
"read"
,
data
,
"MMIO %s of %08x FAULT at %06x [ %s%s%s]
\n
"
,
(
addr
&
0x00fffffc
),
(
addr
&
0x00000002
)
?
"write"
:
"read"
,
data
,
(
stat
&
0x00000002
)
?
"!ENGINE "
:
""
,
(
addr
&
0x00fffffc
),
(
stat
&
0x00000004
)
?
"IBUS "
:
""
,
(
stat
&
0x00000002
)
?
"!ENGINE "
:
""
,
(
stat
&
0x00000008
)
?
"TIMEOUT "
:
""
);
(
stat
&
0x00000004
)
?
"IBUS "
:
""
,
(
stat
&
0x00000008
)
?
"TIMEOUT "
:
""
);
nvkm_wr32
(
device
,
0x009084
,
0x00000000
);
nvkm_wr32
(
device
,
0x009084
,
0x00000000
);
nvkm_wr32
(
device
,
0x001100
,
(
stat
&
0x0000000e
));
nvkm_wr32
(
device
,
0x001100
,
(
stat
&
0x0000000e
));
...
@@ -48,7 +48,7 @@ gf100_bus_intr(struct nvkm_subdev *subdev)
...
@@ -48,7 +48,7 @@ gf100_bus_intr(struct nvkm_subdev *subdev)
}
}
if
(
stat
)
{
if
(
stat
)
{
nv
_error
(
bus
,
"unknown intr 0x
%08x
\n
"
,
stat
);
nv
km_error
(
subdev
,
"intr
%08x
\n
"
,
stat
);
nvkm_mask
(
device
,
0x001140
,
stat
,
0x00000000
);
nvkm_mask
(
device
,
0x001140
,
stat
,
0x00000000
);
}
}
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bus/hwsq.c
View file @
a699a85a
...
@@ -64,20 +64,21 @@ nvkm_hwsq_fini(struct nvkm_hwsq **phwsq, bool exec)
...
@@ -64,20 +64,21 @@ nvkm_hwsq_fini(struct nvkm_hwsq **phwsq, bool exec)
int
ret
=
0
,
i
;
int
ret
=
0
,
i
;
if
(
hwsq
)
{
if
(
hwsq
)
{
struct
nvkm_bus
*
bus
=
hwsq
->
bus
;
struct
nvkm_bus
*
bus
=
hwsq
->
bus
;
struct
nvkm_subdev
*
subdev
=
&
bus
->
subdev
;
hwsq
->
c
.
size
=
(
hwsq
->
c
.
size
+
4
)
/
4
;
hwsq
->
c
.
size
=
(
hwsq
->
c
.
size
+
4
)
/
4
;
if
(
hwsq
->
c
.
size
<=
bus
->
hwsq_size
)
{
if
(
hwsq
->
c
.
size
<=
bus
->
hwsq_size
)
{
if
(
exec
)
if
(
exec
)
ret
=
bus
->
hwsq_exec
(
bus
,
(
u32
*
)
hwsq
->
c
.
data
,
ret
=
bus
->
hwsq_exec
(
bus
,
(
u32
*
)
hwsq
->
c
.
data
,
hwsq
->
c
.
size
);
hwsq
->
c
.
size
);
if
(
ret
)
if
(
ret
)
nv
_error
(
bus
,
"hwsq exec failed: %d
\n
"
,
ret
);
nv
km_error
(
subdev
,
"hwsq exec failed: %d
\n
"
,
ret
);
}
else
{
}
else
{
nv
_error
(
bus
,
"hwsq ucode too large
\n
"
);
nv
km_error
(
subdev
,
"hwsq ucode too large
\n
"
);
ret
=
-
ENOSPC
;
ret
=
-
ENOSPC
;
}
}
for
(
i
=
0
;
ret
&&
i
<
hwsq
->
c
.
size
;
i
++
)
for
(
i
=
0
;
ret
&&
i
<
hwsq
->
c
.
size
;
i
++
)
nv
_error
(
bus
,
"
\t
0x
%08x
\n
"
,
((
u32
*
)
hwsq
->
c
.
data
)[
i
]);
nv
km_error
(
subdev
,
"
\t
%08x
\n
"
,
((
u32
*
)
hwsq
->
c
.
data
)[
i
]);
*
phwsq
=
NULL
;
*
phwsq
=
NULL
;
kfree
(
hwsq
);
kfree
(
hwsq
);
...
@@ -88,7 +89,7 @@ nvkm_hwsq_fini(struct nvkm_hwsq **phwsq, bool exec)
...
@@ -88,7 +89,7 @@ nvkm_hwsq_fini(struct nvkm_hwsq **phwsq, bool exec)
void
void
nvkm_hwsq_wr32
(
struct
nvkm_hwsq
*
hwsq
,
u32
addr
,
u32
data
)
nvkm_hwsq_wr32
(
struct
nvkm_hwsq
*
hwsq
,
u32
addr
,
u32
data
)
{
{
nv
_debug
(
hwsq
->
bus
,
"R[%06x] = 0x
%08x
\n
"
,
addr
,
data
);
nv
km_debug
(
&
hwsq
->
bus
->
subdev
,
"R[%06x] =
%08x
\n
"
,
addr
,
data
);
if
(
hwsq
->
data
!=
data
)
{
if
(
hwsq
->
data
!=
data
)
{
if
((
data
&
0xffff0000
)
!=
(
hwsq
->
data
&
0xffff0000
))
{
if
((
data
&
0xffff0000
)
!=
(
hwsq
->
data
&
0xffff0000
))
{
...
@@ -113,7 +114,7 @@ nvkm_hwsq_wr32(struct nvkm_hwsq *hwsq, u32 addr, u32 data)
...
@@ -113,7 +114,7 @@ nvkm_hwsq_wr32(struct nvkm_hwsq *hwsq, u32 addr, u32 data)
void
void
nvkm_hwsq_setf
(
struct
nvkm_hwsq
*
hwsq
,
u8
flag
,
int
data
)
nvkm_hwsq_setf
(
struct
nvkm_hwsq
*
hwsq
,
u8
flag
,
int
data
)
{
{
nv
_debug
(
hwsq
->
bus
,
" FLAG[%02x] = %d
\n
"
,
flag
,
data
);
nv
km_debug
(
&
hwsq
->
bus
->
subdev
,
" FLAG[%02x] = %d
\n
"
,
flag
,
data
);
flag
+=
0x80
;
flag
+=
0x80
;
if
(
data
>=
0
)
if
(
data
>=
0
)
flag
+=
0x20
;
flag
+=
0x20
;
...
@@ -125,7 +126,7 @@ nvkm_hwsq_setf(struct nvkm_hwsq *hwsq, u8 flag, int data)
...
@@ -125,7 +126,7 @@ nvkm_hwsq_setf(struct nvkm_hwsq *hwsq, u8 flag, int data)
void
void
nvkm_hwsq_wait
(
struct
nvkm_hwsq
*
hwsq
,
u8
flag
,
u8
data
)
nvkm_hwsq_wait
(
struct
nvkm_hwsq
*
hwsq
,
u8
flag
,
u8
data
)
{
{
nv
_debug
(
hwsq
->
bus
,
" WAIT[%02x] = %d
\n
"
,
flag
,
data
);
nv
km_debug
(
&
hwsq
->
bus
->
subdev
,
" WAIT[%02x] = %d
\n
"
,
flag
,
data
);
hwsq_cmd
(
hwsq
,
3
,
(
u8
[]){
0x5f
,
flag
,
data
});
hwsq_cmd
(
hwsq
,
3
,
(
u8
[]){
0x5f
,
flag
,
data
});
}
}
...
@@ -138,6 +139,6 @@ nvkm_hwsq_nsec(struct nvkm_hwsq *hwsq, u32 nsec)
...
@@ -138,6 +139,6 @@ nvkm_hwsq_nsec(struct nvkm_hwsq *hwsq, u32 nsec)
shift
++
;
shift
++
;
}
}
nv
_debug
(
hwsq
->
bus
,
" DELAY = %d ns
\n
"
,
nsec
);
nv
km_debug
(
&
hwsq
->
bus
->
subdev
,
" DELAY = %d ns
\n
"
,
nsec
);
hwsq_cmd
(
hwsq
,
1
,
(
u8
[]){
0x00
|
(
shift
<<
2
)
|
usec
});
hwsq_cmd
(
hwsq
,
1
,
(
u8
[]){
0x00
|
(
shift
<<
2
)
|
usec
});
}
}
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv04.c
View file @
a699a85a
...
@@ -24,29 +24,30 @@
...
@@ -24,29 +24,30 @@
*/
*/
#include "nv04.h"
#include "nv04.h"
#include <subdev/gpio.h>
static
void
static
void
nv04_bus_intr
(
struct
nvkm_subdev
*
subdev
)
nv04_bus_intr
(
struct
nvkm_subdev
*
subdev
)
{
{
struct
nvkm_bus
*
bus
=
nvkm_bus
(
subdev
);
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_device
*
device
=
bus
->
subdev
.
device
;
u32
stat
=
nvkm_rd32
(
device
,
0x001100
)
&
nvkm_rd32
(
device
,
0x001140
);
u32
stat
=
nvkm_rd32
(
device
,
0x001100
)
&
nvkm_rd32
(
device
,
0x001140
);
if
(
stat
&
0x00000001
)
{
if
(
stat
&
0x00000001
)
{
nv
_error
(
bus
,
"BUS ERROR
\n
"
);
nv
km_error
(
subdev
,
"BUS ERROR
\n
"
);
stat
&=
~
0x00000001
;
stat
&=
~
0x00000001
;
nvkm_wr32
(
device
,
0x001100
,
0x00000001
);
nvkm_wr32
(
device
,
0x001100
,
0x00000001
);
}
}
if
(
stat
&
0x00000110
)
{
if
(
stat
&
0x00000110
)
{
s
ubdev
=
nvkm_subdev
(
subdev
,
NVDEV_SUBDEV_GPIO
)
;
s
truct
nvkm_gpio
*
gpio
=
device
->
gpio
;
if
(
subdev
&&
subdev
->
intr
)
if
(
gpio
&&
gpio
->
subdev
.
intr
)
subdev
->
intr
(
subdev
);
gpio
->
subdev
.
intr
(
&
gpio
->
subdev
);
stat
&=
~
0x00000110
;
stat
&=
~
0x00000110
;
nvkm_wr32
(
device
,
0x001100
,
0x00000110
);
nvkm_wr32
(
device
,
0x001100
,
0x00000110
);
}
}
if
(
stat
)
{
if
(
stat
)
{
nv
_error
(
bus
,
"unknown intr 0x
%08x
\n
"
,
stat
);
nv
km_error
(
subdev
,
"intr
%08x
\n
"
,
stat
);
nvkm_mask
(
device
,
0x001140
,
stat
,
0x00000000
);
nvkm_mask
(
device
,
0x001140
,
stat
,
0x00000000
);
}
}
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv31.c
View file @
a699a85a
...
@@ -24,42 +24,44 @@
...
@@ -24,42 +24,44 @@
*/
*/
#include "nv04.h"
#include "nv04.h"
#include <subdev/gpio.h>
#include <subdev/therm.h>
static
void
static
void
nv31_bus_intr
(
struct
nvkm_subdev
*
subdev
)
nv31_bus_intr
(
struct
nvkm_subdev
*
subdev
)
{
{
struct
nvkm_bus
*
bus
=
nvkm_bus
(
subdev
);
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_device
*
device
=
bus
->
subdev
.
device
;
u32
stat
=
nvkm_rd32
(
device
,
0x001100
)
&
nvkm_rd32
(
device
,
0x001140
);
u32
stat
=
nvkm_rd32
(
device
,
0x001100
)
&
nvkm_rd32
(
device
,
0x001140
);
u32
gpio
=
nvkm_rd32
(
device
,
0x001104
)
&
nvkm_rd32
(
device
,
0x001144
);
u32
gpio
=
nvkm_rd32
(
device
,
0x001104
)
&
nvkm_rd32
(
device
,
0x001144
);
if
(
gpio
)
{
if
(
gpio
)
{
s
ubdev
=
nvkm_subdev
(
bus
,
NVDEV_SUBDEV_GPIO
)
;
s
truct
nvkm_gpio
*
gpio
=
device
->
gpio
;
if
(
subdev
&&
subdev
->
intr
)
if
(
gpio
&&
gpio
->
subdev
.
intr
)
subdev
->
intr
(
subdev
);
gpio
->
subdev
.
intr
(
&
gpio
->
subdev
);
}
}
if
(
stat
&
0x00000008
)
{
/* NV41- */
if
(
stat
&
0x00000008
)
{
/* NV41- */
u32
addr
=
nvkm_rd32
(
device
,
0x009084
);
u32
addr
=
nvkm_rd32
(
device
,
0x009084
);
u32
data
=
nvkm_rd32
(
device
,
0x009088
);
u32
data
=
nvkm_rd32
(
device
,
0x009088
);
nv
_error
(
bus
,
"MMIO %s of 0x%08x FAULT at 0x
%06x
\n
"
,
nv
km_error
(
subdev
,
"MMIO %s of %08x FAULT at
%06x
\n
"
,
(
addr
&
0x00000002
)
?
"write"
:
"read"
,
data
,
(
addr
&
0x00000002
)
?
"write"
:
"read"
,
data
,
(
addr
&
0x00fffffc
));
(
addr
&
0x00fffffc
));
stat
&=
~
0x00000008
;
stat
&=
~
0x00000008
;
nvkm_wr32
(
device
,
0x001100
,
0x00000008
);
nvkm_wr32
(
device
,
0x001100
,
0x00000008
);
}
}
if
(
stat
&
0x00070000
)
{
if
(
stat
&
0x00070000
)
{
s
ubdev
=
nvkm_subdev
(
bus
,
NVDEV_SUBDEV_THERM
)
;
s
truct
nvkm_therm
*
therm
=
device
->
therm
;
if
(
subdev
&&
subdev
->
intr
)
if
(
therm
&&
therm
->
subdev
.
intr
)
subdev
->
intr
(
subdev
);
therm
->
subdev
.
intr
(
&
therm
->
subdev
);
stat
&=
~
0x00070000
;
stat
&=
~
0x00070000
;
nvkm_wr32
(
device
,
0x001100
,
0x00070000
);
nvkm_wr32
(
device
,
0x001100
,
0x00070000
);
}
}
if
(
stat
)
{
if
(
stat
)
{
nv
_error
(
bus
,
"unknown intr 0x
%08x
\n
"
,
stat
);
nv
km_error
(
subdev
,
"intr
%08x
\n
"
,
stat
);
nvkm_mask
(
device
,
0x001140
,
stat
,
0x00000000
);
nvkm_mask
(
device
,
0x001140
,
stat
,
0x00000000
);
}
}
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c
View file @
a699a85a
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
*/
*/
#include "nv04.h"
#include "nv04.h"
#include <subdev/therm.h>
#include <subdev/timer.h>
#include <subdev/timer.h>
static
int
static
int
...
@@ -51,32 +52,31 @@ nv50_bus_hwsq_exec(struct nvkm_bus *bus, u32 *data, u32 size)
...
@@ -51,32 +52,31 @@ nv50_bus_hwsq_exec(struct nvkm_bus *bus, u32 *data, u32 size)
void
void
nv50_bus_intr
(
struct
nvkm_subdev
*
subdev
)
nv50_bus_intr
(
struct
nvkm_subdev
*
subdev
)
{
{
struct
nvkm_bus
*
bus
=
nvkm_bus
(
subdev
);
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_device
*
device
=
bus
->
subdev
.
device
;
u32
stat
=
nvkm_rd32
(
device
,
0x001100
)
&
nvkm_rd32
(
device
,
0x001140
);
u32
stat
=
nvkm_rd32
(
device
,
0x001100
)
&
nvkm_rd32
(
device
,
0x001140
);
if
(
stat
&
0x00000008
)
{
if
(
stat
&
0x00000008
)
{
u32
addr
=
nvkm_rd32
(
device
,
0x009084
);
u32
addr
=
nvkm_rd32
(
device
,
0x009084
);
u32
data
=
nvkm_rd32
(
device
,
0x009088
);
u32
data
=
nvkm_rd32
(
device
,
0x009088
);
nv
_error
(
bus
,
"MMIO %s of 0x%08x FAULT at 0x
%06x
\n
"
,
nv
km_error
(
subdev
,
"MMIO %s of %08x FAULT at
%06x
\n
"
,
(
addr
&
0x00000002
)
?
"write"
:
"read"
,
data
,
(
addr
&
0x00000002
)
?
"write"
:
"read"
,
data
,
(
addr
&
0x00fffffc
));
(
addr
&
0x00fffffc
));
stat
&=
~
0x00000008
;
stat
&=
~
0x00000008
;
nvkm_wr32
(
device
,
0x001100
,
0x00000008
);
nvkm_wr32
(
device
,
0x001100
,
0x00000008
);
}
}
if
(
stat
&
0x00010000
)
{
if
(
stat
&
0x00010000
)
{
s
ubdev
=
nvkm_subdev
(
bus
,
NVDEV_SUBDEV_THERM
)
;
s
truct
nvkm_therm
*
therm
=
device
->
therm
;
if
(
subdev
&&
subdev
->
intr
)
if
(
therm
&&
therm
->
subdev
.
intr
)
subdev
->
intr
(
subdev
);
therm
->
subdev
.
intr
(
&
therm
->
subdev
);
stat
&=
~
0x00010000
;
stat
&=
~
0x00010000
;
nvkm_wr32
(
device
,
0x001100
,
0x00010000
);
nvkm_wr32
(
device
,
0x001100
,
0x00010000
);
}
}
if
(
stat
)
{
if
(
stat
)
{
nv
_error
(
bus
,
"unknown intr 0x
%08x
\n
"
,
stat
);
nv
km_error
(
subdev
,
"intr
%08x
\n
"
,
stat
);
nvkm_mask
(
device
,
0x001140
,
stat
,
0
);
nvkm_mask
(
device
,
0x001140
,
stat
,
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