Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
3bdda04f
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,发现更多精彩内容 >>
提交
3bdda04f
编写于
8月 10, 2014
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau: use ioctl interface for abi16 ntfy alloc
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
a4e610b5
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
31 addition
and
18 deletion
+31
-18
drivers/gpu/drm/nouveau/nouveau_abi16.c
drivers/gpu/drm/nouveau/nouveau_abi16.c
+31
-18
未找到文件。
drivers/gpu/drm/nouveau/nouveau_abi16.c
浏览文件 @
3bdda04f
...
@@ -408,13 +408,27 @@ int
...
@@ -408,13 +408,27 @@ int
nouveau_abi16_ioctl_notifierobj_alloc
(
ABI16_IOCTL_ARGS
)
nouveau_abi16_ioctl_notifierobj_alloc
(
ABI16_IOCTL_ARGS
)
{
{
struct
drm_nouveau_notifierobj_alloc
*
info
=
data
;
struct
drm_nouveau_notifierobj_alloc
*
info
=
data
;
struct
{
struct
nvif_ioctl_v0
ioctl
;
struct
nvif_ioctl_new_v0
new
;
struct
nv_dma_class
ctxdma
;
}
args
=
{
.
ioctl
.
owner
=
NVIF_IOCTL_V0_OWNER_ANY
,
.
ioctl
.
type
=
NVIF_IOCTL_V0_NEW
,
.
ioctl
.
path_nr
=
3
,
.
ioctl
.
path
[
2
]
=
NOUVEAU_ABI16_CLIENT
,
.
ioctl
.
path
[
1
]
=
NOUVEAU_ABI16_DEVICE
,
.
ioctl
.
path
[
0
]
=
NOUVEAU_ABI16_CHAN
(
info
->
channel
),
.
new
.
route
=
NVDRM_OBJECT_ABI16
,
.
new
.
handle
=
info
->
handle
,
.
new
.
oclass
=
NV_DMA_IN_MEMORY_CLASS
,
};
struct
nouveau_drm
*
drm
=
nouveau_drm
(
dev
);
struct
nouveau_drm
*
drm
=
nouveau_drm
(
dev
);
struct
nouveau_abi16
*
abi16
=
nouveau_abi16_get
(
file_priv
,
dev
);
struct
nouveau_abi16
*
abi16
=
nouveau_abi16_get
(
file_priv
,
dev
);
struct
nouveau_abi16_chan
*
chan
;
struct
nouveau_abi16_chan
*
chan
;
struct
nouveau_abi16_ntfy
*
ntfy
;
struct
nouveau_abi16_ntfy
*
ntfy
;
struct
nvif_device
*
device
=
&
abi16
->
device
;
struct
nvif_device
*
device
=
&
abi16
->
device
;
struct
nouveau_object
*
object
;
struct
nvif_client
*
client
;
struct
nv_dma_class
args
=
{};
int
ret
;
int
ret
;
if
(
unlikely
(
!
abi16
))
if
(
unlikely
(
!
abi16
))
...
@@ -423,6 +437,7 @@ nouveau_abi16_ioctl_notifierobj_alloc(ABI16_IOCTL_ARGS)
...
@@ -423,6 +437,7 @@ nouveau_abi16_ioctl_notifierobj_alloc(ABI16_IOCTL_ARGS)
/* completely unnecessary for these chipsets... */
/* completely unnecessary for these chipsets... */
if
(
unlikely
(
device
->
info
.
family
>=
NV_DEVICE_INFO_V0_FERMI
))
if
(
unlikely
(
device
->
info
.
family
>=
NV_DEVICE_INFO_V0_FERMI
))
return
nouveau_abi16_put
(
abi16
,
-
EINVAL
);
return
nouveau_abi16_put
(
abi16
,
-
EINVAL
);
client
=
nvif_client
(
nvif_object
(
&
abi16
->
device
));
chan
=
nouveau_abi16_chan
(
abi16
,
info
->
channel
);
chan
=
nouveau_abi16_chan
(
abi16
,
info
->
channel
);
if
(
!
chan
)
if
(
!
chan
)
...
@@ -440,28 +455,26 @@ nouveau_abi16_ioctl_notifierobj_alloc(ABI16_IOCTL_ARGS)
...
@@ -440,28 +455,26 @@ nouveau_abi16_ioctl_notifierobj_alloc(ABI16_IOCTL_ARGS)
if
(
ret
)
if
(
ret
)
goto
done
;
goto
done
;
args
.
start
=
ntfy
->
node
->
offset
;
args
.
ctxdma
.
start
=
ntfy
->
node
->
offset
;
args
.
limit
=
ntfy
->
node
->
offset
+
ntfy
->
node
->
length
-
1
;
args
.
ctxdma
.
limit
=
ntfy
->
node
->
offset
+
ntfy
->
node
->
length
-
1
;
if
(
device
->
info
.
family
>=
NV_DEVICE_INFO_V0_TESLA
)
{
if
(
device
->
info
.
family
>=
NV_DEVICE_INFO_V0_TESLA
)
{
args
.
flags
=
NV_DMA_TARGET_VM
|
NV_DMA_ACCESS_VM
;
args
.
ctxdma
.
flags
=
NV_DMA_TARGET_VM
|
NV_DMA_ACCESS_VM
;
args
.
start
+=
chan
->
ntfy_vma
.
offset
;
args
.
ctxdma
.
start
+=
chan
->
ntfy_vma
.
offset
;
args
.
limit
+=
chan
->
ntfy_vma
.
offset
;
args
.
ctxdma
.
limit
+=
chan
->
ntfy_vma
.
offset
;
}
else
}
else
if
(
drm
->
agp
.
stat
==
ENABLED
)
{
if
(
drm
->
agp
.
stat
==
ENABLED
)
{
args
.
flags
=
NV_DMA_TARGET_AGP
|
NV_DMA_ACCESS_RDWR
;
args
.
ctxdma
.
flags
=
NV_DMA_TARGET_AGP
|
NV_DMA_ACCESS_RDWR
;
args
.
start
+=
drm
->
agp
.
base
+
chan
->
ntfy
->
bo
.
offset
;
args
.
ctxdma
.
start
+=
drm
->
agp
.
base
+
chan
->
ntfy
->
bo
.
offset
;
args
.
limit
+=
drm
->
agp
.
base
+
chan
->
ntfy
->
bo
.
offset
;
args
.
ctxdma
.
limit
+=
drm
->
agp
.
base
+
chan
->
ntfy
->
bo
.
offset
;
client
->
super
=
true
;
}
else
{
}
else
{
args
.
flags
=
NV_DMA_TARGET_VM
|
NV_DMA_ACCESS_RDWR
;
args
.
ctxdma
.
flags
=
NV_DMA_TARGET_VM
|
NV_DMA_ACCESS_RDWR
;
args
.
start
+=
chan
->
ntfy
->
bo
.
offset
;
args
.
ctxdma
.
start
+=
chan
->
ntfy
->
bo
.
offset
;
args
.
limit
+=
chan
->
ntfy
->
bo
.
offset
;
args
.
ctxdma
.
limit
+=
chan
->
ntfy
->
bo
.
offset
;
}
}
/*XXX*/
ret
=
nvif_client_ioctl
(
client
,
&
args
,
sizeof
(
args
));
ret
=
nouveau_object_new
(
nv_object
(
nvkm_client
(
&
abi16
->
device
.
base
)),
client
->
super
=
false
;
NVDRM_CHAN
|
info
->
channel
,
ntfy
->
handle
,
NV_DMA_IN_MEMORY_CLASS
,
&
args
,
sizeof
(
args
),
&
object
);
if
(
ret
)
if
(
ret
)
goto
done
;
goto
done
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录