Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
6ba9a683
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看板
提交
6ba9a683
编写于
2月 10, 2011
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau: pass domain rather than ttm flags to gem_new()
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
a6704788
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
16 deletion
+17
-16
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+1
-1
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
+2
-2
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_gem.c
+12
-11
drivers/gpu/drm/nouveau/nouveau_notifier.c
drivers/gpu/drm/nouveau/nouveau_notifier.c
+2
-2
未找到文件。
drivers/gpu/drm/nouveau/nouveau_drv.h
浏览文件 @
6ba9a683
...
@@ -1352,7 +1352,7 @@ static inline struct nouveau_fence *nouveau_fence_ref(struct nouveau_fence *obj)
...
@@ -1352,7 +1352,7 @@ static inline struct nouveau_fence *nouveau_fence_ref(struct nouveau_fence *obj)
/* nouveau_gem.c */
/* nouveau_gem.c */
extern
int
nouveau_gem_new
(
struct
drm_device
*
,
struct
nouveau_channel
*
,
extern
int
nouveau_gem_new
(
struct
drm_device
*
,
struct
nouveau_channel
*
,
int
size
,
int
align
,
uint32_t
flags
,
int
size
,
int
align
,
uint32_t
domain
,
uint32_t
tile_mode
,
uint32_t
tile_flags
,
uint32_t
tile_mode
,
uint32_t
tile_flags
,
struct
nouveau_bo
**
);
struct
nouveau_bo
**
);
extern
int
nouveau_gem_object_new
(
struct
drm_gem_object
*
);
extern
int
nouveau_gem_object_new
(
struct
drm_gem_object
*
);
...
...
drivers/gpu/drm/nouveau/nouveau_fbcon.c
浏览文件 @
6ba9a683
...
@@ -296,8 +296,8 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
...
@@ -296,8 +296,8 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
size
=
mode_cmd
.
pitch
*
mode_cmd
.
height
;
size
=
mode_cmd
.
pitch
*
mode_cmd
.
height
;
size
=
roundup
(
size
,
PAGE_SIZE
);
size
=
roundup
(
size
,
PAGE_SIZE
);
ret
=
nouveau_gem_new
(
dev
,
dev_priv
->
channel
,
size
,
0
,
TTM_PL_FLAG_VRAM
,
ret
=
nouveau_gem_new
(
dev
,
dev_priv
->
channel
,
size
,
0
,
0
,
0x0000
,
&
nvbo
);
NOUVEAU_GEM_DOMAIN_VRAM
,
0
,
0x0000
,
&
nvbo
);
if
(
ret
)
{
if
(
ret
)
{
NV_ERROR
(
dev
,
"failed to allocate framebuffer
\n
"
);
NV_ERROR
(
dev
,
"failed to allocate framebuffer
\n
"
);
goto
out
;
goto
out
;
...
...
drivers/gpu/drm/nouveau/nouveau_gem.c
浏览文件 @
6ba9a683
...
@@ -61,12 +61,20 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
...
@@ -61,12 +61,20 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
int
int
nouveau_gem_new
(
struct
drm_device
*
dev
,
struct
nouveau_channel
*
chan
,
nouveau_gem_new
(
struct
drm_device
*
dev
,
struct
nouveau_channel
*
chan
,
int
size
,
int
align
,
uint32_t
flags
,
uint32_t
tile_mode
,
int
size
,
int
align
,
uint32_t
domain
,
uint32_t
tile_mode
,
uint32_t
tile_flags
,
struct
nouveau_bo
**
pnvbo
)
uint32_t
tile_flags
,
struct
nouveau_bo
**
pnvbo
)
{
{
struct
nouveau_bo
*
nvbo
;
struct
nouveau_bo
*
nvbo
;
u32
flags
=
0
;
int
ret
;
int
ret
;
if
(
domain
&
NOUVEAU_GEM_DOMAIN_VRAM
)
flags
|=
TTM_PL_FLAG_VRAM
;
if
(
domain
&
NOUVEAU_GEM_DOMAIN_GART
)
flags
|=
TTM_PL_FLAG_TT
;
if
(
!
flags
||
domain
&
NOUVEAU_GEM_DOMAIN_CPU
)
flags
|=
TTM_PL_FLAG_SYSTEM
;
ret
=
nouveau_bo_new
(
dev
,
chan
,
size
,
align
,
flags
,
tile_mode
,
ret
=
nouveau_bo_new
(
dev
,
chan
,
size
,
align
,
flags
,
tile_mode
,
tile_flags
,
pnvbo
);
tile_flags
,
pnvbo
);
if
(
ret
)
if
(
ret
)
...
@@ -110,19 +118,11 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
...
@@ -110,19 +118,11 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
struct
drm_nouveau_gem_new
*
req
=
data
;
struct
drm_nouveau_gem_new
*
req
=
data
;
struct
nouveau_bo
*
nvbo
=
NULL
;
struct
nouveau_bo
*
nvbo
=
NULL
;
struct
nouveau_channel
*
chan
=
NULL
;
struct
nouveau_channel
*
chan
=
NULL
;
uint32_t
flags
=
0
;
int
ret
=
0
;
int
ret
=
0
;
if
(
unlikely
(
dev_priv
->
ttm
.
bdev
.
dev_mapping
==
NULL
))
if
(
unlikely
(
dev_priv
->
ttm
.
bdev
.
dev_mapping
==
NULL
))
dev_priv
->
ttm
.
bdev
.
dev_mapping
=
dev_priv
->
dev
->
dev_mapping
;
dev_priv
->
ttm
.
bdev
.
dev_mapping
=
dev_priv
->
dev
->
dev_mapping
;
if
(
req
->
info
.
domain
&
NOUVEAU_GEM_DOMAIN_VRAM
)
flags
|=
TTM_PL_FLAG_VRAM
;
if
(
req
->
info
.
domain
&
NOUVEAU_GEM_DOMAIN_GART
)
flags
|=
TTM_PL_FLAG_TT
;
if
(
!
flags
||
req
->
info
.
domain
&
NOUVEAU_GEM_DOMAIN_CPU
)
flags
|=
TTM_PL_FLAG_SYSTEM
;
if
(
!
dev_priv
->
engine
.
vram
.
flags_valid
(
dev
,
req
->
info
.
tile_flags
))
{
if
(
!
dev_priv
->
engine
.
vram
.
flags_valid
(
dev
,
req
->
info
.
tile_flags
))
{
NV_ERROR
(
dev
,
"bad page flags: 0x%08x
\n
"
,
req
->
info
.
tile_flags
);
NV_ERROR
(
dev
,
"bad page flags: 0x%08x
\n
"
,
req
->
info
.
tile_flags
);
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -134,8 +134,9 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
...
@@ -134,8 +134,9 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
return
PTR_ERR
(
chan
);
return
PTR_ERR
(
chan
);
}
}
ret
=
nouveau_gem_new
(
dev
,
chan
,
req
->
info
.
size
,
req
->
align
,
flags
,
ret
=
nouveau_gem_new
(
dev
,
chan
,
req
->
info
.
size
,
req
->
align
,
req
->
info
.
tile_mode
,
req
->
info
.
tile_flags
,
&
nvbo
);
req
->
info
.
domain
,
req
->
info
.
tile_mode
,
req
->
info
.
tile_flags
,
&
nvbo
);
if
(
chan
)
if
(
chan
)
nouveau_channel_put
(
&
chan
);
nouveau_channel_put
(
&
chan
);
if
(
ret
)
if
(
ret
)
...
...
drivers/gpu/drm/nouveau/nouveau_notifier.c
浏览文件 @
6ba9a683
...
@@ -39,9 +39,9 @@ nouveau_notifier_init_channel(struct nouveau_channel *chan)
...
@@ -39,9 +39,9 @@ nouveau_notifier_init_channel(struct nouveau_channel *chan)
int
ret
;
int
ret
;
if
(
nouveau_vram_notify
)
if
(
nouveau_vram_notify
)
flags
=
TTM_PL_FLAG
_VRAM
;
flags
=
NOUVEAU_GEM_DOMAIN
_VRAM
;
else
else
flags
=
TTM_PL_FLAG_T
T
;
flags
=
NOUVEAU_GEM_DOMAIN_GAR
T
;
ret
=
nouveau_gem_new
(
dev
,
NULL
,
PAGE_SIZE
,
0
,
flags
,
0
,
0
,
&
ntfy
);
ret
=
nouveau_gem_new
(
dev
,
NULL
,
PAGE_SIZE
,
0
,
flags
,
0
,
0
,
&
ntfy
);
if
(
ret
)
if
(
ret
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录