Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
c2980d8c
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
c2980d8c
编写于
7月 29, 2009
作者:
D
David Woodhouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
agp: Switch agp_{un,}map_page() to take struct page * argument
Signed-off-by:
N
David Woodhouse
<
David.Woodhouse@intel.com
>
上级
56ec4c1e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
18 deletion
+17
-18
drivers/char/agp/agp.h
drivers/char/agp/agp.h
+3
-3
drivers/char/agp/backend.c
drivers/char/agp/backend.c
+8
-9
drivers/char/agp/intel-agp.c
drivers/char/agp/intel-agp.c
+6
-6
未找到文件。
drivers/char/agp/agp.h
浏览文件 @
c2980d8c
...
...
@@ -122,8 +122,8 @@ struct agp_bridge_driver {
int
(
*
agp_type_to_mask_type
)
(
struct
agp_bridge_data
*
,
int
);
void
(
*
chipset_flush
)(
struct
agp_bridge_data
*
);
int
(
*
agp_map_page
)(
void
*
addr
,
dma_addr_t
*
ret
);
void
(
*
agp_unmap_page
)(
void
*
addr
,
dma_addr_t
dma
);
int
(
*
agp_map_page
)(
struct
page
*
page
,
dma_addr_t
*
ret
);
void
(
*
agp_unmap_page
)(
struct
page
*
page
,
dma_addr_t
dma
);
int
(
*
agp_map_memory
)(
struct
agp_memory
*
mem
);
void
(
*
agp_unmap_memory
)(
struct
agp_memory
*
mem
);
};
...
...
@@ -139,7 +139,7 @@ struct agp_bridge_data {
u32
__iomem
*
gatt_table
;
u32
*
gatt_table_real
;
unsigned
long
scratch_page
;
unsigned
long
scratch_page_real
;
struct
page
*
scratch_page_page
;
dma_addr_t
scratch_page_dma
;
unsigned
long
gart_bus_addr
;
unsigned
long
gatt_bus_addr
;
...
...
drivers/char/agp/backend.c
浏览文件 @
c2980d8c
...
...
@@ -149,9 +149,9 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
return
-
ENOMEM
;
}
bridge
->
scratch_page_
real
=
phys_to_gart
(
page_to_phys
(
page
))
;
bridge
->
scratch_page_
page
=
page
;
if
(
bridge
->
driver
->
agp_map_page
)
{
if
(
bridge
->
driver
->
agp_map_page
(
p
hys_to_virt
(
page_to_phys
(
page
))
,
if
(
bridge
->
driver
->
agp_map_page
(
p
age
,
&
bridge
->
scratch_page_dma
))
{
dev_err
(
&
bridge
->
dev
->
dev
,
"unable to dma-map scratch page
\n
"
);
...
...
@@ -205,13 +205,12 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
err_out:
if
(
bridge
->
driver
->
needs_scratch_page
&&
bridge
->
driver
->
agp_unmap_page
)
{
void
*
va
=
gart_to_virt
(
bridge
->
scratch_page_real
);
bridge
->
driver
->
agp_unmap_page
(
va
,
bridge
->
scratch_page_dma
);
bridge
->
driver
->
agp_unmap_page
(
bridge
->
scratch_page_page
,
bridge
->
scratch_page_dma
);
}
err_out_nounmap:
if
(
bridge
->
driver
->
needs_scratch_page
)
{
void
*
va
=
gart_to_virt
(
bridge
->
scratch_page_real
);
void
*
va
=
page_address
(
bridge
->
scratch_page_page
);
bridge
->
driver
->
agp_destroy_page
(
va
,
AGP_PAGE_DESTROY_UNMAP
);
bridge
->
driver
->
agp_destroy_page
(
va
,
AGP_PAGE_DESTROY_FREE
);
...
...
@@ -238,11 +237,11 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge)
if
(
bridge
->
driver
->
agp_destroy_page
&&
bridge
->
driver
->
needs_scratch_page
)
{
void
*
va
=
gart_to_virt
(
bridge
->
scratch_page_real
);
void
*
va
=
page_address
(
bridge
->
scratch_page_page
);
if
(
bridge
->
driver
->
agp_unmap_page
)
bridge
->
driver
->
agp_unmap_page
(
va
,
bridge
->
scratch_page_dma
);
bridge
->
driver
->
agp_unmap_page
(
bridge
->
scratch_page_page
,
bridge
->
scratch_page_dma
);
bridge
->
driver
->
agp_destroy_page
(
va
,
AGP_PAGE_DESTROY_UNMAP
);
bridge
->
driver
->
agp_destroy_page
(
va
,
AGP_PAGE_DESTROY_FREE
);
...
...
drivers/char/agp/intel-agp.c
浏览文件 @
c2980d8c
...
...
@@ -181,19 +181,19 @@ static struct _intel_private {
}
intel_private
;
#ifdef USE_PCI_DMA_API
static
int
intel_agp_map_page
(
void
*
addr
,
dma_addr_t
*
ret
)
static
int
intel_agp_map_page
(
struct
page
*
page
,
dma_addr_t
*
ret
)
{
*
ret
=
pci_map_
single
(
intel_private
.
pcidev
,
addr
,
PAGE_SIZE
,
PCI_DMA_BIDIRECTIONAL
);
*
ret
=
pci_map_
page
(
intel_private
.
pcidev
,
page
,
0
,
PAGE_SIZE
,
PCI_DMA_BIDIRECTIONAL
);
if
(
pci_dma_mapping_error
(
intel_private
.
pcidev
,
*
ret
))
return
-
EINVAL
;
return
0
;
}
static
void
intel_agp_unmap_page
(
void
*
addr
,
dma_addr_t
dma
)
static
void
intel_agp_unmap_page
(
struct
page
*
page
,
dma_addr_t
dma
)
{
pci_unmap_
singl
e
(
intel_private
.
pcidev
,
dma
,
PAGE_SIZE
,
PCI_DMA_BIDIRECTIONAL
);
pci_unmap_
pag
e
(
intel_private
.
pcidev
,
dma
,
PAGE_SIZE
,
PCI_DMA_BIDIRECTIONAL
);
}
static
int
intel_agp_map_memory
(
struct
agp_memory
*
mem
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录