Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
20f63afe
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
20f63afe
编写于
11月 15, 2010
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nv50: allocate page for unknown PFB object in nv50_fb.c
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
e41115d0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
56 addition
and
1 deletion
+56
-1
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+1
-0
drivers/gpu/drm/nouveau/nv50_fb.c
drivers/gpu/drm/nouveau/nv50_fb.c
+55
-1
未找到文件。
drivers/gpu/drm/nouveau/nouveau_drv.h
浏览文件 @
20f63afe
...
...
@@ -311,6 +311,7 @@ struct nouveau_timer_engine {
struct
nouveau_fb_engine
{
int
num_tiles
;
struct
drm_mm
tag_heap
;
void
*
priv
;
int
(
*
init
)(
struct
drm_device
*
dev
);
void
(
*
takedown
)(
struct
drm_device
*
dev
);
...
...
drivers/gpu/drm/nouveau/nv50_fb.c
浏览文件 @
20f63afe
...
...
@@ -3,16 +3,58 @@
#include "nouveau_drv.h"
#include "nouveau_drm.h"
struct
nv50_fb_priv
{
struct
page
*
r100c08_page
;
dma_addr_t
r100c08
;
};
static
int
nv50_fb_create
(
struct
drm_device
*
dev
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nv50_fb_priv
*
priv
;
priv
=
kzalloc
(
sizeof
(
*
priv
),
GFP_KERNEL
);
if
(
!
priv
)
return
-
ENOMEM
;
priv
->
r100c08_page
=
alloc_page
(
GFP_KERNEL
|
__GFP_ZERO
);
if
(
!
priv
->
r100c08_page
)
{
kfree
(
priv
);
return
-
ENOMEM
;
}
priv
->
r100c08
=
pci_map_page
(
dev
->
pdev
,
priv
->
r100c08_page
,
0
,
PAGE_SIZE
,
PCI_DMA_BIDIRECTIONAL
);
if
(
pci_dma_mapping_error
(
dev
->
pdev
,
priv
->
r100c08
))
{
__free_page
(
priv
->
r100c08_page
);
kfree
(
priv
);
return
-
EFAULT
;
}
dev_priv
->
engine
.
fb
.
priv
=
priv
;
return
0
;
}
int
nv50_fb_init
(
struct
drm_device
*
dev
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nv50_fb_priv
*
priv
;
int
ret
;
if
(
!
dev_priv
->
engine
.
fb
.
priv
)
{
ret
=
nv50_fb_create
(
dev
);
if
(
ret
)
return
ret
;
}
priv
=
dev_priv
->
engine
.
fb
.
priv
;
/* Not a clue what this is exactly. Without pointing it at a
* scratch page, VRAM->GART blits with M2MF (as in DDX DFS)
* cause IOMMU "read from address 0" errors (rh#561267)
*/
nv_wr32
(
dev
,
0x100c08
,
dev_priv
->
gart_info
.
sg_dummy_bus
>>
8
);
nv_wr32
(
dev
,
0x100c08
,
priv
->
r100c08
>>
8
);
/* This is needed to get meaningful information from 100c90
* on traps. No idea what these values mean exactly. */
...
...
@@ -36,6 +78,18 @@ nv50_fb_init(struct drm_device *dev)
void
nv50_fb_takedown
(
struct
drm_device
*
dev
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nv50_fb_priv
*
priv
;
priv
=
dev_priv
->
engine
.
fb
.
priv
;
if
(
!
priv
)
return
;
dev_priv
->
engine
.
fb
.
priv
=
NULL
;
pci_unmap_page
(
dev
->
pdev
,
priv
->
r100c08
,
PAGE_SIZE
,
PCI_DMA_BIDIRECTIONAL
);
__free_page
(
priv
->
r100c08_page
);
kfree
(
priv
);
}
void
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录