Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
7caa63c0
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
7caa63c0
编写于
8月 11, 2014
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/nvif: fix a number of notify thinkos
Note to self: more sleep Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
27111a23
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
20 addition
and
11 deletion
+20
-11
drivers/gpu/drm/nouveau/core/core/client.c
drivers/gpu/drm/nouveau/core/core/client.c
+2
-2
drivers/gpu/drm/nouveau/core/include/core/client.h
drivers/gpu/drm/nouveau/core/include/core/client.h
+1
-1
drivers/gpu/drm/nouveau/nvif/notify.c
drivers/gpu/drm/nouveau/nvif/notify.c
+17
-8
未找到文件。
drivers/gpu/drm/nouveau/core/core/client.c
浏览文件 @
7caa63c0
...
@@ -132,12 +132,12 @@ nvkm_client_notify_new(struct nouveau_client *client,
...
@@ -132,12 +132,12 @@ nvkm_client_notify_new(struct nouveau_client *client,
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
client
->
notify
[
index
]
=
notify
;
client
->
notify
[
index
]
=
notify
;
notify
->
client
=
client
;
notify
->
client
=
client
;
return
0
;
return
index
;
}
}
}
}
kfree
(
notify
);
kfree
(
notify
);
return
0
;
return
ret
;
}
}
static
int
static
int
...
...
drivers/gpu/drm/nouveau/core/include/core/client.h
浏览文件 @
7caa63c0
...
@@ -14,7 +14,7 @@ struct nouveau_client {
...
@@ -14,7 +14,7 @@ struct nouveau_client {
void
*
data
;
void
*
data
;
int
(
*
ntfy
)(
const
void
*
,
u32
,
const
void
*
,
u32
);
int
(
*
ntfy
)(
const
void
*
,
u32
,
const
void
*
,
u32
);
struct
nvkm_client_notify
*
notify
[
8
];
struct
nvkm_client_notify
*
notify
[
16
];
};
};
static
inline
struct
nouveau_client
*
static
inline
struct
nouveau_client
*
...
...
drivers/gpu/drm/nouveau/nvif/notify.c
浏览文件 @
7caa63c0
...
@@ -87,12 +87,25 @@ nvif_notify_get(struct nvif_notify *notify)
...
@@ -87,12 +87,25 @@ nvif_notify_get(struct nvif_notify *notify)
return
0
;
return
0
;
}
}
static
inline
int
nvif_notify_func
(
struct
nvif_notify
*
notify
,
bool
keep
)
{
int
ret
=
notify
->
func
(
notify
);
if
(
ret
==
NVIF_NOTIFY_KEEP
||
!
test_and_clear_bit
(
NVKM_NOTIFY_USER
,
&
notify
->
flags
))
{
if
(
!
keep
)
atomic_dec
(
&
notify
->
putcnt
);
else
nvif_notify_get_
(
notify
);
}
return
ret
;
}
static
void
static
void
nvif_notify_work
(
struct
work_struct
*
work
)
nvif_notify_work
(
struct
work_struct
*
work
)
{
{
struct
nvif_notify
*
notify
=
container_of
(
work
,
typeof
(
*
notify
),
work
);
struct
nvif_notify
*
notify
=
container_of
(
work
,
typeof
(
*
notify
),
work
);
if
(
notify
->
func
(
notify
)
==
NVIF_NOTIFY_KEEP
)
nvif_notify_func
(
notify
,
true
);
nvif_notify_get_
(
notify
);
}
}
int
int
...
@@ -113,19 +126,15 @@ nvif_notify(const void *header, u32 length, const void *data, u32 size)
...
@@ -113,19 +126,15 @@ nvif_notify(const void *header, u32 length, const void *data, u32 size)
if
(
!
WARN_ON
(
notify
==
NULL
))
{
if
(
!
WARN_ON
(
notify
==
NULL
))
{
struct
nvif_client
*
client
=
nvif_client
(
notify
->
object
);
struct
nvif_client
*
client
=
nvif_client
(
notify
->
object
);
if
(
!
WARN_ON
(
notify
->
size
!=
size
))
{
if
(
!
WARN_ON
(
notify
->
size
!=
size
))
{
if
(
test_bit
(
NVIF_NOTIFY_WORK
,
&
notify
->
flags
))
{
atomic_inc
(
&
notify
->
putcnt
);
atomic_inc
(
&
notify
->
putcnt
);
if
(
test_bit
(
NVIF_NOTIFY_WORK
,
&
notify
->
flags
))
{
memcpy
((
void
*
)
notify
->
data
,
data
,
size
);
memcpy
((
void
*
)
notify
->
data
,
data
,
size
);
schedule_work
(
&
notify
->
work
);
schedule_work
(
&
notify
->
work
);
return
NVIF_NOTIFY_DROP
;
return
NVIF_NOTIFY_DROP
;
}
}
notify
->
data
=
data
;
notify
->
data
=
data
;
ret
=
n
otify
->
func
(
notify
);
ret
=
n
vif_notify_func
(
notify
,
client
->
driver
->
keep
);
notify
->
data
=
NULL
;
notify
->
data
=
NULL
;
if
(
ret
!=
NVIF_NOTIFY_DROP
&&
client
->
driver
->
keep
)
{
atomic_inc
(
&
notify
->
putcnt
);
nvif_notify_get_
(
notify
);
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录