Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
db400b3c
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看板
提交
db400b3c
编写于
9月 07, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'drm-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6
上级
0dd7f883
908f9c48
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
46 addition
and
37 deletion
+46
-37
drivers/char/drm/drm_bufs.c
drivers/char/drm/drm_bufs.c
+33
-33
drivers/char/drm/drm_context.c
drivers/char/drm/drm_context.c
+1
-1
drivers/char/drm/drm_sysfs.c
drivers/char/drm/drm_sysfs.c
+1
-0
drivers/char/drm/mga_dma.c
drivers/char/drm/mga_dma.c
+11
-3
未找到文件。
drivers/char/drm/drm_bufs.c
浏览文件 @
db400b3c
...
...
@@ -48,8 +48,8 @@ unsigned long drm_get_resource_len(drm_device_t *dev, unsigned int resource)
}
EXPORT_SYMBOL
(
drm_get_resource_len
);
static
drm_
local_map
_t
*
drm_find_matching_map
(
drm_device_t
*
dev
,
drm_local_map_t
*
map
)
static
drm_
map_list
_t
*
drm_find_matching_map
(
drm_device_t
*
dev
,
drm_local_map_t
*
map
)
{
struct
list_head
*
list
;
...
...
@@ -57,7 +57,7 @@ static drm_local_map_t *drm_find_matching_map(drm_device_t *dev,
drm_map_list_t
*
entry
=
list_entry
(
list
,
drm_map_list_t
,
head
);
if
(
entry
->
map
&&
map
->
type
==
entry
->
map
->
type
&&
entry
->
map
->
offset
==
map
->
offset
)
{
return
entry
->
map
;
return
entry
;
}
}
...
...
@@ -114,14 +114,13 @@ static __inline__ unsigned int HandleID(unsigned long lhandle, drm_device_t *dev
* type. Adds the map to the map list drm_device::maplist. Adds MTRR's where
* applicable and if supported by the kernel.
*/
int
drm_addmap
(
drm_device_t
*
dev
,
unsigned
int
offset
,
unsigned
int
size
,
drm_map_type_t
type
,
drm_map_flags_t
flags
,
drm_local_map_t
**
map_ptr
)
int
drm_addmap
_core
(
drm_device_t
*
dev
,
unsigned
int
offset
,
unsigned
int
size
,
drm_map_type_t
type
,
drm_map_flags_t
flags
,
drm_map_list_t
**
maplist
)
{
drm_map_t
*
map
;
drm_map_list_t
*
list
;
drm_dma_handle_t
*
dmah
;
drm_local_map_t
*
found_map
;
map
=
drm_alloc
(
sizeof
(
*
map
),
DRM_MEM_MAPS
);
if
(
!
map
)
...
...
@@ -166,17 +165,17 @@ int drm_addmap(drm_device_t * dev, unsigned int offset,
* needing to be aware of it. Therefore, we just return success
* when the server tries to create a duplicate map.
*/
found_map
=
drm_find_matching_map
(
dev
,
map
);
if
(
found_map
!=
NULL
)
{
if
(
found_
map
->
size
!=
map
->
size
)
{
list
=
drm_find_matching_map
(
dev
,
map
);
if
(
list
!=
NULL
)
{
if
(
list
->
map
->
size
!=
map
->
size
)
{
DRM_DEBUG
(
"Matching maps of type %d with "
"mismatched sizes, (%ld vs %ld)
\n
"
,
map
->
type
,
map
->
size
,
found_
map
->
size
);
found_
map
->
size
=
map
->
size
;
map
->
type
,
map
->
size
,
list
->
map
->
size
);
list
->
map
->
size
=
map
->
size
;
}
drm_free
(
map
,
sizeof
(
*
map
),
DRM_MEM_MAPS
);
*
map
_ptr
=
found_map
;
*
map
list
=
list
;
return
0
;
}
...
...
@@ -264,9 +263,22 @@ int drm_addmap(drm_device_t * dev, unsigned int offset,
:
map
->
offset
,
dev
);
up
(
&
dev
->
struct_sem
);
*
map
_ptr
=
map
;
*
map
list
=
list
;
return
0
;
}
int
drm_addmap
(
drm_device_t
*
dev
,
unsigned
int
offset
,
unsigned
int
size
,
drm_map_type_t
type
,
drm_map_flags_t
flags
,
drm_local_map_t
**
map_ptr
)
{
drm_map_list_t
*
list
;
int
rc
;
rc
=
drm_addmap_core
(
dev
,
offset
,
size
,
type
,
flags
,
&
list
);
if
(
!
rc
)
*
map_ptr
=
list
->
map
;
return
rc
;
}
EXPORT_SYMBOL
(
drm_addmap
);
int
drm_addmap_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
...
...
@@ -275,10 +287,9 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
head
->
dev
;
drm_map_t
map
;
drm_map_
t
*
map_ptr
;
drm_map_
list_t
*
maplist
;
drm_map_t
__user
*
argp
=
(
void
__user
*
)
arg
;
int
err
;
unsigned
long
handle
=
0
;
if
(
!
(
filp
->
f_mode
&
3
))
return
-
EACCES
;
/* Require read/write */
...
...
@@ -287,26 +298,15 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
return
-
EFAULT
;
}
err
=
drm_addmap
(
dev
,
map
.
offset
,
map
.
size
,
map
.
type
,
map
.
flags
,
&
map_ptr
);
err
=
drm_addmap
_core
(
dev
,
map
.
offset
,
map
.
size
,
map
.
type
,
map
.
flags
,
&
maplist
);
if
(
err
)
{
if
(
err
)
return
err
;
}
{
drm_map_list_t
*
_entry
;
list_for_each_entry
(
_entry
,
&
dev
->
maplist
->
head
,
head
)
{
if
(
_entry
->
map
==
map_ptr
)
handle
=
_entry
->
user_token
;
}
if
(
!
handle
)
return
-
EFAULT
;
}
if
(
copy_to_user
(
argp
,
map
_ptr
,
sizeof
(
*
map_ptr
)))
if
(
copy_to_user
(
argp
,
map
list
->
map
,
sizeof
(
drm_map_t
)))
return
-
EFAULT
;
if
(
put_user
(
handle
,
&
argp
->
handle
))
if
(
put_user
(
maplist
->
user_token
,
&
argp
->
handle
))
return
-
EFAULT
;
return
0
;
}
...
...
@@ -1041,7 +1041,7 @@ static int drm_addbufs_sg(drm_device_t *dev, drm_buf_desc_t *request)
return
0
;
}
int
drm_addbufs_fb
(
drm_device_t
*
dev
,
drm_buf_desc_t
*
request
)
static
int
drm_addbufs_fb
(
drm_device_t
*
dev
,
drm_buf_desc_t
*
request
)
{
drm_device_dma_t
*
dma
=
dev
->
dma
;
drm_buf_entry_t
*
entry
;
...
...
drivers/char/drm/drm_context.c
浏览文件 @
db400b3c
...
...
@@ -308,7 +308,7 @@ int drm_setsareactx(struct inode *inode, struct file *filp,
*
* Attempt to set drm_device::context_flag.
*/
int
drm_context_switch
(
drm_device_t
*
dev
,
int
old
,
int
new
)
static
int
drm_context_switch
(
drm_device_t
*
dev
,
int
old
,
int
new
)
{
if
(
test_and_set_bit
(
0
,
&
dev
->
context_flag
)
)
{
DRM_ERROR
(
"Reentering -- FIXME
\n
"
);
...
...
drivers/char/drm/drm_sysfs.c
浏览文件 @
db400b3c
...
...
@@ -17,6 +17,7 @@
#include <linux/err.h>
#include "drm_core.h"
#include "drmP.h"
struct
drm_sysfs_class
{
struct
class_device_attribute
attr
;
...
...
drivers/char/drm/mga_dma.c
浏览文件 @
db400b3c
...
...
@@ -417,6 +417,7 @@ int mga_driver_preinit(drm_device_t *dev, unsigned long flags)
return
0
;
}
#if __OS_HAS_AGP
/**
* Bootstrap the driver for AGP DMA.
*
...
...
@@ -560,6 +561,13 @@ static int mga_do_agp_dma_bootstrap(drm_device_t * dev,
DRM_INFO
(
"Initialized card for AGP DMA.
\n
"
);
return
0
;
}
#else
static
int
mga_do_agp_dma_bootstrap
(
drm_device_t
*
dev
,
drm_mga_dma_bootstrap_t
*
dma_bs
)
{
return
-
EINVAL
;
}
#endif
/**
* Bootstrap the driver for PCI DMA.
...
...
@@ -697,7 +705,6 @@ static int mga_do_dma_bootstrap(drm_device_t * dev,
* carve off portions of it for internal uses. The remaining memory
* is returned to user-mode to be used for AGP textures.
*/
if
(
is_agp
)
{
err
=
mga_do_agp_dma_bootstrap
(
dev
,
dma_bs
);
}
...
...
@@ -932,6 +939,7 @@ static int mga_do_cleanup_dma( drm_device_t *dev )
drm_core_ioremapfree
(
dev
->
agp_buffer_map
,
dev
);
if
(
dev_priv
->
used_new_dma_init
)
{
#if __OS_HAS_AGP
if
(
dev_priv
->
agp_mem
!=
NULL
)
{
dev_priv
->
agp_textures
=
NULL
;
drm_unbind_agp
(
dev_priv
->
agp_mem
);
...
...
@@ -944,7 +952,7 @@ static int mga_do_cleanup_dma( drm_device_t *dev )
if
((
dev
->
agp
!=
NULL
)
&&
dev
->
agp
->
acquired
)
{
err
=
drm_agp_release
(
dev
);
}
#endif
dev_priv
->
used_new_dma_init
=
0
;
}
...
...
@@ -965,7 +973,7 @@ static int mga_do_cleanup_dma( drm_device_t *dev )
}
}
return
0
;
return
err
;
}
int
mga_dma_init
(
DRM_IOCTL_ARGS
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录