Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
9430738d
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9430738d
编写于
10月 31, 2012
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau: resurrect headless mode since rework
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
5cad16ac
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
51 addition
and
35 deletion
+51
-35
drivers/gpu/drm/nouveau/nouveau_display.c
drivers/gpu/drm/nouveau/nouveau_display.c
+19
-15
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_drm.c
+21
-13
drivers/gpu/drm/nouveau/nouveau_drm.h
drivers/gpu/drm/nouveau/nouveau_drm.h
+2
-0
drivers/gpu/drm/nouveau/nouveau_irq.c
drivers/gpu/drm/nouveau/nouveau_irq.c
+9
-7
未找到文件。
drivers/gpu/drm/nouveau/nouveau_display.c
浏览文件 @
9430738d
...
...
@@ -360,23 +360,26 @@ nouveau_display_create(struct drm_device *dev)
drm_kms_helper_poll_init
(
dev
);
drm_kms_helper_poll_disable
(
dev
);
if
(
nv_device
(
drm
->
device
)
->
card_type
<
NV_50
)
ret
=
nv04_display_create
(
dev
);
else
if
(
nv_device
(
drm
->
device
)
->
card_type
<
NV_D0
)
ret
=
nv50_display_create
(
dev
);
else
ret
=
nvd0_display_create
(
dev
);
if
(
ret
)
goto
disp_create_err
;
if
(
dev
->
mode_config
.
num_crtc
)
{
ret
=
drm_vblank_init
(
dev
,
dev
->
mode_config
.
num_crtc
);
if
(
nouveau_modeset
==
1
)
{
if
(
nv_device
(
drm
->
device
)
->
card_type
<
NV_50
)
ret
=
nv04_display_create
(
dev
);
else
if
(
nv_device
(
drm
->
device
)
->
card_type
<
NV_D0
)
ret
=
nv50_display_create
(
dev
);
else
ret
=
nvd0_display_create
(
dev
);
if
(
ret
)
goto
vblank_err
;
goto
disp_create_err
;
if
(
dev
->
mode_config
.
num_crtc
)
{
ret
=
drm_vblank_init
(
dev
,
dev
->
mode_config
.
num_crtc
);
if
(
ret
)
goto
vblank_err
;
}
nouveau_backlight_init
(
dev
);
}
nouveau_backlight_init
(
dev
);
return
0
;
vblank_err:
...
...
@@ -395,7 +398,8 @@ nouveau_display_destroy(struct drm_device *dev)
nouveau_backlight_exit
(
dev
);
drm_vblank_cleanup
(
dev
);
disp
->
dtor
(
dev
);
if
(
disp
->
dtor
)
disp
->
dtor
(
dev
);
drm_kms_helper_poll_fini
(
dev
);
drm_mode_config_cleanup
(
dev
);
...
...
drivers/gpu/drm/nouveau/nouveau_drm.c
浏览文件 @
9430738d
...
...
@@ -63,8 +63,9 @@ MODULE_PARM_DESC(noaccel, "disable kernel/abi16 acceleration");
static
int
nouveau_noaccel
=
0
;
module_param_named
(
noaccel
,
nouveau_noaccel
,
int
,
0400
);
MODULE_PARM_DESC
(
modeset
,
"enable driver"
);
static
int
nouveau_modeset
=
-
1
;
MODULE_PARM_DESC
(
modeset
,
"enable driver (default: auto, "
"0 = disabled, 1 = enabled, 2 = headless)"
);
int
nouveau_modeset
=
-
1
;
module_param_named
(
modeset
,
nouveau_modeset
,
int
,
0400
);
static
struct
drm_driver
driver
;
...
...
@@ -363,7 +364,8 @@ nouveau_drm_unload(struct drm_device *dev)
nouveau_pm_fini
(
dev
);
nouveau_display_fini
(
dev
);
if
(
dev
->
mode_config
.
num_crtc
)
nouveau_display_fini
(
dev
);
nouveau_display_destroy
(
dev
);
nouveau_irq_fini
(
dev
);
...
...
@@ -403,13 +405,15 @@ nouveau_drm_suspend(struct pci_dev *pdev, pm_message_t pm_state)
pm_state
.
event
==
PM_EVENT_PRETHAW
)
return
0
;
NV_INFO
(
drm
,
"suspending fbcon...
\n
"
);
nouveau_fbcon_set_suspend
(
dev
,
1
);
if
(
dev
->
mode_config
.
num_crtc
)
{
NV_INFO
(
drm
,
"suspending fbcon...
\n
"
);
nouveau_fbcon_set_suspend
(
dev
,
1
);
NV_INFO
(
drm
,
"suspending display...
\n
"
);
ret
=
nouveau_display_suspend
(
dev
);
if
(
ret
)
return
ret
;
NV_INFO
(
drm
,
"suspending display...
\n
"
);
ret
=
nouveau_display_suspend
(
dev
);
if
(
ret
)
return
ret
;
}
NV_INFO
(
drm
,
"evicting buffers...
\n
"
);
ttm_bo_evict_mm
(
&
drm
->
ttm
.
bdev
,
TTM_PL_VRAM
);
...
...
@@ -445,8 +449,10 @@ nouveau_drm_suspend(struct pci_dev *pdev, pm_message_t pm_state)
nouveau_client_init
(
&
cli
->
base
);
}
NV_INFO
(
drm
,
"resuming display...
\n
"
);
nouveau_display_resume
(
dev
);
if
(
dev
->
mode_config
.
num_crtc
)
{
NV_INFO
(
drm
,
"resuming display...
\n
"
);
nouveau_display_resume
(
dev
);
}
return
ret
;
}
...
...
@@ -486,8 +492,10 @@ nouveau_drm_resume(struct pci_dev *pdev)
nouveau_irq_postinstall
(
dev
);
nouveau_pm_resume
(
dev
);
NV_INFO
(
drm
,
"resuming display...
\n
"
);
nouveau_display_resume
(
dev
);
if
(
dev
->
mode_config
.
num_crtc
)
{
NV_INFO
(
drm
,
"resuming display...
\n
"
);
nouveau_display_resume
(
dev
);
}
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nouveau_drm.h
浏览文件 @
9430738d
...
...
@@ -141,4 +141,6 @@ int nouveau_drm_resume(struct pci_dev *);
nv_info((cli), fmt, ##args); \
} while (0)
extern
int
nouveau_modeset
;
#endif
drivers/gpu/drm/nouveau/nouveau_irq.c
浏览文件 @
9430738d
...
...
@@ -61,13 +61,15 @@ nouveau_irq_handler(DRM_IRQ_ARGS)
nv_subdev
(
pmc
)
->
intr
(
nv_subdev
(
pmc
));
if
(
device
->
card_type
>=
NV_D0
)
{
if
(
nv_rd32
(
device
,
0x000100
)
&
0x04000000
)
nvd0_display_intr
(
dev
);
}
else
if
(
device
->
card_type
>=
NV_50
)
{
if
(
nv_rd32
(
device
,
0x000100
)
&
0x04000000
)
nv50_display_intr
(
dev
);
if
(
dev
->
mode_config
.
num_crtc
)
{
if
(
device
->
card_type
>=
NV_D0
)
{
if
(
nv_rd32
(
device
,
0x000100
)
&
0x04000000
)
nvd0_display_intr
(
dev
);
}
else
if
(
device
->
card_type
>=
NV_50
)
{
if
(
nv_rd32
(
device
,
0x000100
)
&
0x04000000
)
nv50_display_intr
(
dev
);
}
}
return
IRQ_HANDLED
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录