Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
315a8b2e
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看板
提交
315a8b2e
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/nvif: use negative oclass identifier for internal classes
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
5c15bf70
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
29 addition
and
39 deletion
+29
-39
drivers/gpu/drm/nouveau/include/nvif/device.h
drivers/gpu/drm/nouveau/include/nvif/device.h
+1
-1
drivers/gpu/drm/nouveau/include/nvif/ioctl.h
drivers/gpu/drm/nouveau/include/nvif/ioctl.h
+5
-5
drivers/gpu/drm/nouveau/include/nvif/object.h
drivers/gpu/drm/nouveau/include/nvif/object.h
+3
-3
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
+1
-10
drivers/gpu/drm/nouveau/include/nvkm/core/object.h
drivers/gpu/drm/nouveau/include/nvkm/core/object.h
+1
-1
drivers/gpu/drm/nouveau/include/nvkm/core/parent.h
drivers/gpu/drm/nouveau/include/nvkm/core/parent.h
+2
-2
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_bo.c
+1
-1
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_drm.c
+1
-1
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/nouveau/nv50_display.c
+9
-9
drivers/gpu/drm/nouveau/nvif/device.c
drivers/gpu/drm/nouveau/nvif/device.c
+1
-1
drivers/gpu/drm/nouveau/nvif/object.c
drivers/gpu/drm/nouveau/nvif/object.c
+2
-3
drivers/gpu/drm/nouveau/nvkm/core/parent.c
drivers/gpu/drm/nouveau/nvkm/core/parent.c
+2
-2
未找到文件。
drivers/gpu/drm/nouveau/include/nvif/device.h
浏览文件 @
315a8b2e
...
...
@@ -9,7 +9,7 @@ struct nvif_device {
struct
nv_device_info_v0
info
;
};
int
nvif_device_init
(
struct
nvif_object
*
,
u32
handle
,
u
32
oclass
,
void
*
,
u32
,
int
nvif_device_init
(
struct
nvif_object
*
,
u32
handle
,
s
32
oclass
,
void
*
,
u32
,
struct
nvif_device
*
);
void
nvif_device_fini
(
struct
nvif_device
*
);
u64
nvif_device_time
(
struct
nvif_device
*
);
...
...
drivers/gpu/drm/nouveau/include/nvif/ioctl.h
浏览文件 @
315a8b2e
...
...
@@ -40,7 +40,7 @@ struct nvif_ioctl_sclass_v0 {
__u8
version
;
__u8
count
;
__u8
pad02
[
6
];
__
u
32
oclass
[];
__
s
32
oclass
[];
};
struct
nvif_ioctl_new_v0
{
...
...
@@ -52,10 +52,10 @@ struct nvif_ioctl_new_v0 {
__u64
object
;
__u32
handle
;
/* these class numbers are made up by us, and not nvidia-assigned */
#define NVIF_IOCTL_NEW_V0_
PERFMON 0x0000ffff
#define NVIF_IOCTL_NEW_V0_PERF
DOM 0x0000fffe
#define NVIF_IOCTL_NEW_V0_
CONTROL 0x0000fffd
__
u
32
oclass
;
#define NVIF_IOCTL_NEW_V0_
CONTROL -1
#define NVIF_IOCTL_NEW_V0_PERF
MON -2
#define NVIF_IOCTL_NEW_V0_
PERFDOM -3
__
s
32
oclass
;
__u8
data
[];
/* class data (class.h) */
};
...
...
drivers/gpu/drm/nouveau/include/nvif/object.h
浏览文件 @
315a8b2e
...
...
@@ -6,7 +6,7 @@
struct
nvif_object
{
struct
nvif_client
*
client
;
u32
handle
;
u
32
oclass
;
s
32
oclass
;
void
*
priv
;
/*XXX: hack */
struct
{
void
__iomem
*
ptr
;
...
...
@@ -14,11 +14,11 @@ struct nvif_object {
}
map
;
};
int
nvif_object_init
(
struct
nvif_object
*
,
u32
handle
,
u
32
oclass
,
void
*
,
u32
,
int
nvif_object_init
(
struct
nvif_object
*
,
u32
handle
,
s
32
oclass
,
void
*
,
u32
,
struct
nvif_object
*
);
void
nvif_object_fini
(
struct
nvif_object
*
);
int
nvif_object_ioctl
(
struct
nvif_object
*
,
void
*
,
u32
,
void
**
);
int
nvif_object_sclass
(
struct
nvif_object
*
,
u
32
*
,
int
);
int
nvif_object_sclass
(
struct
nvif_object
*
,
s
32
*
,
int
);
u32
nvif_object_rd
(
struct
nvif_object
*
,
int
,
u64
);
void
nvif_object_wr
(
struct
nvif_object
*
,
int
,
u64
,
u32
);
int
nvif_object_mthd
(
struct
nvif_object
*
,
u32
,
void
*
,
u32
);
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
浏览文件 @
315a8b2e
...
...
@@ -22,20 +22,11 @@ bool nvkm_client_insert(struct nvkm_client *, struct nvkm_handle *);
void
nvkm_client_remove
(
struct
nvkm_client
*
,
struct
nvkm_handle
*
);
struct
nvkm_handle
*
nvkm_client_search
(
struct
nvkm_client
*
,
u64
handle
);
static
inline
struct
nvkm_client
*
nv_client
(
void
*
obj
)
{
#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA
BUG_ON
(
!
nv_iclass
(
obj
,
NV_CLIENT_CLASS
));
#endif
return
obj
;
}
static
inline
struct
nvkm_client
*
nvkm_client
(
void
*
obj
)
{
struct
nvkm_object
*
client
=
nv_object
(
obj
);
while
(
client
&&
!
(
nv_iclass
(
client
,
NV_CLIENT_CLASS
))
)
while
(
client
&&
client
->
parent
)
client
=
client
->
parent
;
return
(
void
*
)
client
;
}
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/object.h
浏览文件 @
315a8b2e
...
...
@@ -62,7 +62,7 @@ extern struct nvkm_ofuncs nvkm_object_ofuncs;
/* Don't allocate dynamically, because lockdep needs lock_class_keys to be in
* ".data". */
struct
nvkm_oclass
{
u
32
handle
;
s
32
handle
;
struct
nvkm_ofuncs
*
const
ofuncs
;
struct
nvkm_omthds
*
const
omthds
;
struct
lock_class_key
lock_class_key
;
...
...
drivers/gpu/drm/nouveau/include/nvkm/core/parent.h
浏览文件 @
315a8b2e
...
...
@@ -44,8 +44,8 @@ void _nvkm_parent_dtor(struct nvkm_object *);
#define _nvkm_parent_init nvkm_object_init
#define _nvkm_parent_fini nvkm_object_fini
int
nvkm_parent_sclass
(
struct
nvkm_object
*
,
u16
handle
,
int
nvkm_parent_sclass
(
struct
nvkm_object
*
,
s32
handle
,
struct
nvkm_object
**
pengine
,
struct
nvkm_oclass
**
poclass
);
int
nvkm_parent_lclass
(
struct
nvkm_object
*
,
u
32
*
,
int
);
int
nvkm_parent_lclass
(
struct
nvkm_object
*
,
s
32
*
,
int
);
#endif
drivers/gpu/drm/nouveau/nouveau_bo.c
浏览文件 @
315a8b2e
...
...
@@ -1104,7 +1104,7 @@ nouveau_bo_move_init(struct nouveau_drm *drm)
static
const
struct
{
const
char
*
name
;
int
engine
;
u
32
oclass
;
s
32
oclass
;
int
(
*
exec
)(
struct
nouveau_channel
*
,
struct
ttm_buffer_object
*
,
struct
ttm_mem_reg
*
,
struct
ttm_mem_reg
*
);
...
...
drivers/gpu/drm/nouveau/nouveau_drm.c
浏览文件 @
315a8b2e
...
...
@@ -153,7 +153,7 @@ nouveau_accel_init(struct nouveau_drm *drm)
{
struct
nvif_device
*
device
=
&
drm
->
device
;
u32
arg0
,
arg1
;
u
32
sclass
[
16
];
s
32
sclass
[
16
];
int
ret
,
i
;
if
(
nouveau_noaccel
)
...
...
drivers/gpu/drm/nouveau/nv50_display.c
浏览文件 @
315a8b2e
...
...
@@ -65,11 +65,11 @@ struct nv50_chan {
static
int
nv50_chan_create
(
struct
nvif_device
*
device
,
struct
nvif_object
*
disp
,
const
u
32
*
oclass
,
u8
head
,
void
*
data
,
u32
size
,
const
s
32
*
oclass
,
u8
head
,
void
*
data
,
u32
size
,
struct
nv50_chan
*
chan
)
{
const
u32
handle
=
(
oclass
[
0
]
<<
16
)
|
head
;
u
32
sclass
[
8
];
s
32
sclass
[
8
];
int
ret
,
i
;
chan
->
device
=
device
;
...
...
@@ -117,7 +117,7 @@ nv50_pioc_destroy(struct nv50_pioc *pioc)
static
int
nv50_pioc_create
(
struct
nvif_device
*
device
,
struct
nvif_object
*
disp
,
const
u
32
*
oclass
,
u8
head
,
void
*
data
,
u32
size
,
const
s
32
*
oclass
,
u8
head
,
void
*
data
,
u32
size
,
struct
nv50_pioc
*
pioc
)
{
return
nv50_chan_create
(
device
,
disp
,
oclass
,
head
,
data
,
size
,
...
...
@@ -139,7 +139,7 @@ nv50_curs_create(struct nvif_device *device, struct nvif_object *disp,
struct
nv50_disp_cursor_v0
args
=
{
.
head
=
head
,
};
static
const
u
32
oclass
[]
=
{
static
const
s
32
oclass
[]
=
{
GK104_DISP_CURSOR
,
GF110_DISP_CURSOR
,
GT214_DISP_CURSOR
,
...
...
@@ -167,7 +167,7 @@ nv50_oimm_create(struct nvif_device *device, struct nvif_object *disp,
struct
nv50_disp_cursor_v0
args
=
{
.
head
=
head
,
};
static
const
u
32
oclass
[]
=
{
static
const
s
32
oclass
[]
=
{
GK104_DISP_OVERLAY
,
GF110_DISP_OVERLAY
,
GT214_DISP_OVERLAY
,
...
...
@@ -216,7 +216,7 @@ nv50_dmac_destroy(struct nv50_dmac *dmac, struct nvif_object *disp)
static
int
nv50_dmac_create
(
struct
nvif_device
*
device
,
struct
nvif_object
*
disp
,
const
u
32
*
oclass
,
u8
head
,
void
*
data
,
u32
size
,
u64
syncbuf
,
const
s
32
*
oclass
,
u8
head
,
void
*
data
,
u32
size
,
u64
syncbuf
,
struct
nv50_dmac
*
dmac
)
{
struct
nv50_disp_core_channel_dma_v0
*
args
=
data
;
...
...
@@ -288,7 +288,7 @@ nv50_core_create(struct nvif_device *device, struct nvif_object *disp,
struct
nv50_disp_core_channel_dma_v0
args
=
{
.
pushbuf
=
0xb0007d00
,
};
static
const
u
32
oclass
[]
=
{
static
const
s
32
oclass
[]
=
{
GM204_DISP_CORE_CHANNEL_DMA
,
GM107_DISP_CORE_CHANNEL_DMA
,
GK110_DISP_CORE_CHANNEL_DMA
,
...
...
@@ -324,7 +324,7 @@ nv50_base_create(struct nvif_device *device, struct nvif_object *disp,
.
pushbuf
=
0xb0007c00
|
head
,
.
head
=
head
,
};
static
const
u
32
oclass
[]
=
{
static
const
s
32
oclass
[]
=
{
GK110_DISP_BASE_CHANNEL_DMA
,
GK104_DISP_BASE_CHANNEL_DMA
,
GF110_DISP_BASE_CHANNEL_DMA
,
...
...
@@ -355,7 +355,7 @@ nv50_ovly_create(struct nvif_device *device, struct nvif_object *disp,
.
pushbuf
=
0xb0007e00
|
head
,
.
head
=
head
,
};
static
const
u
32
oclass
[]
=
{
static
const
s
32
oclass
[]
=
{
GK104_DISP_OVERLAY_CONTROL_DMA
,
GF110_DISP_OVERLAY_CONTROL_DMA
,
GT214_DISP_OVERLAY_CHANNEL_DMA
,
...
...
drivers/gpu/drm/nouveau/nvif/device.c
浏览文件 @
315a8b2e
...
...
@@ -37,7 +37,7 @@ nvif_device_fini(struct nvif_device *device)
}
int
nvif_device_init
(
struct
nvif_object
*
parent
,
u32
handle
,
u
32
oclass
,
nvif_device_init
(
struct
nvif_object
*
parent
,
u32
handle
,
s
32
oclass
,
void
*
data
,
u32
size
,
struct
nvif_device
*
device
)
{
int
ret
=
nvif_object_init
(
parent
,
handle
,
oclass
,
data
,
size
,
...
...
drivers/gpu/drm/nouveau/nvif/object.c
浏览文件 @
315a8b2e
...
...
@@ -49,7 +49,7 @@ nvif_object_ioctl(struct nvif_object *object, void *data, u32 size, void **hack)
}
int
nvif_object_sclass
(
struct
nvif_object
*
object
,
u
32
*
oclass
,
int
count
)
nvif_object_sclass
(
struct
nvif_object
*
object
,
s
32
*
oclass
,
int
count
)
{
struct
{
struct
nvif_ioctl_v0
ioctl
;
...
...
@@ -65,7 +65,6 @@ nvif_object_sclass(struct nvif_object *object, u32 *oclass, int count)
args
->
sclass
.
version
=
0
;
args
->
sclass
.
count
=
count
;
memcpy
(
args
->
sclass
.
oclass
,
oclass
,
size
);
ret
=
nvif_object_ioctl
(
object
,
args
,
sizeof
(
*
args
)
+
size
,
NULL
);
ret
=
ret
?
ret
:
args
->
sclass
.
count
;
memcpy
(
oclass
,
args
->
sclass
.
oclass
,
size
);
...
...
@@ -203,7 +202,7 @@ nvif_object_fini(struct nvif_object *object)
}
int
nvif_object_init
(
struct
nvif_object
*
parent
,
u32
handle
,
u
32
oclass
,
nvif_object_init
(
struct
nvif_object
*
parent
,
u32
handle
,
s
32
oclass
,
void
*
data
,
u32
size
,
struct
nvif_object
*
object
)
{
struct
{
...
...
drivers/gpu/drm/nouveau/nvkm/core/parent.c
浏览文件 @
315a8b2e
...
...
@@ -26,7 +26,7 @@
#include <core/engine.h>
int
nvkm_parent_sclass
(
struct
nvkm_object
*
parent
,
u16
handle
,
nvkm_parent_sclass
(
struct
nvkm_object
*
parent
,
s32
handle
,
struct
nvkm_object
**
pengine
,
struct
nvkm_oclass
**
poclass
)
{
...
...
@@ -66,7 +66,7 @@ nvkm_parent_sclass(struct nvkm_object *parent, u16 handle,
}
int
nvkm_parent_lclass
(
struct
nvkm_object
*
parent
,
u
32
*
lclass
,
int
size
)
nvkm_parent_lclass
(
struct
nvkm_object
*
parent
,
s
32
*
lclass
,
int
size
)
{
struct
nvkm_oclass
*
sclass
,
*
oclass
;
struct
nvkm_engine
*
engine
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录