Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
68455a43
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,发现更多精彩内容 >>
提交
68455a43
编写于
3月 04, 2012
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nve0: initial modesetting support for kepler chipsets
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
fa2c113a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
55 addition
and
7 deletion
+55
-7
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+1
-0
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nouveau_state.c
+54
-7
未找到文件。
drivers/gpu/drm/nouveau/nouveau_drv.h
浏览文件 @
68455a43
...
...
@@ -701,6 +701,7 @@ enum nouveau_card_type {
NV_50
=
0x50
,
NV_C0
=
0xc0
,
NV_D0
=
0xd0
,
NV_E0
=
0xe0
,
};
struct
drm_nouveau_private
{
...
...
drivers/gpu/drm/nouveau/nouveau_state.c
浏览文件 @
68455a43
...
...
@@ -479,6 +479,47 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
pm
.
voltage_get
=
nouveau_voltage_gpio_get
;
engine
->
pm
.
voltage_set
=
nouveau_voltage_gpio_set
;
break
;
case
0xe0
:
engine
->
instmem
.
init
=
nvc0_instmem_init
;
engine
->
instmem
.
takedown
=
nvc0_instmem_takedown
;
engine
->
instmem
.
suspend
=
nvc0_instmem_suspend
;
engine
->
instmem
.
resume
=
nvc0_instmem_resume
;
engine
->
instmem
.
get
=
nv50_instmem_get
;
engine
->
instmem
.
put
=
nv50_instmem_put
;
engine
->
instmem
.
map
=
nv50_instmem_map
;
engine
->
instmem
.
unmap
=
nv50_instmem_unmap
;
engine
->
instmem
.
flush
=
nv84_instmem_flush
;
engine
->
mc
.
init
=
nv50_mc_init
;
engine
->
mc
.
takedown
=
nv50_mc_takedown
;
engine
->
timer
.
init
=
nv04_timer_init
;
engine
->
timer
.
read
=
nv04_timer_read
;
engine
->
timer
.
takedown
=
nv04_timer_takedown
;
engine
->
fb
.
init
=
nvc0_fb_init
;
engine
->
fb
.
takedown
=
nvc0_fb_takedown
;
engine
->
fifo
.
channels
=
0
;
engine
->
fifo
.
init
=
nouveau_stub_init
;
engine
->
fifo
.
takedown
=
nouveau_stub_takedown
;
engine
->
fifo
.
disable
=
nvc0_fifo_disable
;
engine
->
fifo
.
enable
=
nvc0_fifo_enable
;
engine
->
fifo
.
reassign
=
nvc0_fifo_reassign
;
engine
->
fifo
.
unload_context
=
nouveau_stub_init
;
engine
->
display
.
early_init
=
nouveau_stub_init
;
engine
->
display
.
late_takedown
=
nouveau_stub_takedown
;
engine
->
display
.
create
=
nvd0_display_create
;
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
.
fini
=
nv50_gpio_fini
;
engine
->
gpio
.
drive
=
nvd0_gpio_drive
;
engine
->
gpio
.
sense
=
nvd0_gpio_sense
;
engine
->
gpio
.
irq_enable
=
nv50_gpio_irq_enable
;
engine
->
vram
.
init
=
nvc0_vram_init
;
engine
->
vram
.
takedown
=
nv50_vram_fini
;
engine
->
vram
.
get
=
nvc0_vram_new
;
engine
->
vram
.
put
=
nv50_vram_del
;
engine
->
vram
.
flags_valid
=
nvc0_vram_flags_valid
;
break
;
default:
NV_ERROR
(
dev
,
"NV%02x unsupported
\n
"
,
dev_priv
->
chipset
);
return
1
;
...
...
@@ -1056,8 +1097,8 @@ static int nouveau_remove_conflicting_drivers(struct drm_device *dev)
int
nouveau_load
(
struct
drm_device
*
dev
,
unsigned
long
flags
)
{
struct
drm_nouveau_private
*
dev_priv
;
unsigned
long
long
offset
,
length
;
uint32_t
reg0
=
~
0
,
strap
;
resource_size_t
mmio_start_offs
;
int
ret
;
dev_priv
=
kzalloc
(
sizeof
(
*
dev_priv
),
GFP_KERNEL
);
...
...
@@ -1111,6 +1152,9 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
case
0xd0
:
dev_priv
->
card_type
=
NV_D0
;
break
;
case
0xe0
:
dev_priv
->
card_type
=
NV_E0
;
break
;
default:
break
;
}
...
...
@@ -1135,17 +1179,20 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
NV_INFO
(
dev
,
"Detected an NV%2x generation card (0x%08x)
\n
"
,
dev_priv
->
card_type
,
reg0
);
/* map the mmio regs */
mmio_start_offs
=
pci_resource_start
(
dev
->
pdev
,
0
);
dev_priv
->
mmio
=
ioremap
(
mmio_start_offs
,
0x00800000
);
/* map the mmio regs, limiting the amount to preserve vmap space */
offset
=
pci_resource_start
(
dev
->
pdev
,
0
);
length
=
pci_resource_len
(
dev
->
pdev
,
0
);
if
(
dev_priv
->
card_type
<
NV_E0
)
length
=
min
(
length
,
(
unsigned
long
long
)
0x00800000
);
dev_priv
->
mmio
=
ioremap
(
offset
,
length
);
if
(
!
dev_priv
->
mmio
)
{
NV_ERROR
(
dev
,
"Unable to initialize the mmio mapping. "
"Please report your setup to "
DRIVER_EMAIL
"
\n
"
);
ret
=
-
EINVAL
;
goto
err_priv
;
}
NV_DEBUG
(
dev
,
"regs mapped ok at 0x%llx
\n
"
,
(
unsigned
long
long
)
mmio_start_offs
);
NV_DEBUG
(
dev
,
"regs mapped ok at 0x%llx
\n
"
,
offset
);
/* determine frequency of timing crystal */
strap
=
nv_rd32
(
dev
,
0x101000
);
...
...
@@ -1203,7 +1250,7 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
}
}
else
{
dev_priv
->
ramin_size
=
1
*
1024
*
1024
;
dev_priv
->
ramin
=
ioremap
(
mmio_start_offs
+
NV_RAMIN
,
dev_priv
->
ramin
=
ioremap
(
offset
+
NV_RAMIN
,
dev_priv
->
ramin_size
);
if
(
!
dev_priv
->
ramin
)
{
NV_ERROR
(
dev
,
"Failed to map BAR0 PRAMIN.
\n
"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录