Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
419e8dc0
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
419e8dc0
编写于
11月 16, 2012
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nvd0/disp: implement sor support for older display classes
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
97b19b5c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
61 addition
and
45 deletion
+61
-45
drivers/gpu/drm/nouveau/nvd0_display.c
drivers/gpu/drm/nouveau/nvd0_display.c
+61
-45
未找到文件。
drivers/gpu/drm/nouveau/nvd0_display.c
浏览文件 @
419e8dc0
...
...
@@ -1529,26 +1529,33 @@ static void
nvd0_sor_disconnect
(
struct
drm_encoder
*
encoder
)
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
drm_device
*
dev
=
encoder
->
dev
;
struct
nvd0_mast
*
mast
=
nvd0_mast
(
encoder
->
dev
);
const
int
or
=
nv_encoder
->
or
;
u32
*
push
;
if
(
nv_encoder
->
crtc
)
{
nvd0_crtc_prepare
(
nv_encoder
->
crtc
);
push
=
evo_wait
(
nvd0_mast
(
dev
)
,
4
);
push
=
evo_wait
(
mast
,
4
);
if
(
push
)
{
evo_mthd
(
push
,
0x0200
+
(
nv_encoder
->
or
*
0x20
),
1
);
evo_data
(
push
,
0x00000000
);
if
(
nvd0_vers
(
mast
)
<
NVD0_DISP_MAST_CLASS
)
{
evo_mthd
(
push
,
0x0600
+
(
or
*
0x40
),
1
);
evo_data
(
push
,
0x00000000
);
}
else
{
evo_mthd
(
push
,
0x0200
+
(
or
*
0x20
),
1
);
evo_data
(
push
,
0x00000000
);
}
evo_mthd
(
push
,
0x0080
,
1
);
evo_data
(
push
,
0x00000000
);
evo_kick
(
push
,
nvd0_mast
(
dev
)
);
evo_kick
(
push
,
mast
);
}
nvd0_hdmi_disconnect
(
encoder
);
nv_encoder
->
crtc
=
NULL
;
nv_encoder
->
last_dpms
=
DRM_MODE_DPMS_OFF
;
}
nv_encoder
->
last_dpms
=
DRM_MODE_DPMS_OFF
;
nv_encoder
->
crtc
=
NULL
;
}
static
void
...
...
@@ -1569,84 +1576,76 @@ nvd0_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *umode,
struct
drm_display_mode
*
mode
)
{
struct
nvd0_disp
*
disp
=
nvd0_disp
(
encoder
->
dev
);
struct
nvd0_mast
*
mast
=
nvd0_mast
(
encoder
->
dev
);
struct
drm_device
*
dev
=
encoder
->
dev
;
struct
nouveau_drm
*
drm
=
nouveau_drm
(
dev
);
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
nouveau_crtc
*
nv_crtc
=
nouveau_crtc
(
encoder
->
crtc
);
struct
nouveau_connector
*
nv_connector
;
struct
nvbios
*
bios
=
&
drm
->
vbios
;
int
or
=
nv_encoder
->
or
;
u32
mode_ctrl
=
(
1
<<
nv_crtc
->
index
);
u32
syncs
,
magic
,
*
push
;
u32
or_config
;
syncs
=
0x00000001
;
if
(
mode
->
flags
&
DRM_MODE_FLAG_NHSYNC
)
syncs
|=
0x00000008
;
if
(
mode
->
flags
&
DRM_MODE_FLAG_NVSYNC
)
syncs
|=
0x00000010
;
magic
=
0x31ec6000
|
(
nv_crtc
->
index
<<
25
);
if
(
mode
->
flags
&
DRM_MODE_FLAG_INTERLACE
)
magic
|=
0x00000001
;
u32
*
push
,
lvds
=
0
;
u8
owner
=
1
<<
nv_crtc
->
index
;
u8
proto
=
0xf
;
u8
depth
=
0x0
;
nv_connector
=
nouveau_encoder_connector_get
(
nv_encoder
);
switch
(
nv_encoder
->
dcb
->
type
)
{
case
DCB_OUTPUT_TMDS
:
if
(
nv_encoder
->
dcb
->
sorconf
.
link
&
1
)
{
if
(
mode
->
clock
<
165000
)
mode_ctrl
|=
0x00000100
;
proto
=
0x1
;
else
mode_ctrl
|=
0x00000500
;
proto
=
0x5
;
}
else
{
mode_ctrl
|=
0x00000200
;
proto
=
0x2
;
}
nvd0_hdmi_mode_set
(
encoder
,
mode
);
break
;
case
DCB_OUTPUT_LVDS
:
or_config
=
(
mode_ctrl
&
0x00000f00
)
>>
8
;
proto
=
0x0
;
if
(
bios
->
fp_no_ddc
)
{
if
(
bios
->
fp
.
dual_link
)
or_config
|=
0x0100
;
lvds
|=
0x0100
;
if
(
bios
->
fp
.
if_is_24bit
)
or_config
|=
0x0200
;
lvds
|=
0x0200
;
}
else
{
if
(
nv_connector
->
type
==
DCB_CONNECTOR_LVDS_SPWG
)
{
if
(((
u8
*
)
nv_connector
->
edid
)[
121
]
==
2
)
or_config
|=
0x0100
;
lvds
|=
0x0100
;
}
else
if
(
mode
->
clock
>=
bios
->
fp
.
duallink_transition_clk
)
{
or_config
|=
0x0100
;
lvds
|=
0x0100
;
}
if
(
or_config
&
0x0100
)
{
if
(
lvds
&
0x0100
)
{
if
(
bios
->
fp
.
strapless_is_24bit
&
2
)
or_config
|=
0x0200
;
lvds
|=
0x0200
;
}
else
{
if
(
bios
->
fp
.
strapless_is_24bit
&
1
)
or_config
|=
0x0200
;
lvds
|=
0x0200
;
}
if
(
nv_connector
->
base
.
display_info
.
bpc
==
8
)
or_config
|=
0x0200
;
lvds
|=
0x0200
;
}
nv_call
(
disp
->
core
,
NV50_DISP_SOR_LVDS_SCRIPT
+
or
,
or_config
);
nv_call
(
disp
->
core
,
NV50_DISP_SOR_LVDS_SCRIPT
+
nv_encoder
->
or
,
lvds
);
break
;
case
DCB_OUTPUT_DP
:
if
(
nv_connector
->
base
.
display_info
.
bpc
==
6
)
{
nv_encoder
->
dp
.
datarate
=
mode
->
clock
*
18
/
8
;
syncs
|=
0x00000002
<<
6
;
depth
=
0x2
;
}
else
{
nv_encoder
->
dp
.
datarate
=
mode
->
clock
*
24
/
8
;
syncs
|=
0x00000005
<<
6
;
depth
=
0x5
;
}
if
(
nv_encoder
->
dcb
->
sorconf
.
link
&
1
)
mode_ctrl
|=
0x00000800
;
proto
=
0x8
;
else
mode_ctrl
|=
0x00000900
;
proto
=
0x9
;
break
;
default:
BUG_ON
(
1
);
...
...
@@ -1657,12 +1656,29 @@ nvd0_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *umode,
push
=
evo_wait
(
nvd0_mast
(
dev
),
8
);
if
(
push
)
{
evo_mthd
(
push
,
0x0404
+
(
nv_crtc
->
index
*
0x300
),
2
);
evo_data
(
push
,
syncs
);
evo_data
(
push
,
magic
);
evo_mthd
(
push
,
0x0200
+
(
nv_encoder
->
or
*
0x020
),
1
);
evo_data
(
push
,
mode_ctrl
);
evo_kick
(
push
,
nvd0_mast
(
dev
));
if
(
nvd0_vers
(
mast
)
<
NVD0_DISP_CLASS
)
{
evo_mthd
(
push
,
0x0600
+
(
nv_encoder
->
or
*
0x040
),
1
);
evo_data
(
push
,
(
depth
<<
16
)
|
(
proto
<<
8
)
|
owner
);
}
else
{
u32
magic
=
0x31ec6000
|
(
nv_crtc
->
index
<<
25
);
u32
syncs
=
0x00000001
;
if
(
mode
->
flags
&
DRM_MODE_FLAG_NHSYNC
)
syncs
|=
0x00000008
;
if
(
mode
->
flags
&
DRM_MODE_FLAG_NVSYNC
)
syncs
|=
0x00000010
;
if
(
mode
->
flags
&
DRM_MODE_FLAG_INTERLACE
)
magic
|=
0x00000001
;
evo_mthd
(
push
,
0x0404
+
(
nv_crtc
->
index
*
0x300
),
2
);
evo_data
(
push
,
syncs
|
(
depth
<<
6
));
evo_data
(
push
,
magic
);
evo_mthd
(
push
,
0x0200
+
(
nv_encoder
->
or
*
0x020
),
1
);
evo_data
(
push
,
owner
|
(
proto
<<
8
));
}
evo_kick
(
push
,
mast
);
}
nv_encoder
->
crtc
=
encoder
->
crtc
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录