Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
47b2505e
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看板
提交
47b2505e
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/platform: remove subclassing of nvkm_device
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
f2c906fc
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
25 addition
and
40 deletion
+25
-40
drivers/gpu/drm/nouveau/include/nvkm/core/device.h
drivers/gpu/drm/nouveau/include/nvkm/core/device.h
+2
-0
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_drm.c
+7
-7
drivers/gpu/drm/nouveau/nouveau_drm.h
drivers/gpu/drm/nouveau/nouveau_drm.h
+1
-4
drivers/gpu/drm/nouveau/nouveau_platform.c
drivers/gpu/drm/nouveau/nouveau_platform.c
+3
-3
drivers/gpu/drm/nouveau/nouveau_platform.h
drivers/gpu/drm/nouveau/nouveau_platform.h
+0
-10
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c
+2
-3
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+6
-7
drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
+4
-6
未找到文件。
drivers/gpu/drm/nouveau/include/nvkm/core/device.h
浏览文件 @
47b2505e
...
...
@@ -144,6 +144,8 @@ struct nvkm_device {
struct
nvkm_sw
*
sw
;
struct
nvkm_engine
*
vic
;
struct
nvkm_engine
*
vp
;
struct
nouveau_platform_gpu
*
gpu
;
};
struct
nvkm_device
*
nvkm_device_find
(
u64
name
);
...
...
drivers/gpu/drm/nouveau/nouveau_drm.c
浏览文件 @
47b2505e
...
...
@@ -1056,16 +1056,16 @@ nouveau_drm_pci_driver = {
};
struct
drm_device
*
nouveau_platform_device_create
_
(
struct
platform_device
*
pdev
,
int
size
,
void
**
pobject
)
nouveau_platform_device_create
(
struct
platform_device
*
pdev
,
struct
nvkm_device
**
pdevice
)
{
struct
drm_device
*
drm
;
int
err
;
err
=
nvkm_device_create
_
(
pdev
,
NVKM_BUS_PLATFORM
,
nouveau_platform_name
(
pdev
),
dev_name
(
&
pdev
->
dev
),
nouveau_config
,
nouveau_debug
,
size
,
pobject
);
err
=
nvkm_device_create
(
pdev
,
NVKM_BUS_PLATFORM
,
nouveau_platform_name
(
pdev
),
dev_name
(
&
pdev
->
dev
),
nouveau_config
,
nouveau_debug
,
pdevice
);
if
(
err
)
return
ERR_PTR
(
err
);
...
...
@@ -1085,7 +1085,7 @@ nouveau_platform_device_create_(struct platform_device *pdev, int size,
return
drm
;
err_free:
nvkm_object_ref
(
NULL
,
(
struct
nvkm_object
**
)
p
object
);
nvkm_object_ref
(
NULL
,
(
struct
nvkm_object
**
)
p
device
);
return
ERR_PTR
(
err
);
}
...
...
drivers/gpu/drm/nouveau/nouveau_drm.h
浏览文件 @
47b2505e
...
...
@@ -182,11 +182,8 @@ nouveau_drm(struct drm_device *dev)
int
nouveau_pmops_suspend
(
struct
device
*
);
int
nouveau_pmops_resume
(
struct
device
*
);
#define nouveau_platform_device_create(p, u) \
nouveau_platform_device_create_(p, sizeof(**u), (void **)u)
struct
drm_device
*
nouveau_platform_device_create_
(
struct
platform_device
*
pdev
,
int
size
,
void
**
pobject
);
nouveau_platform_device_create
(
struct
platform_device
*
,
struct
nvkm_device
**
);
void
nouveau_drm_device_remove
(
struct
drm_device
*
dev
);
#define NV_PRINTK(l,c,f,a...) do { \
...
...
drivers/gpu/drm/nouveau/nouveau_platform.c
浏览文件 @
47b2505e
...
...
@@ -177,7 +177,7 @@ static void nouveau_platform_remove_iommu(struct device *dev,
static
int
nouveau_platform_probe
(
struct
platform_device
*
pdev
)
{
struct
nouveau_platform_gpu
*
gpu
;
struct
n
ouveau_platfor
m_device
*
device
;
struct
n
vk
m_device
*
device
;
struct
drm_device
*
drm
;
int
err
;
...
...
@@ -214,7 +214,7 @@ static int nouveau_platform_probe(struct platform_device *pdev)
}
device
->
gpu
=
gpu
;
device
->
gpu_speedo
=
tegra_sku_info
.
gpu_speedo_value
;
gpu
->
gpu_speedo
=
tegra_sku_info
.
gpu_speedo_value
;
err
=
drm_dev_register
(
drm
,
0
);
if
(
err
<
0
)
...
...
@@ -237,7 +237,7 @@ static int nouveau_platform_remove(struct platform_device *pdev)
struct
drm_device
*
drm_dev
=
platform_get_drvdata
(
pdev
);
struct
nouveau_drm
*
drm
=
nouveau_drm
(
drm_dev
);
struct
nvkm_device
*
device
=
nvxx_device
(
&
drm
->
device
);
struct
nouveau_platform_gpu
*
gpu
=
nv_device_to_platform
(
device
)
->
gpu
;
struct
nouveau_platform_gpu
*
gpu
=
device
->
gpu
;
int
err
;
nouveau_drm_device_remove
(
drm_dev
);
...
...
drivers/gpu/drm/nouveau/nouveau_platform.h
浏览文件 @
47b2505e
...
...
@@ -54,19 +54,9 @@ struct nouveau_platform_gpu {
struct
iommu_domain
*
domain
;
unsigned
long
pgshift
;
}
iommu
;
};
struct
nouveau_platform_device
{
struct
nvkm_device
device
;
struct
nouveau_platform_gpu
*
gpu
;
int
gpu_speedo
;
};
#define nv_device_to_platform(d) \
container_of(d, struct nouveau_platform_device, device)
extern
struct
platform_driver
nouveau_platform_driver
;
#endif
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c
浏览文件 @
47b2505e
...
...
@@ -650,8 +650,8 @@ gk20a_clk_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nvkm_object
**
pobject
)
{
struct
nvkm_device
*
device
=
(
void
*
)
parent
;
struct
gk20a_clk
*
clk
;
struct
nouveau_platform_device
*
plat
;
int
ret
;
int
i
;
...
...
@@ -670,8 +670,7 @@ gk20a_clk_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
clk
->
params
=
&
gk20a_pllg_params
;
plat
=
nv_device_to_platform
(
nv_device
(
parent
));
clk
->
parent_rate
=
clk_get_rate
(
plat
->
gpu
->
clk
);
clk
->
parent_rate
=
clk_get_rate
(
device
->
gpu
->
clk
);
nvkm_info
(
&
clk
->
base
.
subdev
,
"parent clock rate: %d Mhz
\n
"
,
clk
->
parent_rate
/
MHZ
);
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
浏览文件 @
47b2505e
...
...
@@ -396,8 +396,8 @@ gk20a_instmem_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nvkm_object
**
pobject
)
{
struct
nvkm_device
*
device
=
(
void
*
)
parent
;
struct
gk20a_instmem
*
imem
;
struct
nouveau_platform_device
*
plat
;
int
ret
;
ret
=
nvkm_instmem_create
(
parent
,
engine
,
oclass
,
&
imem
);
...
...
@@ -407,12 +407,11 @@ gk20a_instmem_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
spin_lock_init
(
&
imem
->
lock
);
plat
=
nv_device_to_platform
(
nv_device
(
parent
));
if
(
plat
->
gpu
->
iommu
.
domain
)
{
imem
->
domain
=
plat
->
gpu
->
iommu
.
domain
;
imem
->
mm
=
plat
->
gpu
->
iommu
.
mm
;
imem
->
iommu_pgshift
=
plat
->
gpu
->
iommu
.
pgshift
;
imem
->
mm_mutex
=
&
plat
->
gpu
->
iommu
.
mutex
;
if
(
device
->
gpu
->
iommu
.
domain
)
{
imem
->
domain
=
device
->
gpu
->
iommu
.
domain
;
imem
->
mm
=
device
->
gpu
->
iommu
.
mm
;
imem
->
iommu_pgshift
=
device
->
gpu
->
iommu
.
pgshift
;
imem
->
mm_mutex
=
&
device
->
gpu
->
iommu
.
mutex
;
nvkm_info
(
&
imem
->
base
.
subdev
,
"using IOMMU
\n
"
);
}
else
{
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c
浏览文件 @
47b2505e
...
...
@@ -152,8 +152,8 @@ gk20a_volt_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nvkm_object
**
pobject
)
{
struct
nvkm_device
*
device
=
(
void
*
)
parent
;
struct
gk20a_volt
*
volt
;
struct
nouveau_platform_device
*
plat
;
int
i
,
ret
,
uv
;
ret
=
nvkm_volt_create
(
parent
,
engine
,
oclass
,
&
volt
);
...
...
@@ -161,12 +161,10 @@ gk20a_volt_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
return
ret
;
plat
=
nv_device_to_platform
(
nv_device
(
parent
));
uv
=
regulator_get_voltage
(
plat
->
gpu
->
vdd
);
uv
=
regulator_get_voltage
(
device
->
gpu
->
vdd
);
nvkm_info
(
&
volt
->
base
.
subdev
,
"The default voltage is %duV
\n
"
,
uv
);
volt
->
vdd
=
plat
->
gpu
->
vdd
;
volt
->
vdd
=
device
->
gpu
->
vdd
;
volt
->
base
.
vid_get
=
gk20a_volt_vid_get
;
volt
->
base
.
vid_set
=
gk20a_volt_vid_set
;
volt
->
base
.
set_id
=
gk20a_volt_set_id
;
...
...
@@ -178,7 +176,7 @@ gk20a_volt_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
volt
->
base
.
vid
[
i
].
vid
=
i
;
volt
->
base
.
vid
[
i
].
uv
=
gk20a_volt_calc_voltage
(
&
gk20a_cvb_coef
[
i
],
plat
->
gpu_speedo
);
device
->
gpu
->
gpu_speedo
);
nvkm_debug
(
&
volt
->
base
.
subdev
,
"%2d: vid=%d, uv=%d
\n
"
,
i
,
volt
->
base
.
vid
[
i
].
vid
,
volt
->
base
.
vid
[
i
].
uv
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录