Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
02e4f587
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
02e4f587
编写于
7月 06, 2011
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/bios: allow passing in crtc to the init table parser
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
4784e4aa
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
41 addition
and
36 deletion
+41
-36
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bios.c
+27
-22
drivers/gpu/drm/nouveau/nouveau_bios.h
drivers/gpu/drm/nouveau/nouveau_bios.h
+1
-0
drivers/gpu/drm/nouveau/nouveau_dp.c
drivers/gpu/drm/nouveau/nouveau_dp.c
+2
-2
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+3
-4
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/nouveau/nv50_display.c
+4
-4
drivers/gpu/drm/nouveau/nv50_pm.c
drivers/gpu/drm/nouveau/nv50_pm.c
+4
-4
未找到文件。
drivers/gpu/drm/nouveau/nouveau_bios.c
浏览文件 @
02e4f587
...
...
@@ -296,6 +296,11 @@ munge_reg(struct nvbios *bios, uint32_t reg)
if
(
dev_priv
->
card_type
<
NV_50
)
return
reg
;
if
(
reg
&
0x80000000
)
{
BUG_ON
(
bios
->
display
.
crtc
<
0
);
reg
+=
bios
->
display
.
crtc
*
0x800
;
}
if
(
reg
&
0x40000000
)
{
BUG_ON
(
!
dcbent
);
...
...
@@ -304,7 +309,7 @@ munge_reg(struct nvbios *bios, uint32_t reg)
reg
+=
0x00000080
;
}
reg
&=
~
0x
6
0000000
;
reg
&=
~
0x
e
0000000
;
return
reg
;
}
...
...
@@ -4496,8 +4501,8 @@ nouveau_bios_dp_table(struct drm_device *dev, struct dcb_entry *dcbent,
}
int
nouveau_bios_run_display_table
(
struct
drm_device
*
dev
,
struct
dcb_entry
*
dcbent
,
uint32_t
sub
,
int
pxclk
)
nouveau_bios_run_display_table
(
struct
drm_device
*
dev
,
u16
type
,
int
pclk
,
struct
dcb_entry
*
dcbent
,
int
crtc
)
{
/*
* The display script table is located by the BIT 'U' table.
...
...
@@ -4587,22 +4592,22 @@ nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent,
return
1
;
}
if
(
p
xclk
<
-
2
||
px
clk
>
0
)
{
if
(
p
clk
<
-
2
||
p
clk
>
0
)
{
/* Try to find matching script table entry */
for
(
i
=
0
;
i
<
otable
[
5
];
i
++
)
{
if
(
ROM16
(
otable
[
table
[
4
]
+
i
*
6
])
==
sub
)
if
(
ROM16
(
otable
[
table
[
4
]
+
i
*
6
])
==
type
)
break
;
}
if
(
i
==
otable
[
5
])
{
NV_ERROR
(
dev
,
"Table 0x%04x not found for %d/%d, "
"using first
\n
"
,
sub
,
dcbent
->
type
,
dcbent
->
or
);
type
,
dcbent
->
type
,
dcbent
->
or
);
i
=
0
;
}
}
if
(
p
x
clk
==
0
)
{
if
(
pclk
==
0
)
{
script
=
ROM16
(
otable
[
6
]);
if
(
!
script
)
{
NV_DEBUG_KMS
(
dev
,
"output script 0 not found
\n
"
);
...
...
@@ -4610,9 +4615,9 @@ nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent,
}
NV_DEBUG_KMS
(
dev
,
"0x%04X: parsing output script 0
\n
"
,
script
);
nouveau_bios_run_init_table
(
dev
,
script
,
dcbent
);
nouveau_bios_run_init_table
(
dev
,
script
,
dcbent
,
crtc
);
}
else
if
(
p
x
clk
==
-
1
)
{
if
(
pclk
==
-
1
)
{
script
=
ROM16
(
otable
[
8
]);
if
(
!
script
)
{
NV_DEBUG_KMS
(
dev
,
"output script 1 not found
\n
"
);
...
...
@@ -4620,9 +4625,9 @@ nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent,
}
NV_DEBUG_KMS
(
dev
,
"0x%04X: parsing output script 1
\n
"
,
script
);
nouveau_bios_run_init_table
(
dev
,
script
,
dcbent
);
nouveau_bios_run_init_table
(
dev
,
script
,
dcbent
,
crtc
);
}
else
if
(
p
x
clk
==
-
2
)
{
if
(
pclk
==
-
2
)
{
if
(
table
[
4
]
>=
12
)
script
=
ROM16
(
otable
[
10
]);
else
...
...
@@ -4633,31 +4638,31 @@ nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent,
}
NV_DEBUG_KMS
(
dev
,
"0x%04X: parsing output script 2
\n
"
,
script
);
nouveau_bios_run_init_table
(
dev
,
script
,
dcbent
);
nouveau_bios_run_init_table
(
dev
,
script
,
dcbent
,
crtc
);
}
else
if
(
p
x
clk
>
0
)
{
if
(
pclk
>
0
)
{
script
=
ROM16
(
otable
[
table
[
4
]
+
i
*
6
+
2
]);
if
(
script
)
script
=
clkcmptable
(
bios
,
script
,
p
x
clk
);
script
=
clkcmptable
(
bios
,
script
,
pclk
);
if
(
!
script
)
{
NV_DEBUG_KMS
(
dev
,
"clock script 0 not found
\n
"
);
return
1
;
}
NV_DEBUG_KMS
(
dev
,
"0x%04X: parsing clock script 0
\n
"
,
script
);
nouveau_bios_run_init_table
(
dev
,
script
,
dcbent
);
nouveau_bios_run_init_table
(
dev
,
script
,
dcbent
,
crtc
);
}
else
if
(
p
x
clk
<
0
)
{
if
(
pclk
<
0
)
{
script
=
ROM16
(
otable
[
table
[
4
]
+
i
*
6
+
4
]);
if
(
script
)
script
=
clkcmptable
(
bios
,
script
,
-
p
x
clk
);
script
=
clkcmptable
(
bios
,
script
,
-
pclk
);
if
(
!
script
)
{
NV_DEBUG_KMS
(
dev
,
"clock script 1 not found
\n
"
);
return
1
;
}
NV_DEBUG_KMS
(
dev
,
"0x%04X: parsing clock script 1
\n
"
,
script
);
nouveau_bios_run_init_table
(
dev
,
script
,
dcbent
);
nouveau_bios_run_init_table
(
dev
,
script
,
dcbent
,
crtc
);
}
return
0
;
...
...
@@ -6804,7 +6809,7 @@ uint8_t *nouveau_bios_embedded_edid(struct drm_device *dev)
void
nouveau_bios_run_init_table
(
struct
drm_device
*
dev
,
uint16_t
table
,
struct
dcb_entry
*
dcbent
)
struct
dcb_entry
*
dcbent
,
int
crtc
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nvbios
*
bios
=
&
dev_priv
->
vbios
;
...
...
@@ -6812,6 +6817,7 @@ nouveau_bios_run_init_table(struct drm_device *dev, uint16_t table,
spin_lock_bh
(
&
bios
->
lock
);
bios
->
display
.
output
=
dcbent
;
bios
->
display
.
crtc
=
crtc
;
parse_init_table
(
bios
,
table
,
&
iexec
);
bios
->
display
.
output
=
NULL
;
spin_unlock_bh
(
&
bios
->
lock
);
...
...
@@ -6898,9 +6904,8 @@ nouveau_run_vbios_init(struct drm_device *dev)
if
(
dev_priv
->
card_type
>=
NV_50
)
{
for
(
i
=
0
;
i
<
bios
->
dcb
.
entries
;
i
++
)
{
nouveau_bios_run_display_table
(
dev
,
&
bios
->
dcb
.
entry
[
i
],
0
,
0
);
nouveau_bios_run_display_table
(
dev
,
0
,
0
,
&
bios
->
dcb
.
entry
[
i
],
-
1
);
}
}
...
...
drivers/gpu/drm/nouveau/nouveau_bios.h
浏览文件 @
02e4f587
...
...
@@ -289,6 +289,7 @@ struct nvbios {
struct
{
struct
dcb_entry
*
output
;
int
crtc
;
uint16_t
script_table_ptr
;
uint16_t
dp_table_ptr
;
}
display
;
...
...
drivers/gpu/drm/nouveau/nouveau_dp.c
浏览文件 @
02e4f587
...
...
@@ -300,7 +300,7 @@ nouveau_dp_link_train(struct drm_encoder *encoder)
if
(
dpe
->
script0
)
{
NV_DEBUG_KMS
(
dev
,
"SOR-%d: running DP script 0
\n
"
,
nv_encoder
->
or
);
nouveau_bios_run_init_table
(
dev
,
le16_to_cpu
(
dpe
->
script0
),
nv_encoder
->
dcb
);
nv_encoder
->
dcb
,
-
1
);
}
train:
...
...
@@ -433,7 +433,7 @@ nouveau_dp_link_train(struct drm_encoder *encoder)
if
(
dpe
->
script1
)
{
NV_DEBUG_KMS
(
dev
,
"SOR-%d: running DP script 1
\n
"
,
nv_encoder
->
or
);
nouveau_bios_run_init_table
(
dev
,
le16_to_cpu
(
dpe
->
script1
),
nv_encoder
->
dcb
);
nv_encoder
->
dcb
,
-
1
);
}
/* re-enable hotplug detect */
...
...
drivers/gpu/drm/nouveau/nouveau_drv.h
浏览文件 @
02e4f587
...
...
@@ -1039,7 +1039,7 @@ extern int nouveau_bios_init(struct drm_device *);
extern
void
nouveau_bios_takedown
(
struct
drm_device
*
dev
);
extern
int
nouveau_run_vbios_init
(
struct
drm_device
*
);
extern
void
nouveau_bios_run_init_table
(
struct
drm_device
*
,
uint16_t
table
,
struct
dcb_entry
*
);
struct
dcb_entry
*
,
int
crtc
);
extern
struct
dcb_gpio_entry
*
nouveau_bios_gpio_entry
(
struct
drm_device
*
,
enum
dcb_gpio_tag
);
extern
struct
dcb_connector_table_entry
*
...
...
@@ -1047,9 +1047,8 @@ nouveau_bios_connector_entry(struct drm_device *, int index);
extern
u32
get_pll_register
(
struct
drm_device
*
,
enum
pll_types
);
extern
int
get_pll_limits
(
struct
drm_device
*
,
uint32_t
limit_match
,
struct
pll_lims
*
);
extern
int
nouveau_bios_run_display_table
(
struct
drm_device
*
,
struct
dcb_entry
*
,
uint32_t
script
,
int
pxclk
);
extern
int
nouveau_bios_run_display_table
(
struct
drm_device
*
,
u16
id
,
int
clk
,
struct
dcb_entry
*
,
int
crtc
);
extern
void
*
nouveau_bios_dp_table
(
struct
drm_device
*
,
struct
dcb_entry
*
,
int
*
length
);
extern
bool
nouveau_bios_fp_mode
(
struct
drm_device
*
,
struct
drm_display_mode
*
);
...
...
drivers/gpu/drm/nouveau/nv50_display.c
浏览文件 @
02e4f587
...
...
@@ -689,7 +689,7 @@ nv50_display_unk10_handler(struct drm_device *dev)
struct
dcb_entry
*
dcb
=
&
dev_priv
->
vbios
.
dcb
.
entry
[
i
];
if
(
dcb
->
type
==
type
&&
(
dcb
->
or
&
(
1
<<
or
)))
{
nouveau_bios_run_display_table
(
dev
,
dcb
,
0
,
-
1
);
nouveau_bios_run_display_table
(
dev
,
0
,
-
1
,
dcb
,
-
1
);
disp
->
irq
.
dcb
=
dcb
;
goto
ack
;
}
...
...
@@ -744,7 +744,7 @@ nv50_display_unk20_handler(struct drm_device *dev)
NV_DEBUG_KMS
(
dev
,
"0x610030: 0x%08x
\n
"
,
unk30
);
dcb
=
disp
->
irq
.
dcb
;
if
(
dcb
)
{
nouveau_bios_run_display_table
(
dev
,
dcb
,
0
,
-
2
);
nouveau_bios_run_display_table
(
dev
,
0
,
-
2
,
dcb
,
-
1
);
disp
->
irq
.
dcb
=
NULL
;
}
...
...
@@ -828,7 +828,7 @@ nv50_display_unk20_handler(struct drm_device *dev)
}
script
=
nv50_display_script_select
(
dev
,
dcb
,
mc
,
pclk
);
nouveau_bios_run_display_table
(
dev
,
dcb
,
script
,
pclk
);
nouveau_bios_run_display_table
(
dev
,
script
,
pclk
,
dcb
,
-
1
);
nv50_display_unk20_dp_hack
(
dev
,
dcb
);
...
...
@@ -895,7 +895,7 @@ nv50_display_unk40_handler(struct drm_device *dev)
if
(
!
dcb
)
goto
ack
;
nouveau_bios_run_display_table
(
dev
,
dcb
,
script
,
-
pclk
);
nouveau_bios_run_display_table
(
dev
,
script
,
-
pclk
,
dcb
,
-
1
);
nv50_display_unk40_dp_set_tmds
(
dev
,
dcb
);
ack:
...
...
drivers/gpu/drm/nouveau/nv50_pm.c
浏览文件 @
02e4f587
...
...
@@ -115,15 +115,15 @@ nv50_pm_clock_set(struct drm_device *dev, void *pre_state)
BIT_M
.
version
==
1
&&
BIT_M
.
length
>=
0x0b
)
{
script
=
ROM16
(
BIT_M
.
data
[
0x05
]);
if
(
script
)
nouveau_bios_run_init_table
(
dev
,
script
,
NULL
);
nouveau_bios_run_init_table
(
dev
,
script
,
NULL
,
-
1
);
script
=
ROM16
(
BIT_M
.
data
[
0x07
]);
if
(
script
)
nouveau_bios_run_init_table
(
dev
,
script
,
NULL
);
nouveau_bios_run_init_table
(
dev
,
script
,
NULL
,
-
1
);
script
=
ROM16
(
BIT_M
.
data
[
0x09
]);
if
(
script
)
nouveau_bios_run_init_table
(
dev
,
script
,
NULL
);
nouveau_bios_run_init_table
(
dev
,
script
,
NULL
,
-
1
);
nouveau_bios_run_init_table
(
dev
,
perflvl
->
memscript
,
NULL
);
nouveau_bios_run_init_table
(
dev
,
perflvl
->
memscript
,
NULL
,
-
1
);
}
if
(
state
->
type
==
PLL_MEMORY
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录