Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
fd47877f
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fd47877f
编写于
7月 09, 2016
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/disp/gp104: initial support
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
15cec92f
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
394 addition
and
5 deletion
+394
-5
drivers/gpu/drm/nouveau/include/nvif/class.h
drivers/gpu/drm/nouveau/include/nvif/class.h
+2
-0
drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h
drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h
+1
-0
drivers/gpu/drm/nouveau/nouveau_display.c
drivers/gpu/drm/nouveau/nouveau_display.c
+1
-0
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/nouveau/nv50_display.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
+6
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/basegp104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/basegp104.c
+38
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.h
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/coregf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/coregf119.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/disp/coregp104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/coregp104.c
+78
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgp104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgp104.c
+66
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.h
+8
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/gp104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gp104.c
+81
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h
+2
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/ovlygk104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/ovlygk104.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/disp/ovlygp104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/ovlygp104.c
+38
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgp104.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgp104.c
+58
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h
+1
-0
未找到文件。
drivers/gpu/drm/nouveau/include/nvif/class.h
浏览文件 @
fd47877f
...
...
@@ -52,6 +52,7 @@
#define GM107_DISP
/* cl5070.h */
0x00009470
#define GM200_DISP
/* cl5070.h */
0x00009570
#define GP100_DISP
/* cl5070.h */
0x00009770
#define GP104_DISP
/* cl5070.h */
0x00009870
#define NV31_MPEG 0x00003174
#define G82_MPEG 0x00008274
...
...
@@ -89,6 +90,7 @@
#define GM107_DISP_CORE_CHANNEL_DMA
/* cl507d.h */
0x0000947d
#define GM200_DISP_CORE_CHANNEL_DMA
/* cl507d.h */
0x0000957d
#define GP100_DISP_CORE_CHANNEL_DMA
/* cl507d.h */
0x0000977d
#define GP104_DISP_CORE_CHANNEL_DMA
/* cl507d.h */
0x0000987d
#define NV50_DISP_OVERLAY_CHANNEL_DMA
/* cl507e.h */
0x0000507e
#define G82_DISP_OVERLAY_CHANNEL_DMA
/* cl507e.h */
0x0000827e
...
...
drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h
浏览文件 @
fd47877f
...
...
@@ -33,4 +33,5 @@ int gk110_disp_new(struct nvkm_device *, int, struct nvkm_disp **);
int
gm107_disp_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_disp
**
);
int
gm200_disp_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_disp
**
);
int
gp100_disp_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_disp
**
);
int
gp104_disp_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_disp
**
);
#endif
drivers/gpu/drm/nouveau/nouveau_display.c
浏览文件 @
fd47877f
...
...
@@ -495,6 +495,7 @@ nouveau_display_create(struct drm_device *dev)
if
(
nouveau_modeset
!=
2
&&
drm
->
vbios
.
dcb
.
entries
)
{
static
const
u16
oclass
[]
=
{
GP104_DISP
,
GP100_DISP
,
GM200_DISP
,
GM107_DISP
,
...
...
drivers/gpu/drm/nouveau/nv50_display.c
浏览文件 @
fd47877f
...
...
@@ -297,6 +297,7 @@ nv50_core_create(struct nvif_device *device, struct nvif_object *disp,
.
pushbuf
=
0xb0007d00
,
};
static
const
s32
oclass
[]
=
{
GP104_DISP_CORE_CHANNEL_DMA
,
GP100_DISP_CORE_CHANNEL_DMA
,
GM200_DISP_CORE_CHANNEL_DMA
,
GM107_DISP_CORE_CHANNEL_DMA
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
浏览文件 @
fd47877f
...
...
@@ -2200,6 +2200,7 @@ nv134_chipset = {
.
pci
=
gp100_pci_new
,
.
timer
=
gk20a_timer_new
,
.
top
=
gk104_top_new
,
.
disp
=
gp104_disp_new
,
.
dma
=
gf119_dma_new
,
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
浏览文件 @
fd47877f
...
...
@@ -11,6 +11,7 @@ nvkm-y += nvkm/engine/disp/gk110.o
nvkm-y += nvkm/engine/disp/gm107.o
nvkm-y += nvkm/engine/disp/gm200.o
nvkm-y += nvkm/engine/disp/gp100.o
nvkm-y += nvkm/engine/disp/gp104.o
nvkm-y += nvkm/engine/disp/outp.o
nvkm-y += nvkm/engine/disp/outpdp.o
...
...
@@ -47,12 +48,14 @@ nvkm-y += nvkm/engine/disp/rootgk110.o
nvkm-y += nvkm/engine/disp/rootgm107.o
nvkm-y += nvkm/engine/disp/rootgm200.o
nvkm-y += nvkm/engine/disp/rootgp100.o
nvkm-y += nvkm/engine/disp/rootgp104.o
nvkm-y += nvkm/engine/disp/channv50.o
nvkm-y += nvkm/engine/disp/changf119.o
nvkm-y += nvkm/engine/disp/dmacnv50.o
nvkm-y += nvkm/engine/disp/dmacgf119.o
nvkm-y += nvkm/engine/disp/dmacgp104.o
nvkm-y += nvkm/engine/disp/basenv50.o
nvkm-y += nvkm/engine/disp/baseg84.o
...
...
@@ -61,6 +64,7 @@ nvkm-y += nvkm/engine/disp/basegt215.o
nvkm-y += nvkm/engine/disp/basegf119.o
nvkm-y += nvkm/engine/disp/basegk104.o
nvkm-y += nvkm/engine/disp/basegk110.o
nvkm-y += nvkm/engine/disp/basegp104.o
nvkm-y += nvkm/engine/disp/corenv50.o
nvkm-y += nvkm/engine/disp/coreg84.o
...
...
@@ -73,6 +77,7 @@ nvkm-y += nvkm/engine/disp/coregk110.o
nvkm-y += nvkm/engine/disp/coregm107.o
nvkm-y += nvkm/engine/disp/coregm200.o
nvkm-y += nvkm/engine/disp/coregp100.o
nvkm-y += nvkm/engine/disp/coregp104.o
nvkm-y += nvkm/engine/disp/ovlynv50.o
nvkm-y += nvkm/engine/disp/ovlyg84.o
...
...
@@ -80,6 +85,7 @@ nvkm-y += nvkm/engine/disp/ovlygt200.o
nvkm-y += nvkm/engine/disp/ovlygt215.o
nvkm-y += nvkm/engine/disp/ovlygf119.o
nvkm-y += nvkm/engine/disp/ovlygk104.o
nvkm-y += nvkm/engine/disp/ovlygp104.o
nvkm-y += nvkm/engine/disp/piocnv50.o
nvkm-y += nvkm/engine/disp/piocgf119.o
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/basegp104.c
0 → 100644
浏览文件 @
fd47877f
/*
* Copyright 2016 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 <bskeggs@redhat.com>
*/
#include "dmacnv50.h"
#include "rootnv50.h"
#include <nvif/class.h>
const
struct
nv50_disp_dmac_oclass
gp104_disp_base_oclass
=
{
.
base
.
oclass
=
GK110_DISP_BASE_CHANNEL_DMA
,
.
base
.
minver
=
0
,
.
base
.
maxver
=
0
,
.
ctor
=
nv50_disp_base_new
,
.
func
=
&
gp104_disp_dmac_func
,
.
mthd
=
&
gf119_disp_base_chan_mthd
,
.
chid
=
1
,
};
drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.h
浏览文件 @
fd47877f
...
...
@@ -85,6 +85,7 @@ extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_pior;
extern
const
struct
nv50_disp_chan_mthd
gf119_disp_base_chan_mthd
;
extern
const
struct
nv50_disp_chan_mthd
gk104_disp_core_chan_mthd
;
extern
const
struct
nv50_disp_chan_mthd
gk104_disp_ovly_chan_mthd
;
struct
nv50_disp_pioc_oclass
{
int
(
*
ctor
)(
const
struct
nv50_disp_chan_func
*
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/coregf119.c
浏览文件 @
fd47877f
...
...
@@ -171,7 +171,7 @@ gf119_disp_core_chan_mthd = {
}
};
static
void
void
gf119_disp_core_fini
(
struct
nv50_disp_dmac
*
chan
)
{
struct
nv50_disp
*
disp
=
chan
->
base
.
root
->
disp
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/coregp104.c
0 → 100644
浏览文件 @
fd47877f
/*
* Copyright 2016 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 <bskeggs@redhat.com>
*/
#include "dmacnv50.h"
#include "rootnv50.h"
#include <subdev/timer.h>
#include <nvif/class.h>
static
int
gp104_disp_core_init
(
struct
nv50_disp_dmac
*
chan
)
{
struct
nv50_disp
*
disp
=
chan
->
base
.
root
->
disp
;
struct
nvkm_subdev
*
subdev
=
&
disp
->
base
.
engine
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
/* enable error reporting */
nvkm_mask
(
device
,
0x6100a0
,
0x00000001
,
0x00000001
);
/* initialise channel for dma command submission */
nvkm_wr32
(
device
,
0x611494
,
chan
->
push
);
nvkm_wr32
(
device
,
0x611498
,
0x00010000
);
nvkm_wr32
(
device
,
0x61149c
,
0x00000001
);
nvkm_mask
(
device
,
0x610490
,
0x00000010
,
0x00000010
);
nvkm_wr32
(
device
,
0x640000
,
0x00000000
);
nvkm_wr32
(
device
,
0x610490
,
0x01000013
);
/* wait for it to go inactive */
if
(
nvkm_msec
(
device
,
2000
,
if
(
!
(
nvkm_rd32
(
device
,
0x610490
)
&
0x80000000
))
break
;
)
<
0
)
{
nvkm_error
(
subdev
,
"core init: %08x
\n
"
,
nvkm_rd32
(
device
,
0x610490
));
return
-
EBUSY
;
}
return
0
;
}
const
struct
nv50_disp_dmac_func
gp104_disp_core_func
=
{
.
init
=
gp104_disp_core_init
,
.
fini
=
gf119_disp_core_fini
,
.
bind
=
gf119_disp_dmac_bind
,
};
const
struct
nv50_disp_dmac_oclass
gp104_disp_core_oclass
=
{
.
base
.
oclass
=
GP104_DISP_CORE_CHANNEL_DMA
,
.
base
.
minver
=
0
,
.
base
.
maxver
=
0
,
.
ctor
=
nv50_disp_core_new
,
.
func
=
&
gp104_disp_core_func
,
.
mthd
=
&
gk104_disp_core_chan_mthd
,
.
chid
=
0
,
};
drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c
浏览文件 @
fd47877f
...
...
@@ -36,7 +36,7 @@ gf119_disp_dmac_bind(struct nv50_disp_dmac *chan,
chan
->
base
.
chid
<<
27
|
0x00000001
);
}
static
void
void
gf119_disp_dmac_fini
(
struct
nv50_disp_dmac
*
chan
)
{
struct
nv50_disp
*
disp
=
chan
->
base
.
root
->
disp
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgp104.c
0 → 100644
浏览文件 @
fd47877f
/*
* Copyright 2016 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 <bskeggs@redhat.com>
*/
#include "dmacnv50.h"
#include "rootnv50.h"
#include <subdev/timer.h>
static
int
gp104_disp_dmac_init
(
struct
nv50_disp_dmac
*
chan
)
{
struct
nv50_disp
*
disp
=
chan
->
base
.
root
->
disp
;
struct
nvkm_subdev
*
subdev
=
&
disp
->
base
.
engine
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
int
chid
=
chan
->
base
.
chid
;
/* enable error reporting */
nvkm_mask
(
device
,
0x6100a0
,
0x00000001
<<
chid
,
0x00000001
<<
chid
);
/* initialise channel for dma command submission */
nvkm_wr32
(
device
,
0x611494
+
(
chid
*
0x0010
),
chan
->
push
);
nvkm_wr32
(
device
,
0x611498
+
(
chid
*
0x0010
),
0x00010000
);
nvkm_wr32
(
device
,
0x61149c
+
(
chid
*
0x0010
),
0x00000001
);
nvkm_mask
(
device
,
0x610490
+
(
chid
*
0x0010
),
0x00000010
,
0x00000010
);
nvkm_wr32
(
device
,
0x640000
+
(
chid
*
0x1000
),
0x00000000
);
nvkm_wr32
(
device
,
0x610490
+
(
chid
*
0x0010
),
0x00000013
);
/* wait for it to go inactive */
if
(
nvkm_msec
(
device
,
2000
,
if
(
!
(
nvkm_rd32
(
device
,
0x610490
+
(
chid
*
0x10
))
&
0x80000000
))
break
;
)
<
0
)
{
nvkm_error
(
subdev
,
"ch %d init: %08x
\n
"
,
chid
,
nvkm_rd32
(
device
,
0x610490
+
(
chid
*
0x10
)));
return
-
EBUSY
;
}
return
0
;
}
const
struct
nv50_disp_dmac_func
gp104_disp_dmac_func
=
{
.
init
=
gp104_disp_dmac_init
,
.
fini
=
gf119_disp_dmac_fini
,
.
bind
=
gf119_disp_dmac_bind
,
};
drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.h
浏览文件 @
fd47877f
...
...
@@ -25,8 +25,12 @@ int nv50_disp_dmac_bind(struct nv50_disp_dmac *, struct nvkm_object *, u32);
extern
const
struct
nv50_disp_dmac_func
nv50_disp_core_func
;
extern
const
struct
nv50_disp_dmac_func
gf119_disp_dmac_func
;
void
gf119_disp_dmac_fini
(
struct
nv50_disp_dmac
*
);
int
gf119_disp_dmac_bind
(
struct
nv50_disp_dmac
*
,
struct
nvkm_object
*
,
u32
);
extern
const
struct
nv50_disp_dmac_func
gf119_disp_core_func
;
void
gf119_disp_core_fini
(
struct
nv50_disp_dmac
*
);
extern
const
struct
nv50_disp_dmac_func
gp104_disp_dmac_func
;
struct
nv50_disp_dmac_oclass
{
int
(
*
ctor
)(
const
struct
nv50_disp_dmac_func
*
,
...
...
@@ -90,4 +94,8 @@ extern const struct nv50_disp_dmac_oclass gm107_disp_core_oclass;
extern
const
struct
nv50_disp_dmac_oclass
gm200_disp_core_oclass
;
extern
const
struct
nv50_disp_dmac_oclass
gp100_disp_core_oclass
;
extern
const
struct
nv50_disp_dmac_oclass
gp104_disp_core_oclass
;
extern
const
struct
nv50_disp_dmac_oclass
gp104_disp_base_oclass
;
extern
const
struct
nv50_disp_dmac_oclass
gp104_disp_ovly_oclass
;
#endif
drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c
浏览文件 @
fd47877f
...
...
@@ -413,7 +413,7 @@ gf119_disp_intr_supervisor(struct work_struct *work)
nvkm_wr32
(
device
,
0x6101d0
,
0x80000000
);
}
static
void
void
gf119_disp_intr_error
(
struct
nv50_disp
*
disp
,
int
chid
)
{
struct
nvkm_subdev
*
subdev
=
&
disp
->
base
.
engine
.
subdev
;
...
...
@@ -461,7 +461,7 @@ gf119_disp_intr(struct nv50_disp *disp)
u32
stat
=
nvkm_rd32
(
device
,
0x61009c
);
int
chid
=
ffs
(
stat
)
-
1
;
if
(
chid
>=
0
)
gf119_disp_
intr_error
(
disp
,
chid
);
disp
->
func
->
intr_error
(
disp
,
chid
);
intr
&=
~
0x00000002
;
}
...
...
@@ -505,6 +505,7 @@ gf119_disp_new_(const struct nv50_disp_func *func, struct nvkm_device *device,
static
const
struct
nv50_disp_func
gf119_disp
=
{
.
intr
=
gf119_disp_intr
,
.
intr_error
=
gf119_disp_intr_error
,
.
uevent
=
&
gf119_disp_chan_uevent
,
.
super
=
gf119_disp_intr_supervisor
,
.
root
=
&
gf119_disp_root_oclass
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c
浏览文件 @
fd47877f
...
...
@@ -27,6 +27,7 @@
static
const
struct
nv50_disp_func
gk104_disp
=
{
.
intr
=
gf119_disp_intr
,
.
intr_error
=
gf119_disp_intr_error
,
.
uevent
=
&
gf119_disp_chan_uevent
,
.
super
=
gf119_disp_intr_supervisor
,
.
root
=
&
gk104_disp_root_oclass
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/gk110.c
浏览文件 @
fd47877f
...
...
@@ -27,6 +27,7 @@
static
const
struct
nv50_disp_func
gk110_disp
=
{
.
intr
=
gf119_disp_intr
,
.
intr_error
=
gf119_disp_intr_error
,
.
uevent
=
&
gf119_disp_chan_uevent
,
.
super
=
gf119_disp_intr_supervisor
,
.
root
=
&
gk110_disp_root_oclass
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c
浏览文件 @
fd47877f
...
...
@@ -27,6 +27,7 @@
static
const
struct
nv50_disp_func
gm107_disp
=
{
.
intr
=
gf119_disp_intr
,
.
intr_error
=
gf119_disp_intr_error
,
.
uevent
=
&
gf119_disp_chan_uevent
,
.
super
=
gf119_disp_intr_supervisor
,
.
root
=
&
gm107_disp_root_oclass
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/gm200.c
浏览文件 @
fd47877f
...
...
@@ -27,6 +27,7 @@
static
const
struct
nv50_disp_func
gm200_disp
=
{
.
intr
=
gf119_disp_intr
,
.
intr_error
=
gf119_disp_intr_error
,
.
uevent
=
&
gf119_disp_chan_uevent
,
.
super
=
gf119_disp_intr_supervisor
,
.
root
=
&
gm200_disp_root_oclass
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c
浏览文件 @
fd47877f
...
...
@@ -27,6 +27,7 @@
static
const
struct
nv50_disp_func
gp100_disp
=
{
.
intr
=
gf119_disp_intr
,
.
intr_error
=
gf119_disp_intr_error
,
.
uevent
=
&
gf119_disp_chan_uevent
,
.
super
=
gf119_disp_intr_supervisor
,
.
root
=
&
gp100_disp_root_oclass
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/gp104.c
0 → 100644
浏览文件 @
fd47877f
/*
* Copyright 2016 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 <bskeggs@redhat.com>
*/
#include "nv50.h"
#include "rootnv50.h"
static
void
gp104_disp_intr_error
(
struct
nv50_disp
*
disp
,
int
chid
)
{
struct
nvkm_subdev
*
subdev
=
&
disp
->
base
.
engine
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
u32
mthd
=
nvkm_rd32
(
device
,
0x6111f0
+
(
chid
*
12
));
u32
data
=
nvkm_rd32
(
device
,
0x6111f4
+
(
chid
*
12
));
u32
unkn
=
nvkm_rd32
(
device
,
0x6111f8
+
(
chid
*
12
));
nvkm_error
(
subdev
,
"chid %d mthd %04x data %08x %08x %08x
\n
"
,
chid
,
(
mthd
&
0x0000ffc
),
data
,
mthd
,
unkn
);
if
(
chid
<
ARRAY_SIZE
(
disp
->
chan
))
{
switch
(
mthd
&
0xffc
)
{
case
0x0080
:
nv50_disp_chan_mthd
(
disp
->
chan
[
chid
],
NV_DBG_ERROR
);
break
;
default:
break
;
}
}
nvkm_wr32
(
device
,
0x61009c
,
(
1
<<
chid
));
nvkm_wr32
(
device
,
0x6111f0
+
(
chid
*
12
),
0x90000000
);
}
static
const
struct
nv50_disp_func
gp104_disp
=
{
.
intr
=
gf119_disp_intr
,
.
intr_error
=
gp104_disp_intr_error
,
.
uevent
=
&
gf119_disp_chan_uevent
,
.
super
=
gf119_disp_intr_supervisor
,
.
root
=
&
gp104_disp_root_oclass
,
.
head
.
vblank_init
=
gf119_disp_vblank_init
,
.
head
.
vblank_fini
=
gf119_disp_vblank_fini
,
.
head
.
scanoutpos
=
gf119_disp_root_scanoutpos
,
.
outp
.
internal
.
crt
=
nv50_dac_output_new
,
.
outp
.
internal
.
tmds
=
nv50_sor_output_new
,
.
outp
.
internal
.
lvds
=
nv50_sor_output_new
,
.
outp
.
internal
.
dp
=
gm200_sor_dp_new
,
.
dac
.
nr
=
3
,
.
dac
.
power
=
nv50_dac_power
,
.
dac
.
sense
=
nv50_dac_sense
,
.
sor
.
nr
=
4
,
.
sor
.
power
=
nv50_sor_power
,
.
sor
.
hda_eld
=
gf119_hda_eld
,
.
sor
.
hdmi
=
gk104_hdmi_ctrl
,
.
sor
.
magic
=
gm200_sor_magic
,
};
int
gp104_disp_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_disp
**
pdisp
)
{
return
gf119_disp_new_
(
&
gp104_disp
,
device
,
index
,
pdisp
);
}
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h
浏览文件 @
fd47877f
...
...
@@ -68,6 +68,7 @@ struct nv50_disp_func_outp {
struct
nv50_disp_func
{
void
(
*
intr
)(
struct
nv50_disp
*
);
void
(
*
intr_error
)(
struct
nv50_disp
*
,
int
chid
);
const
struct
nvkm_event_func
*
uevent
;
void
(
*
super
)(
struct
work_struct
*
);
...
...
@@ -114,4 +115,5 @@ void gf119_disp_vblank_init(struct nv50_disp *, int);
void
gf119_disp_vblank_fini
(
struct
nv50_disp
*
,
int
);
void
gf119_disp_intr
(
struct
nv50_disp
*
);
void
gf119_disp_intr_supervisor
(
struct
work_struct
*
);
void
gf119_disp_intr_error
(
struct
nv50_disp
*
,
int
);
#endif
drivers/gpu/drm/nouveau/nvkm/engine/disp/ovlygk104.c
浏览文件 @
fd47877f
...
...
@@ -80,7 +80,7 @@ gk104_disp_ovly_mthd_base = {
}
};
static
const
struct
nv50_disp_chan_mthd
const
struct
nv50_disp_chan_mthd
gk104_disp_ovly_chan_mthd
=
{
.
name
=
"Overlay"
,
.
addr
=
0x001000
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/ovlygp104.c
0 → 100644
浏览文件 @
fd47877f
/*
* 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 "dmacnv50.h"
#include "rootnv50.h"
#include <nvif/class.h>
const
struct
nv50_disp_dmac_oclass
gp104_disp_ovly_oclass
=
{
.
base
.
oclass
=
GK104_DISP_OVERLAY_CONTROL_DMA
,
.
base
.
minver
=
0
,
.
base
.
maxver
=
0
,
.
ctor
=
nv50_disp_ovly_new
,
.
func
=
&
gp104_disp_dmac_func
,
.
mthd
=
&
gk104_disp_ovly_chan_mthd
,
.
chid
=
5
,
};
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgp104.c
0 → 100644
浏览文件 @
fd47877f
/*
* Copyright 2016 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 <bskeggs@redhat.com>
*/
#include "rootnv50.h"
#include "dmacnv50.h"
#include <nvif/class.h>
static
const
struct
nv50_disp_root_func
gp104_disp_root
=
{
.
init
=
gf119_disp_root_init
,
.
fini
=
gf119_disp_root_fini
,
.
dmac
=
{
&
gp104_disp_core_oclass
,
&
gp104_disp_base_oclass
,
&
gp104_disp_ovly_oclass
,
},
.
pioc
=
{
&
gk104_disp_oimm_oclass
,
&
gk104_disp_curs_oclass
,
},
};
static
int
gp104_disp_root_new
(
struct
nvkm_disp
*
disp
,
const
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nvkm_object
**
pobject
)
{
return
nv50_disp_root_new_
(
&
gp104_disp_root
,
disp
,
oclass
,
data
,
size
,
pobject
);
}
const
struct
nvkm_disp_oclass
gp104_disp_root_oclass
=
{
.
base
.
oclass
=
GP104_DISP
,
.
base
.
minver
=
-
1
,
.
base
.
maxver
=
-
1
,
.
ctor
=
gp104_disp_root_new
,
};
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h
浏览文件 @
fd47877f
...
...
@@ -41,4 +41,5 @@ extern const struct nvkm_disp_oclass gk110_disp_root_oclass;
extern
const
struct
nvkm_disp_oclass
gm107_disp_root_oclass
;
extern
const
struct
nvkm_disp_oclass
gm200_disp_root_oclass
;
extern
const
struct
nvkm_disp_oclass
gp100_disp_root_oclass
;
extern
const
struct
nvkm_disp_oclass
gp104_disp_root_oclass
;
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录