Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
267dcb66
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看板
提交
267dcb66
编写于
2月 24, 2014
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/gm107/fb: initial implementation
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
57f74220
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
109 addition
and
8 deletion
+109
-8
drivers/gpu/drm/nouveau/Makefile
drivers/gpu/drm/nouveau/Makefile
+2
-0
drivers/gpu/drm/nouveau/core/include/subdev/fb.h
drivers/gpu/drm/nouveau/core/include/subdev/fb.h
+1
-0
drivers/gpu/drm/nouveau/core/subdev/fb/gm107.c
drivers/gpu/drm/nouveau/core/subdev/fb/gm107.c
+38
-0
drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.h
drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.h
+5
-3
drivers/gpu/drm/nouveau/core/subdev/fb/priv.h
drivers/gpu/drm/nouveau/core/subdev/fb/priv.h
+1
-0
drivers/gpu/drm/nouveau/core/subdev/fb/ramgm107.c
drivers/gpu/drm/nouveau/core/subdev/fb/ramgm107.c
+56
-0
drivers/gpu/drm/nouveau/core/subdev/fb/ramnvc0.c
drivers/gpu/drm/nouveau/core/subdev/fb/ramnvc0.c
+4
-3
drivers/gpu/drm/nouveau/core/subdev/fb/ramnve0.c
drivers/gpu/drm/nouveau/core/subdev/fb/ramnve0.c
+2
-2
未找到文件。
drivers/gpu/drm/nouveau/Makefile
浏览文件 @
267dcb66
...
...
@@ -101,6 +101,7 @@ nouveau-y += core/subdev/fb/nvaa.o
nouveau-y
+=
core/subdev/fb/nvaf.o
nouveau-y
+=
core/subdev/fb/nvc0.o
nouveau-y
+=
core/subdev/fb/nve0.o
nouveau-y
+=
core/subdev/fb/gm107.o
nouveau-y
+=
core/subdev/fb/ramnv04.o
nouveau-y
+=
core/subdev/fb/ramnv10.o
nouveau-y
+=
core/subdev/fb/ramnv1a.o
...
...
@@ -115,6 +116,7 @@ nouveau-y += core/subdev/fb/ramnva3.o
nouveau-y
+=
core/subdev/fb/ramnvaa.o
nouveau-y
+=
core/subdev/fb/ramnvc0.o
nouveau-y
+=
core/subdev/fb/ramnve0.o
nouveau-y
+=
core/subdev/fb/ramgm107.o
nouveau-y
+=
core/subdev/fb/sddr3.o
nouveau-y
+=
core/subdev/fb/gddr5.o
nouveau-y
+=
core/subdev/gpio/base.o
...
...
drivers/gpu/drm/nouveau/core/include/subdev/fb.h
浏览文件 @
267dcb66
...
...
@@ -105,6 +105,7 @@ extern struct nouveau_oclass *nvaa_fb_oclass;
extern
struct
nouveau_oclass
*
nvaf_fb_oclass
;
extern
struct
nouveau_oclass
*
nvc0_fb_oclass
;
extern
struct
nouveau_oclass
*
nve0_fb_oclass
;
extern
struct
nouveau_oclass
*
gm107_fb_oclass
;
#include <subdev/bios/ramcfg.h>
...
...
drivers/gpu/drm/nouveau/core/subdev/fb/gm107.c
0 → 100644
浏览文件 @
267dcb66
/*
* Copyright 2012 Red Hat Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Authors: Ben Skeggs
*/
#include "nvc0.h"
struct
nouveau_oclass
*
gm107_fb_oclass
=
&
(
struct
nouveau_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x07
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nvc0_fb_ctor
,
.
dtor
=
nvc0_fb_dtor
,
.
init
=
nvc0_fb_init
,
.
fini
=
_nouveau_fb_fini
,
},
.
memtype
=
nvc0_fb_memtype_valid
,
.
ram
=
&
gm107_ram_oclass
,
}.
base
;
drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.h
浏览文件 @
267dcb66
...
...
@@ -18,12 +18,14 @@ int nvc0_fb_init(struct nouveau_object *);
bool
nvc0_fb_memtype_valid
(
struct
nouveau_fb
*
,
u32
);
#define nvc0_ram_create(p,e,o,
d)
\
nvc0_ram_create_((p), (e), (o), sizeof(**d), (void **)d)
#define nvc0_ram_create(p,e,o,
m,d)
\
nvc0_ram_create_((p), (e), (o),
(m),
sizeof(**d), (void **)d)
int
nvc0_ram_create_
(
struct
nouveau_object
*
,
struct
nouveau_object
*
,
struct
nouveau_oclass
*
,
int
,
void
**
);
struct
nouveau_oclass
*
,
u32
,
int
,
void
**
);
int
nvc0_ram_get
(
struct
nouveau_fb
*
,
u64
,
u32
,
u32
,
u32
,
struct
nouveau_mem
**
);
void
nvc0_ram_put
(
struct
nouveau_fb
*
,
struct
nouveau_mem
**
);
int
nve0_ram_init
(
struct
nouveau_object
*
);
#endif
drivers/gpu/drm/nouveau/core/subdev/fb/priv.h
浏览文件 @
267dcb66
...
...
@@ -32,6 +32,7 @@ extern struct nouveau_oclass nva3_ram_oclass;
extern
struct
nouveau_oclass
nvaa_ram_oclass
;
extern
struct
nouveau_oclass
nvc0_ram_oclass
;
extern
struct
nouveau_oclass
nve0_ram_oclass
;
extern
struct
nouveau_oclass
gm107_ram_oclass
;
int
nouveau_sddr3_calc
(
struct
nouveau_ram
*
ram
);
int
nouveau_gddr5_calc
(
struct
nouveau_ram
*
ram
,
bool
nuts
);
...
...
drivers/gpu/drm/nouveau/core/subdev/fb/ramgm107.c
0 → 100644
浏览文件 @
267dcb66
/*
* Copyright 2013 Red Hat Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Authors: Ben Skeggs
*/
#include "nvc0.h"
struct
gm107_ram
{
struct
nouveau_ram
base
;
};
static
int
gm107_ram_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
gm107_ram
*
ram
;
int
ret
;
ret
=
nvc0_ram_create
(
parent
,
engine
,
oclass
,
0x021c14
,
&
ram
);
*
pobject
=
nv_object
(
ram
);
if
(
ret
)
return
ret
;
return
0
;
}
struct
nouveau_oclass
gm107_ram_oclass
=
{
.
handle
=
0
,
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
gm107_ram_ctor
,
.
dtor
=
_nouveau_ram_dtor
,
.
init
=
nve0_ram_init
,
.
fini
=
_nouveau_ram_fini
,
}
};
drivers/gpu/drm/nouveau/core/subdev/fb/ramnvc0.c
浏览文件 @
267dcb66
...
...
@@ -505,7 +505,8 @@ nvc0_ram_get(struct nouveau_fb *pfb, u64 size, u32 align, u32 ncmin,
int
nvc0_ram_create_
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
int
size
,
void
**
pobject
)
struct
nouveau_oclass
*
oclass
,
u32
maskaddr
,
int
size
,
void
**
pobject
)
{
struct
nouveau_fb
*
pfb
=
nouveau_fb
(
parent
);
struct
nouveau_bios
*
bios
=
nouveau_bios
(
pfb
);
...
...
@@ -513,7 +514,7 @@ nvc0_ram_create_(struct nouveau_object *parent, struct nouveau_object *engine,
const
u32
rsvd_head
=
(
256
*
1024
)
>>
12
;
/* vga memory */
const
u32
rsvd_tail
=
(
1024
*
1024
)
>>
12
;
/* vbios etc */
u32
parts
=
nv_rd32
(
pfb
,
0x022438
);
u32
pmask
=
nv_rd32
(
pfb
,
0x022554
);
u32
pmask
=
nv_rd32
(
pfb
,
maskaddr
);
u32
bsize
=
nv_rd32
(
pfb
,
0x10f20c
);
u32
offset
,
length
;
bool
uniform
=
true
;
...
...
@@ -630,7 +631,7 @@ nvc0_ram_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct
nvc0_ram
*
ram
;
int
ret
;
ret
=
nvc0_ram_create
(
parent
,
engine
,
oclass
,
&
ram
);
ret
=
nvc0_ram_create
(
parent
,
engine
,
oclass
,
0x022554
,
&
ram
);
*
pobject
=
nv_object
(
ram
);
if
(
ret
)
return
ret
;
...
...
drivers/gpu/drm/nouveau/core/subdev/fb/ramnve0.c
浏览文件 @
267dcb66
...
...
@@ -1123,7 +1123,7 @@ nve0_ram_tidy(struct nouveau_fb *pfb)
ram_exec
(
fuc
,
false
);
}
static
int
int
nve0_ram_init
(
struct
nouveau_object
*
object
)
{
struct
nouveau_fb
*
pfb
=
(
void
*
)
object
->
parent
;
...
...
@@ -1226,7 +1226,7 @@ nve0_ram_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
int
ret
,
i
;
u32
tmp
;
ret
=
nvc0_ram_create
(
parent
,
engine
,
oclass
,
&
ram
);
ret
=
nvc0_ram_create
(
parent
,
engine
,
oclass
,
0x022554
,
&
ram
);
*
pobject
=
nv_object
(
ram
);
if
(
ret
)
return
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录