Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
2a44e499
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,发现更多精彩内容 >>
提交
2a44e499
编写于
11月 09, 2011
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/disp: introduce proper init/fini, separate from create/destroy
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
d2edab4a
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
39 addition
and
31 deletion
+39
-31
drivers/gpu/drm/nouveau/nouveau_display.c
drivers/gpu/drm/nouveau/nouveau_display.c
+5
-1
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+6
-3
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nouveau_state.c
+16
-8
drivers/gpu/drm/nouveau/nv04_display.c
drivers/gpu/drm/nouveau/nv04_display.c
+5
-0
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/nouveau/nv50_display.c
+5
-12
drivers/gpu/drm/nouveau/nv50_display.h
drivers/gpu/drm/nouveau/nv50_display.h
+1
-0
drivers/gpu/drm/nouveau/nvd0_display.c
drivers/gpu/drm/nouveau/nvd0_display.c
+1
-7
未找到文件。
drivers/gpu/drm/nouveau/nouveau_display.c
浏览文件 @
2a44e499
...
...
@@ -262,7 +262,10 @@ nouveau_display_create(struct drm_device *dev)
if
(
ret
)
return
ret
;
return
0
;
ret
=
disp
->
init
(
dev
);
if
(
ret
)
disp
->
destroy
(
dev
);
return
ret
;
}
void
...
...
@@ -271,6 +274,7 @@ nouveau_display_destroy(struct drm_device *dev)
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_display_engine
*
disp
=
&
dev_priv
->
engine
.
display
;
disp
->
fini
(
dev
);
disp
->
destroy
(
dev
);
drm_mode_config_cleanup
(
dev
);
}
...
...
drivers/gpu/drm/nouveau/nouveau_drv.h
浏览文件 @
2a44e499
...
...
@@ -396,8 +396,9 @@ struct nouveau_display_engine {
int
(
*
early_init
)(
struct
drm_device
*
);
void
(
*
late_takedown
)(
struct
drm_device
*
);
int
(
*
create
)(
struct
drm_device
*
);
int
(
*
init
)(
struct
drm_device
*
);
void
(
*
destroy
)(
struct
drm_device
*
);
int
(
*
init
)(
struct
drm_device
*
);
void
(
*
fini
)(
struct
drm_device
*
);
struct
drm_property
*
dithering_mode
;
struct
drm_property
*
dithering_depth
;
...
...
@@ -1343,13 +1344,15 @@ extern int nv17_tv_create(struct drm_connector *, struct dcb_entry *);
extern
int
nv04_display_early_init
(
struct
drm_device
*
);
extern
void
nv04_display_late_takedown
(
struct
drm_device
*
);
extern
int
nv04_display_create
(
struct
drm_device
*
);
extern
int
nv04_display_init
(
struct
drm_device
*
);
extern
void
nv04_display_destroy
(
struct
drm_device
*
);
extern
int
nv04_display_init
(
struct
drm_device
*
);
extern
void
nv04_display_fini
(
struct
drm_device
*
);
/* nvd0_display.c */
extern
int
nvd0_display_create
(
struct
drm_device
*
);
extern
int
nvd0_display_init
(
struct
drm_device
*
);
extern
void
nvd0_display_destroy
(
struct
drm_device
*
);
extern
int
nvd0_display_init
(
struct
drm_device
*
);
extern
void
nvd0_display_fini
(
struct
drm_device
*
);
/* nv04_crtc.c */
extern
int
nv04_crtc_create
(
struct
drm_device
*
,
int
index
);
...
...
drivers/gpu/drm/nouveau/nouveau_state.c
浏览文件 @
2a44e499
...
...
@@ -80,8 +80,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
display
.
early_init
=
nv04_display_early_init
;
engine
->
display
.
late_takedown
=
nv04_display_late_takedown
;
engine
->
display
.
create
=
nv04_display_create
;
engine
->
display
.
init
=
nv04_display_init
;
engine
->
display
.
destroy
=
nv04_display_destroy
;
engine
->
display
.
init
=
nv04_display_init
;
engine
->
display
.
fini
=
nv04_display_fini
;
engine
->
gpio
.
init
=
nouveau_stub_init
;
engine
->
gpio
.
takedown
=
nouveau_stub_takedown
;
engine
->
gpio
.
get
=
NULL
;
...
...
@@ -129,8 +130,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
display
.
early_init
=
nv04_display_early_init
;
engine
->
display
.
late_takedown
=
nv04_display_late_takedown
;
engine
->
display
.
create
=
nv04_display_create
;
engine
->
display
.
init
=
nv04_display_init
;
engine
->
display
.
destroy
=
nv04_display_destroy
;
engine
->
display
.
init
=
nv04_display_init
;
engine
->
display
.
fini
=
nv04_display_fini
;
engine
->
gpio
.
init
=
nouveau_stub_init
;
engine
->
gpio
.
takedown
=
nouveau_stub_takedown
;
engine
->
gpio
.
get
=
nv10_gpio_get
;
...
...
@@ -178,8 +180,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
display
.
early_init
=
nv04_display_early_init
;
engine
->
display
.
late_takedown
=
nv04_display_late_takedown
;
engine
->
display
.
create
=
nv04_display_create
;
engine
->
display
.
init
=
nv04_display_init
;
engine
->
display
.
destroy
=
nv04_display_destroy
;
engine
->
display
.
init
=
nv04_display_init
;
engine
->
display
.
fini
=
nv04_display_fini
;
engine
->
gpio
.
init
=
nouveau_stub_init
;
engine
->
gpio
.
takedown
=
nouveau_stub_takedown
;
engine
->
gpio
.
get
=
nv10_gpio_get
;
...
...
@@ -227,8 +230,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
display
.
early_init
=
nv04_display_early_init
;
engine
->
display
.
late_takedown
=
nv04_display_late_takedown
;
engine
->
display
.
create
=
nv04_display_create
;
engine
->
display
.
init
=
nv04_display_init
;
engine
->
display
.
destroy
=
nv04_display_destroy
;
engine
->
display
.
init
=
nv04_display_init
;
engine
->
display
.
fini
=
nv04_display_fini
;
engine
->
gpio
.
init
=
nouveau_stub_init
;
engine
->
gpio
.
takedown
=
nouveau_stub_takedown
;
engine
->
gpio
.
get
=
nv10_gpio_get
;
...
...
@@ -279,8 +283,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
display
.
early_init
=
nv04_display_early_init
;
engine
->
display
.
late_takedown
=
nv04_display_late_takedown
;
engine
->
display
.
create
=
nv04_display_create
;
engine
->
display
.
init
=
nv04_display_init
;
engine
->
display
.
destroy
=
nv04_display_destroy
;
engine
->
display
.
init
=
nv04_display_init
;
engine
->
display
.
fini
=
nv04_display_fini
;
engine
->
gpio
.
init
=
nouveau_stub_init
;
engine
->
gpio
.
takedown
=
nouveau_stub_takedown
;
engine
->
gpio
.
get
=
nv10_gpio_get
;
...
...
@@ -336,8 +341,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
display
.
early_init
=
nv50_display_early_init
;
engine
->
display
.
late_takedown
=
nv50_display_late_takedown
;
engine
->
display
.
create
=
nv50_display_create
;
engine
->
display
.
init
=
nv50_display_init
;
engine
->
display
.
destroy
=
nv50_display_destroy
;
engine
->
display
.
init
=
nv50_display_init
;
engine
->
display
.
fini
=
nv50_display_fini
;
engine
->
gpio
.
init
=
nv50_gpio_init
;
engine
->
gpio
.
takedown
=
nv50_gpio_fini
;
engine
->
gpio
.
get
=
nv50_gpio_get
;
...
...
@@ -411,8 +417,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
display
.
early_init
=
nv50_display_early_init
;
engine
->
display
.
late_takedown
=
nv50_display_late_takedown
;
engine
->
display
.
create
=
nv50_display_create
;
engine
->
display
.
init
=
nv50_display_init
;
engine
->
display
.
destroy
=
nv50_display_destroy
;
engine
->
display
.
init
=
nv50_display_init
;
engine
->
display
.
fini
=
nv50_display_fini
;
engine
->
gpio
.
init
=
nv50_gpio_init
;
engine
->
gpio
.
takedown
=
nouveau_stub_takedown
;
engine
->
gpio
.
get
=
nv50_gpio_get
;
...
...
@@ -463,8 +470,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
display
.
early_init
=
nouveau_stub_init
;
engine
->
display
.
late_takedown
=
nouveau_stub_takedown
;
engine
->
display
.
create
=
nvd0_display_create
;
engine
->
display
.
init
=
nvd0_display_init
;
engine
->
display
.
destroy
=
nvd0_display_destroy
;
engine
->
display
.
init
=
nvd0_display_init
;
engine
->
display
.
fini
=
nvd0_display_fini
;
engine
->
gpio
.
init
=
nv50_gpio_init
;
engine
->
gpio
.
takedown
=
nouveau_stub_takedown
;
engine
->
gpio
.
get
=
nvd0_gpio_get
;
...
...
drivers/gpu/drm/nouveau/nv04_display.c
浏览文件 @
2a44e499
...
...
@@ -243,6 +243,11 @@ nv04_display_init(struct drm_device *dev)
return
0
;
}
void
nv04_display_fini
(
struct
drm_device
*
dev
)
{
}
static
void
nv04_vblank_crtc0_isr
(
struct
drm_device
*
dev
)
{
...
...
drivers/gpu/drm/nouveau/nv50_display.c
浏览文件 @
2a44e499
...
...
@@ -264,7 +264,8 @@ nv50_display_init(struct drm_device *dev)
return
nv50_display_sync
(
dev
);
}
static
int
nv50_display_disable
(
struct
drm_device
*
dev
)
void
nv50_display_fini
(
struct
drm_device
*
dev
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nv50_display
*
disp
=
nv50_display
(
dev
);
...
...
@@ -337,16 +338,16 @@ static int nv50_display_disable(struct drm_device *dev)
nv_wr32
(
dev
,
0xe074
,
0xffffffff
);
nv_wr32
(
dev
,
0xe070
,
0x00000000
);
}
return
0
;
}
int
nv50_display_create
(
struct
drm_device
*
dev
)
int
nv50_display_create
(
struct
drm_device
*
dev
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
dcb_table
*
dcb
=
&
dev_priv
->
vbios
.
dcb
;
struct
drm_connector
*
connector
,
*
ct
;
struct
nv50_display
*
priv
;
int
ret
,
i
;
int
i
;
NV_DEBUG_KMS
(
dev
,
"
\n
"
);
...
...
@@ -399,13 +400,6 @@ int nv50_display_create(struct drm_device *dev)
tasklet_init
(
&
priv
->
tasklet
,
nv50_display_bh
,
(
unsigned
long
)
dev
);
nouveau_irq_register
(
dev
,
26
,
nv50_display_isr
);
ret
=
nv50_display_init
(
dev
);
if
(
ret
)
{
nv50_display_destroy
(
dev
);
return
ret
;
}
return
0
;
}
...
...
@@ -416,7 +410,6 @@ nv50_display_destroy(struct drm_device *dev)
NV_DEBUG_KMS
(
dev
,
"
\n
"
);
nv50_display_disable
(
dev
);
nouveau_irq_unregister
(
dev
,
26
);
kfree
(
disp
);
}
...
...
drivers/gpu/drm/nouveau/nv50_display.h
浏览文件 @
2a44e499
...
...
@@ -69,6 +69,7 @@ int nv50_display_early_init(struct drm_device *dev);
void
nv50_display_late_takedown
(
struct
drm_device
*
dev
);
int
nv50_display_create
(
struct
drm_device
*
dev
);
int
nv50_display_init
(
struct
drm_device
*
dev
);
void
nv50_display_fini
(
struct
drm_device
*
dev
);
void
nv50_display_destroy
(
struct
drm_device
*
dev
);
int
nv50_crtc_blank
(
struct
nouveau_crtc
*
,
bool
blank
);
int
nv50_crtc_set_clock
(
struct
drm_device
*
,
int
head
,
int
pclk
);
...
...
drivers/gpu/drm/nouveau/nvd0_display.c
浏览文件 @
2a44e499
...
...
@@ -1341,7 +1341,7 @@ nvd0_display_intr(struct drm_device *dev)
/******************************************************************************
* Init
*****************************************************************************/
static
void
void
nvd0_display_fini
(
struct
drm_device
*
dev
)
{
int
i
;
...
...
@@ -1461,8 +1461,6 @@ nvd0_display_destroy(struct drm_device *dev)
struct
nvd0_display
*
disp
=
nvd0_display
(
dev
);
struct
pci_dev
*
pdev
=
dev
->
pdev
;
nvd0_display_fini
(
dev
);
pci_free_consistent
(
pdev
,
PAGE_SIZE
,
disp
->
evo
[
0
].
ptr
,
disp
->
evo
[
0
].
handle
);
nouveau_gpuobj_ref
(
NULL
,
&
disp
->
mem
);
nouveau_irq_unregister
(
dev
,
26
);
...
...
@@ -1588,10 +1586,6 @@ nvd0_display_create(struct drm_device *dev)
goto
out
;
}
ret
=
nvd0_display_init
(
dev
);
if
(
ret
)
goto
out
;
out:
if
(
ret
)
nvd0_display_destroy
(
dev
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录