Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
4e7e62d6
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看板
提交
4e7e62d6
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/client: store default device by handle, not reference
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
102b49da
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
9 addition
and
16 deletion
+9
-16
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
+1
-1
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_drm.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/core/client.c
drivers/gpu/drm/nouveau/nvkm/core/client.c
+2
-9
drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
+5
-5
未找到文件。
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
浏览文件 @
4e7e62d6
...
...
@@ -5,7 +5,7 @@
struct
nvkm_client
{
struct
nvkm_namedb
namedb
;
struct
nvkm_handle
*
root
;
struct
nvkm_device
*
device
;
u64
device
;
char
name
[
32
];
u32
debug
;
struct
nvkm_vm
*
vm
;
...
...
drivers/gpu/drm/nouveau/nouveau_drm.c
浏览文件 @
4e7e62d6
...
...
@@ -507,7 +507,7 @@ nouveau_drm_device_remove(struct drm_device *dev)
dev
->
irq_enabled
=
false
;
client
=
nvxx_client
(
&
drm
->
client
.
base
);
device
=
client
->
device
;
device
=
nvkm_device_find
(
client
->
device
)
;
drm_put_dev
(
dev
);
nvkm_device_del
(
&
device
);
...
...
drivers/gpu/drm/nouveau/nvkm/core/client.c
浏览文件 @
4e7e62d6
...
...
@@ -219,7 +219,6 @@ nvkm_client_del(struct nvkm_client **pclient)
nvkm_client_fini
(
client
,
false
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
client
->
notify
);
i
++
)
nvkm_client_notify_del
(
client
,
i
);
nvkm_object_ref
(
NULL
,
(
struct
nvkm_object
**
)
&
client
->
device
);
nvkm_handle_destroy
(
client
->
root
);
nvkm_namedb_destroy
(
&
client
->
namedb
);
*
pclient
=
NULL
;
...
...
@@ -233,17 +232,12 @@ nvkm_client_sclass[] = {
};
int
nvkm_client_new
(
const
char
*
name
,
u64
dev
nam
e
,
const
char
*
cfg
,
nvkm_client_new
(
const
char
*
name
,
u64
dev
ic
e
,
const
char
*
cfg
,
const
char
*
dbg
,
struct
nvkm_client
**
pclient
)
{
struct
nvkm_device
*
device
;
struct
nvkm_client
*
client
;
int
ret
;
device
=
nvkm_device_find
(
devname
);
if
(
!
device
)
return
-
ENODEV
;
ret
=
nvkm_namedb_create
(
NULL
,
NULL
,
&
nvkm_client_oclass
,
NV_CLIENT_CLASS
,
nvkm_client_sclass
,
0
,
&
client
);
...
...
@@ -259,8 +253,7 @@ nvkm_client_new(const char *name, u64 devname, const char *cfg,
/* prevent init/fini being called, os in in charge of this */
atomic_set
(
&
nv_object
(
client
)
->
usecount
,
2
);
nvkm_object_ref
(
&
device
->
engine
.
subdev
.
object
,
(
struct
nvkm_object
**
)
&
client
->
device
);
client
->
device
=
device
;
snprintf
(
client
->
name
,
sizeof
(
client
->
name
),
"%s"
,
name
);
client
->
debug
=
nvkm_dbgopt
(
dbg
,
"CLIENT"
);
return
0
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
浏览文件 @
4e7e62d6
...
...
@@ -258,12 +258,12 @@ nvkm_udevice_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
oclass
=
&
nvkm_udevice_oclass_super
;
/* find the device subdev that matches what the client requested */
device
=
client
->
device
;
if
(
args
->
v0
.
device
!=
~
0
)
{
if
(
args
->
v0
.
device
!=
~
0
)
device
=
nvkm_device_find
(
args
->
v0
.
device
);
else
device
=
nvkm_device_find
(
client
->
device
);
if
(
!
device
)
return
-
ENODEV
;
}
ret
=
nvkm_parent_create
(
parent
,
NULL
,
oclass
,
0
,
nvkm_control_oclass
,
(
1ULL
<<
NVDEV_ENGINE_DMAOBJ
)
|
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录