Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8687c5d7
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8687c5d7
编写于
3月 19, 2014
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nva3/devinit: restrict script access to some PFB regs
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
3219adc2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
51 addition
and
0 deletion
+51
-0
drivers/gpu/drm/nouveau/core/subdev/devinit/nv50.h
drivers/gpu/drm/nouveau/core/subdev/devinit/nv50.h
+1
-0
drivers/gpu/drm/nouveau/core/subdev/devinit/nva3.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nva3.c
+50
-0
未找到文件。
drivers/gpu/drm/nouveau/core/subdev/devinit/nv50.h
浏览文件 @
8687c5d7
...
...
@@ -5,6 +5,7 @@
struct
nv50_devinit_priv
{
struct
nouveau_devinit
base
;
u32
r001540
;
};
int
nv50_devinit_ctor
(
struct
nouveau_object
*
,
struct
nouveau_object
*
,
...
...
drivers/gpu/drm/nouveau/core/subdev/devinit/nva3.c
浏览文件 @
8687c5d7
...
...
@@ -81,6 +81,55 @@ nva3_devinit_disable(struct nouveau_devinit *devinit)
return
disable
;
}
static
u32
nva3_devinit_mmio_part
[]
=
{
0x100720
,
0x1008bc
,
4
,
0x100a20
,
0x100adc
,
4
,
0x100d80
,
0x100ddc
,
4
,
0x110000
,
0x110f9c
,
4
,
0x111000
,
0x11103c
,
8
,
0x111080
,
0x1110fc
,
4
,
0x111120
,
0x1111fc
,
4
,
0x111300
,
0x1114bc
,
4
,
0
,
};
static
u32
nva3_devinit_mmio
(
struct
nouveau_devinit
*
devinit
,
u32
addr
)
{
struct
nv50_devinit_priv
*
priv
=
(
void
*
)
devinit
;
u32
*
mmio
=
nva3_devinit_mmio_part
;
/* the init tables on some boards have INIT_RAM_RESTRICT_ZM_REG_GROUP
* instructions which touch registers that may not even exist on
* some configurations (Quadro 400), which causes the register
* interface to screw up for some amount of time after attempting to
* write to one of these, and results in all sorts of things going
* horribly wrong.
*
* the binary driver avoids touching these registers at all, however,
* the video bios doesn't care and does what the scripts say. it's
* presumed that the io-port access to priv registers isn't effected
* by the screw-up bug mentioned above.
*
* really, a new opcode should've been invented to handle these
* requirements, but whatever, it's too late for that now.
*/
while
(
mmio
[
0
])
{
if
(
addr
>=
mmio
[
0
]
&&
addr
<=
mmio
[
1
])
{
u32
part
=
(
addr
/
mmio
[
2
])
&
7
;
if
(
!
priv
->
r001540
)
priv
->
r001540
=
nv_rd32
(
priv
,
0x001540
);
if
(
part
>=
hweight8
((
priv
->
r001540
>>
16
)
&
0xff
))
return
~
0
;
return
addr
;
}
mmio
+=
3
;
}
return
addr
;
}
struct
nouveau_oclass
*
nva3_devinit_oclass
=
&
(
struct
nouveau_devinit_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
DEVINIT
,
0xa3
),
...
...
@@ -92,4 +141,5 @@ nva3_devinit_oclass = &(struct nouveau_devinit_impl) {
},
.
pll_set
=
nva3_devinit_pll_set
,
.
disable
=
nva3_devinit_disable
,
.
mmio
=
nva3_devinit_mmio
,
}.
base
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录