Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
048a8859
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看板
提交
048a8859
编写于
7月 04, 2011
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau: make general drm modesetting init common
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
2e9733ff
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
32 addition
and
67 deletion
+32
-67
drivers/gpu/drm/nouveau/nouveau_crtc.h
drivers/gpu/drm/nouveau/nouveau_crtc.h
+1
-2
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+0
-1
drivers/gpu/drm/nouveau/nouveau_mem.c
drivers/gpu/drm/nouveau/nouveau_mem.c
+0
-2
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nouveau_state.c
+21
-0
drivers/gpu/drm/nouveau/nv04_display.c
drivers/gpu/drm/nouveau/nv04_display.c
+0
-23
drivers/gpu/drm/nouveau/nv50_crtc.c
drivers/gpu/drm/nouveau/nv50_crtc.c
+0
-2
drivers/gpu/drm/nouveau/nv50_cursor.c
drivers/gpu/drm/nouveau/nv50_cursor.c
+0
-18
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/nouveau/nv50_display.c
+10
-19
未找到文件。
drivers/gpu/drm/nouveau/nouveau_crtc.h
浏览文件 @
048a8859
...
...
@@ -82,14 +82,13 @@ static inline struct drm_crtc *to_drm_crtc(struct nouveau_crtc *crtc)
}
int
nv50_crtc_create
(
struct
drm_device
*
dev
,
int
index
);
int
nv50_cursor_init
(
struct
nouveau_crtc
*
);
void
nv50_cursor_fini
(
struct
nouveau_crtc
*
);
int
nv50_crtc_cursor_set
(
struct
drm_crtc
*
drm_crtc
,
struct
drm_file
*
file_priv
,
uint32_t
buffer_handle
,
uint32_t
width
,
uint32_t
height
);
int
nv50_crtc_cursor_move
(
struct
drm_crtc
*
drm_crtc
,
int
x
,
int
y
);
int
nv04_cursor_init
(
struct
nouveau_crtc
*
);
int
nv50_cursor_init
(
struct
nouveau_crtc
*
);
struct
nouveau_connector
*
nouveau_crtc_connector_get
(
struct
nouveau_crtc
*
crtc
);
...
...
drivers/gpu/drm/nouveau/nouveau_drv.h
浏览文件 @
048a8859
...
...
@@ -736,7 +736,6 @@ struct drm_nouveau_private {
uint64_t
vram_size
;
uint64_t
vram_sys_base
;
uint64_t
fb_phys
;
uint64_t
fb_available_size
;
uint64_t
fb_mappable_pages
;
uint64_t
fb_aper_free
;
...
...
drivers/gpu/drm/nouveau/nouveau_mem.c
浏览文件 @
048a8859
...
...
@@ -408,8 +408,6 @@ nouveau_mem_vram_init(struct drm_device *dev)
if
(
ret
)
return
ret
;
dev_priv
->
fb_phys
=
pci_resource_start
(
dev
->
pdev
,
1
);
ret
=
nouveau_ttm_global_init
(
dev_priv
);
if
(
ret
)
return
ret
;
...
...
drivers/gpu/drm/nouveau/nouveau_state.c
浏览文件 @
048a8859
...
...
@@ -657,6 +657,26 @@ nouveau_card_init(struct drm_device *dev)
goto
out_engine
;
}
/* initialise general modesetting */
drm_mode_config_init
(
dev
);
drm_mode_create_scaling_mode_property
(
dev
);
drm_mode_create_dithering_property
(
dev
);
dev
->
mode_config
.
funcs
=
(
void
*
)
&
nouveau_mode_config_funcs
;
dev
->
mode_config
.
fb_base
=
pci_resource_start
(
dev
->
pdev
,
1
);
dev
->
mode_config
.
min_width
=
0
;
dev
->
mode_config
.
min_height
=
0
;
if
(
dev_priv
->
card_type
<
NV_10
)
{
dev
->
mode_config
.
max_width
=
2048
;
dev
->
mode_config
.
max_height
=
2048
;
}
else
if
(
dev_priv
->
card_type
<
NV_50
)
{
dev
->
mode_config
.
max_width
=
4096
;
dev
->
mode_config
.
max_height
=
4096
;
}
else
{
dev
->
mode_config
.
max_width
=
8192
;
dev
->
mode_config
.
max_height
=
8192
;
}
ret
=
engine
->
display
.
create
(
dev
);
if
(
ret
)
goto
out_fifo
;
...
...
@@ -747,6 +767,7 @@ static void nouveau_card_takedown(struct drm_device *dev)
}
engine
->
display
.
destroy
(
dev
);
drm_mode_config_cleanup
(
dev
);
if
(
!
dev_priv
->
noaccel
)
{
engine
->
fifo
.
takedown
(
dev
);
...
...
drivers/gpu/drm/nouveau/nv04_display.c
浏览文件 @
048a8859
...
...
@@ -126,27 +126,6 @@ nv04_display_create(struct drm_device *dev)
nouveau_hw_save_vga_fonts
(
dev
,
1
);
drm_mode_config_init
(
dev
);
drm_mode_create_scaling_mode_property
(
dev
);
drm_mode_create_dithering_property
(
dev
);
dev
->
mode_config
.
funcs
=
(
void
*
)
&
nouveau_mode_config_funcs
;
dev
->
mode_config
.
min_width
=
0
;
dev
->
mode_config
.
min_height
=
0
;
switch
(
dev_priv
->
card_type
)
{
case
NV_04
:
dev
->
mode_config
.
max_width
=
2048
;
dev
->
mode_config
.
max_height
=
2048
;
break
;
default:
dev
->
mode_config
.
max_width
=
4096
;
dev
->
mode_config
.
max_height
=
4096
;
break
;
}
dev
->
mode_config
.
fb_base
=
dev_priv
->
fb_phys
;
nv04_crtc_create
(
dev
,
0
);
if
(
nv_two_heads
(
dev
))
nv04_crtc_create
(
dev
,
1
);
...
...
@@ -235,8 +214,6 @@ nv04_display_destroy(struct drm_device *dev)
list_for_each_entry
(
crtc
,
&
dev
->
mode_config
.
crtc_list
,
head
)
crtc
->
funcs
->
restore
(
crtc
);
drm_mode_config_cleanup
(
dev
);
nouveau_hw_save_vga_fonts
(
dev
,
0
);
}
...
...
drivers/gpu/drm/nouveau/nv50_crtc.c
浏览文件 @
048a8859
...
...
@@ -329,8 +329,6 @@ nv50_crtc_destroy(struct drm_crtc *crtc)
drm_crtc_cleanup
(
&
nv_crtc
->
base
);
nv50_cursor_fini
(
nv_crtc
);
nouveau_bo_unmap
(
nv_crtc
->
lut
.
nvbo
);
nouveau_bo_ref
(
NULL
,
&
nv_crtc
->
lut
.
nvbo
);
nouveau_bo_unmap
(
nv_crtc
->
cursor
.
nvbo
);
...
...
drivers/gpu/drm/nouveau/nv50_cursor.c
浏览文件 @
048a8859
...
...
@@ -137,21 +137,3 @@ nv50_cursor_init(struct nouveau_crtc *nv_crtc)
nv_crtc
->
cursor
.
show
=
nv50_cursor_show
;
return
0
;
}
void
nv50_cursor_fini
(
struct
nouveau_crtc
*
nv_crtc
)
{
struct
drm_device
*
dev
=
nv_crtc
->
base
.
dev
;
int
idx
=
nv_crtc
->
index
;
NV_DEBUG_KMS
(
dev
,
"
\n
"
);
nv_wr32
(
dev
,
NV50_PDISPLAY_CURSOR_CURSOR_CTRL2
(
idx
),
0
);
if
(
!
nv_wait
(
dev
,
NV50_PDISPLAY_CURSOR_CURSOR_CTRL2
(
idx
),
NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS
,
0
))
{
NV_ERROR
(
dev
,
"timeout: CURSOR_CTRL2_STATUS == 0
\n
"
);
NV_ERROR
(
dev
,
"CURSOR_CTRL2 = 0x%08x
\n
"
,
nv_rd32
(
dev
,
NV50_PDISPLAY_CURSOR_CURSOR_CTRL2
(
idx
)));
}
}
drivers/gpu/drm/nouveau/nv50_display.c
浏览文件 @
048a8859
...
...
@@ -247,6 +247,16 @@ static int nv50_display_disable(struct drm_device *dev)
}
}
for
(
i
=
0
;
i
<
2
;
i
++
)
{
nv_wr32
(
dev
,
NV50_PDISPLAY_CURSOR_CURSOR_CTRL2
(
i
),
0
);
if
(
!
nv_wait
(
dev
,
NV50_PDISPLAY_CURSOR_CURSOR_CTRL2
(
i
),
NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS
,
0
))
{
NV_ERROR
(
dev
,
"timeout: CURSOR_CTRL2_STATUS == 0
\n
"
);
NV_ERROR
(
dev
,
"CURSOR_CTRL2 = 0x%08x
\n
"
,
nv_rd32
(
dev
,
NV50_PDISPLAY_CURSOR_CURSOR_CTRL2
(
i
)));
}
}
nv50_evo_fini
(
dev
);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
...
...
@@ -286,23 +296,6 @@ int nv50_display_create(struct drm_device *dev)
return
-
ENOMEM
;
dev_priv
->
engine
.
display
.
priv
=
priv
;
/* init basic kernel modesetting */
drm_mode_config_init
(
dev
);
/* Initialise some optional connector properties. */
drm_mode_create_scaling_mode_property
(
dev
);
drm_mode_create_dithering_property
(
dev
);
dev
->
mode_config
.
min_width
=
0
;
dev
->
mode_config
.
min_height
=
0
;
dev
->
mode_config
.
funcs
=
(
void
*
)
&
nouveau_mode_config_funcs
;
dev
->
mode_config
.
max_width
=
8192
;
dev
->
mode_config
.
max_height
=
8192
;
dev
->
mode_config
.
fb_base
=
dev_priv
->
fb_phys
;
/* Create CRTC objects */
for
(
i
=
0
;
i
<
2
;
i
++
)
nv50_crtc_create
(
dev
,
i
);
...
...
@@ -364,8 +357,6 @@ nv50_display_destroy(struct drm_device *dev)
NV_DEBUG_KMS
(
dev
,
"
\n
"
);
drm_mode_config_cleanup
(
dev
);
nv50_display_disable
(
dev
);
nouveau_irq_unregister
(
dev
,
26
);
kfree
(
disp
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录