Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
a699a85a
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
a699a85a
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/bus: switch to subdev printk macros
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
60b29d20
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
49 addition
and
45 deletion
+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
未找到文件。
drivers/gpu/drm/nouveau/nvkm/subdev/bus/gf100.c
浏览文件 @
a699a85a
...
...
@@ -27,20 +27,20 @@
static
void
gf100_bus_intr
(
struct
nvkm_subdev
*
subdev
)
{
struct
nvkm_bus
*
bus
=
nvkm_bus
(
subdev
);
struct
nvkm_device
*
device
=
bus
->
subdev
.
device
;
struct
nvkm_device
*
device
=
subdev
->
device
;
u32
stat
=
nvkm_rd32
(
device
,
0x001100
)
&
nvkm_rd32
(
device
,
0x001140
);
if
(
stat
&
0x0000000e
)
{
u32
addr
=
nvkm_rd32
(
device
,
0x009084
);
u32
data
=
nvkm_rd32
(
device
,
0x009088
);
nv_error
(
bus
,
"MMIO %s of 0x%08x FAULT at 0x%06x [ %s%s%s]
\n
"
,
(
addr
&
0x00000002
)
?
"write"
:
"read"
,
data
,
(
addr
&
0x00fffffc
),
(
stat
&
0x00000002
)
?
"!ENGINE "
:
""
,
(
stat
&
0x00000004
)
?
"IBUS "
:
""
,
(
stat
&
0x00000008
)
?
"TIMEOUT "
:
""
);
nvkm_error
(
subdev
,
"MMIO %s of %08x FAULT at %06x [ %s%s%s]
\n
"
,
(
addr
&
0x00000002
)
?
"write"
:
"read"
,
data
,
(
addr
&
0x00fffffc
),
(
stat
&
0x00000002
)
?
"!ENGINE "
:
""
,
(
stat
&
0x00000004
)
?
"IBUS "
:
""
,
(
stat
&
0x00000008
)
?
"TIMEOUT "
:
""
);
nvkm_wr32
(
device
,
0x009084
,
0x00000000
);
nvkm_wr32
(
device
,
0x001100
,
(
stat
&
0x0000000e
));
...
...
@@ -48,7 +48,7 @@ gf100_bus_intr(struct nvkm_subdev *subdev)
}
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
);
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bus/hwsq.c
浏览文件 @
a699a85a
...
...
@@ -64,20 +64,21 @@ nvkm_hwsq_fini(struct nvkm_hwsq **phwsq, bool exec)
int
ret
=
0
,
i
;
if
(
hwsq
)
{
struct
nvkm_bus
*
bus
=
hwsq
->
bus
;
struct
nvkm_subdev
*
subdev
=
&
bus
->
subdev
;
hwsq
->
c
.
size
=
(
hwsq
->
c
.
size
+
4
)
/
4
;
if
(
hwsq
->
c
.
size
<=
bus
->
hwsq_size
)
{
if
(
exec
)
ret
=
bus
->
hwsq_exec
(
bus
,
(
u32
*
)
hwsq
->
c
.
data
,
hwsq
->
c
.
size
);
hwsq
->
c
.
size
);
if
(
ret
)
nv
_error
(
bus
,
"hwsq exec failed: %d
\n
"
,
ret
);
nv
km_error
(
subdev
,
"hwsq exec failed: %d
\n
"
,
ret
);
}
else
{
nv
_error
(
bus
,
"hwsq ucode too large
\n
"
);
nv
km_error
(
subdev
,
"hwsq ucode too large
\n
"
);
ret
=
-
ENOSPC
;
}
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
;
kfree
(
hwsq
);
...
...
@@ -88,7 +89,7 @@ nvkm_hwsq_fini(struct nvkm_hwsq **phwsq, bool exec)
void
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
((
data
&
0xffff0000
)
!=
(
hwsq
->
data
&
0xffff0000
))
{
...
...
@@ -113,7 +114,7 @@ nvkm_hwsq_wr32(struct nvkm_hwsq *hwsq, u32 addr, u32 data)
void
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
;
if
(
data
>=
0
)
flag
+=
0x20
;
...
...
@@ -125,7 +126,7 @@ nvkm_hwsq_setf(struct nvkm_hwsq *hwsq, u8 flag, int data)
void
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
});
}
...
...
@@ -138,6 +139,6 @@ nvkm_hwsq_nsec(struct nvkm_hwsq *hwsq, u32 nsec)
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
});
}
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv04.c
浏览文件 @
a699a85a
...
...
@@ -24,29 +24,30 @@
*/
#include "nv04.h"
#include <subdev/gpio.h>
static
void
nv04_bus_intr
(
struct
nvkm_subdev
*
subdev
)
{
struct
nvkm_bus
*
bus
=
nvkm_bus
(
subdev
);
struct
nvkm_device
*
device
=
bus
->
subdev
.
device
;
struct
nvkm_device
*
device
=
subdev
->
device
;
u32
stat
=
nvkm_rd32
(
device
,
0x001100
)
&
nvkm_rd32
(
device
,
0x001140
);
if
(
stat
&
0x00000001
)
{
nv
_error
(
bus
,
"BUS ERROR
\n
"
);
nv
km_error
(
subdev
,
"BUS ERROR
\n
"
);
stat
&=
~
0x00000001
;
nvkm_wr32
(
device
,
0x001100
,
0x00000001
);
}
if
(
stat
&
0x00000110
)
{
s
ubdev
=
nvkm_subdev
(
subdev
,
NVDEV_SUBDEV_GPIO
)
;
if
(
subdev
&&
subdev
->
intr
)
subdev
->
intr
(
subdev
);
s
truct
nvkm_gpio
*
gpio
=
device
->
gpio
;
if
(
gpio
&&
gpio
->
subdev
.
intr
)
gpio
->
subdev
.
intr
(
&
gpio
->
subdev
);
stat
&=
~
0x00000110
;
nvkm_wr32
(
device
,
0x001100
,
0x00000110
);
}
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
);
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv31.c
浏览文件 @
a699a85a
...
...
@@ -24,42 +24,44 @@
*/
#include "nv04.h"
#include <subdev/gpio.h>
#include <subdev/therm.h>
static
void
nv31_bus_intr
(
struct
nvkm_subdev
*
subdev
)
{
struct
nvkm_bus
*
bus
=
nvkm_bus
(
subdev
);
struct
nvkm_device
*
device
=
bus
->
subdev
.
device
;
struct
nvkm_device
*
device
=
subdev
->
device
;
u32
stat
=
nvkm_rd32
(
device
,
0x001100
)
&
nvkm_rd32
(
device
,
0x001140
);
u32
gpio
=
nvkm_rd32
(
device
,
0x001104
)
&
nvkm_rd32
(
device
,
0x001144
);
if
(
gpio
)
{
s
ubdev
=
nvkm_subdev
(
bus
,
NVDEV_SUBDEV_GPIO
)
;
if
(
subdev
&&
subdev
->
intr
)
subdev
->
intr
(
subdev
);
s
truct
nvkm_gpio
*
gpio
=
device
->
gpio
;
if
(
gpio
&&
gpio
->
subdev
.
intr
)
gpio
->
subdev
.
intr
(
&
gpio
->
subdev
);
}
if
(
stat
&
0x00000008
)
{
/* NV41- */
u32
addr
=
nvkm_rd32
(
device
,
0x009084
);
u32
data
=
nvkm_rd32
(
device
,
0x009088
);
nv
_error
(
bus
,
"MMIO %s of 0x%08x FAULT at 0x
%06x
\n
"
,
(
addr
&
0x00000002
)
?
"write"
:
"read"
,
data
,
(
addr
&
0x00fffffc
));
nv
km_error
(
subdev
,
"MMIO %s of %08x FAULT at
%06x
\n
"
,
(
addr
&
0x00000002
)
?
"write"
:
"read"
,
data
,
(
addr
&
0x00fffffc
));
stat
&=
~
0x00000008
;
nvkm_wr32
(
device
,
0x001100
,
0x00000008
);
}
if
(
stat
&
0x00070000
)
{
s
ubdev
=
nvkm_subdev
(
bus
,
NVDEV_SUBDEV_THERM
)
;
if
(
subdev
&&
subdev
->
intr
)
subdev
->
intr
(
subdev
);
s
truct
nvkm_therm
*
therm
=
device
->
therm
;
if
(
therm
&&
therm
->
subdev
.
intr
)
therm
->
subdev
.
intr
(
&
therm
->
subdev
);
stat
&=
~
0x00070000
;
nvkm_wr32
(
device
,
0x001100
,
0x00070000
);
}
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
);
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c
浏览文件 @
a699a85a
...
...
@@ -24,6 +24,7 @@
*/
#include "nv04.h"
#include <subdev/therm.h>
#include <subdev/timer.h>
static
int
...
...
@@ -51,32 +52,31 @@ nv50_bus_hwsq_exec(struct nvkm_bus *bus, u32 *data, u32 size)
void
nv50_bus_intr
(
struct
nvkm_subdev
*
subdev
)
{
struct
nvkm_bus
*
bus
=
nvkm_bus
(
subdev
);
struct
nvkm_device
*
device
=
bus
->
subdev
.
device
;
struct
nvkm_device
*
device
=
subdev
->
device
;
u32
stat
=
nvkm_rd32
(
device
,
0x001100
)
&
nvkm_rd32
(
device
,
0x001140
);
if
(
stat
&
0x00000008
)
{
u32
addr
=
nvkm_rd32
(
device
,
0x009084
);
u32
data
=
nvkm_rd32
(
device
,
0x009088
);
nv
_error
(
bus
,
"MMIO %s of 0x%08x FAULT at 0x
%06x
\n
"
,
(
addr
&
0x00000002
)
?
"write"
:
"read"
,
data
,
(
addr
&
0x00fffffc
));
nv
km_error
(
subdev
,
"MMIO %s of %08x FAULT at
%06x
\n
"
,
(
addr
&
0x00000002
)
?
"write"
:
"read"
,
data
,
(
addr
&
0x00fffffc
));
stat
&=
~
0x00000008
;
nvkm_wr32
(
device
,
0x001100
,
0x00000008
);
}
if
(
stat
&
0x00010000
)
{
s
ubdev
=
nvkm_subdev
(
bus
,
NVDEV_SUBDEV_THERM
)
;
if
(
subdev
&&
subdev
->
intr
)
subdev
->
intr
(
subdev
);
s
truct
nvkm_therm
*
therm
=
device
->
therm
;
if
(
therm
&&
therm
->
subdev
.
intr
)
therm
->
subdev
.
intr
(
&
therm
->
subdev
);
stat
&=
~
0x00010000
;
nvkm_wr32
(
device
,
0x001100
,
0x00010000
);
}
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
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录