Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
03c8952f
Commit
03c8952f
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/fb: convert to new-style nvkm_subdev
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
151abd44
Changes
47
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
648 additions
and
812 deletions
+648
-812
drivers/gpu/drm/nouveau/include/nvif/device.h
drivers/gpu/drm/nouveau/include/nvif/device.h
+1
-1
drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
+31
-43
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_bo.c
+3
-9
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_gem.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
+69
-69
drivers/gpu/drm/nouveau/nvkm/engine/device/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/device/gf100.c
+0
-9
drivers/gpu/drm/nouveau/nvkm/engine/device/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/device/gk104.c
+0
-8
drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c
drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c
+0
-4
drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c
+0
-2
drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c
+0
-8
drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c
+0
-4
drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c
+0
-5
drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c
+0
-16
drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c
+0
-14
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
+92
-42
drivers/gpu/drm/nouveau/nvkm/subdev/fb/g84.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/g84.c
+10
-12
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c
+31
-37
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h
+6
-6
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk104.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk104.c
+13
-11
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk20a.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk20a.c
+12
-36
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm107.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm107.c
+13
-11
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gt215.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gt215.c
+10
-12
drivers/gpu/drm/nouveau/nvkm/subdev/fb/mcp77.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/mcp77.c
+10
-12
drivers/gpu/drm/nouveau/nvkm/subdev/fb/mcp89.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/mcp89.c
+10
-12
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv04.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv04.c
+12
-42
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv04.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv04.h
+0
-49
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv10.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv10.c
+12
-13
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv1a.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv1a.c
+12
-13
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv20.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv20.c
+13
-14
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv25.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv25.c
+12
-13
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv30.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv30.c
+20
-27
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv35.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv35.c
+13
-13
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv36.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv36.c
+13
-13
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv40.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv40.c
+16
-25
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv41.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv41.c
+16
-25
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv44.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv44.c
+15
-23
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv46.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv46.c
+13
-13
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv47.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv47.c
+13
-13
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv49.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv49.c
+13
-13
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv4e.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv4e.c
+13
-13
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c
+66
-61
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.h
+6
-8
drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
+51
-26
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramfuc.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramfuc.h
+2
-7
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv50.c
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv50.c
+3
-2
No files found.
drivers/gpu/drm/nouveau/include/nvif/device.h
View file @
03c8952f
...
@@ -51,7 +51,7 @@ u64 nvif_device_time(struct nvif_device *);
...
@@ -51,7 +51,7 @@ u64 nvif_device_time(struct nvif_device *);
nv_device(_device->object.priv); \
nv_device(_device->object.priv); \
})
})
#define nvxx_bios(a) nvxx_device(a)->bios
#define nvxx_bios(a) nvxx_device(a)->bios
#define nvxx_fb(a) nv
km_fb(nvxx_device(a))
#define nvxx_fb(a) nv
xx_device(a)->fb
#define nvxx_mmu(a) nvkm_mmu(nvxx_device(a))
#define nvxx_mmu(a) nvkm_mmu(nvxx_device(a))
#define nvxx_bar(a) nvxx_device(a)->bar
#define nvxx_bar(a) nvxx_device(a)->bar
#define nvxx_gpio(a) nvkm_gpio(nvxx_device(a))
#define nvxx_gpio(a) nvkm_gpio(nvxx_device(a))
...
...
drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
View file @
03c8952f
...
@@ -46,59 +46,47 @@ struct nvkm_fb_tile {
...
@@ -46,59 +46,47 @@ struct nvkm_fb_tile {
};
};
struct
nvkm_fb
{
struct
nvkm_fb
{
const
struct
nvkm_fb_func
*
func
;
struct
nvkm_subdev
subdev
;
struct
nvkm_subdev
subdev
;
bool
(
*
memtype_valid
)(
struct
nvkm_fb
*
,
u32
memtype
);
struct
nvkm_ram
*
ram
;
struct
nvkm_ram
*
ram
;
struct
{
struct
{
struct
nvkm_fb_tile
region
[
16
];
struct
nvkm_fb_tile
region
[
16
];
int
regions
;
int
regions
;
void
(
*
init
)(
struct
nvkm_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
void
(
*
comp
)(
struct
nvkm_fb
*
,
int
i
,
u32
size
,
u32
flags
,
struct
nvkm_fb_tile
*
);
void
(
*
fini
)(
struct
nvkm_fb
*
,
int
i
,
struct
nvkm_fb_tile
*
);
void
(
*
prog
)(
struct
nvkm_fb
*
,
int
i
,
struct
nvkm_fb_tile
*
);
}
tile
;
}
tile
;
};
};
static
inline
struct
nvkm_fb
*
bool
nvkm_fb_memtype_valid
(
struct
nvkm_fb
*
,
u32
memtype
);
nvkm_fb
(
void
*
obj
)
void
nvkm_fb_tile_init
(
struct
nvkm_fb
*
,
int
region
,
u32
addr
,
u32
size
,
{
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
/* fbram uses this before device subdev pointer is valid */
void
nvkm_fb_tile_fini
(
struct
nvkm_fb
*
,
int
region
,
struct
nvkm_fb_tile
*
);
if
(
nv_iclass
(
obj
,
NV_SUBDEV_CLASS
)
&&
void
nvkm_fb_tile_prog
(
struct
nvkm_fb
*
,
int
region
,
struct
nvkm_fb_tile
*
);
nv_subidx
(
obj
)
==
NVDEV_SUBDEV_FB
)
return
obj
;
int
nv04_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
int
nv10_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
return
(
void
*
)
nvkm_subdev
(
obj
,
NVDEV_SUBDEV_FB
);
int
nv1a_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
}
int
nv20_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
int
nv25_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv04_fb_oclass
;
int
nv30_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv10_fb_oclass
;
int
nv35_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv1a_fb_oclass
;
int
nv36_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv20_fb_oclass
;
int
nv40_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv25_fb_oclass
;
int
nv41_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv30_fb_oclass
;
int
nv44_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv35_fb_oclass
;
int
nv46_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv36_fb_oclass
;
int
nv47_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv40_fb_oclass
;
int
nv49_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv41_fb_oclass
;
int
nv4e_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv44_fb_oclass
;
int
nv50_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv46_fb_oclass
;
int
g84_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv47_fb_oclass
;
int
gt215_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv49_fb_oclass
;
int
mcp77_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv4e_fb_oclass
;
int
mcp89_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
nv50_fb_oclass
;
int
gf100_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
g84_fb_oclass
;
int
gk104_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
gt215_fb_oclass
;
int
gk20a_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
mcp77_fb_oclass
;
int
gm107_fb_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_fb
**
);
extern
struct
nvkm_oclass
*
mcp89_fb_oclass
;
extern
struct
nvkm_oclass
*
gf100_fb_oclass
;
extern
struct
nvkm_oclass
*
gk104_fb_oclass
;
extern
struct
nvkm_oclass
*
gk20a_fb_oclass
;
extern
struct
nvkm_oclass
*
gm107_fb_oclass
;
#include <subdev/bios.h>
#include <subdev/bios.h>
#include <subdev/bios/ramcfg.h>
#include <subdev/bios/ramcfg.h>
...
...
drivers/gpu/drm/nouveau/nouveau_bo.c
View file @
03c8952f
...
@@ -50,22 +50,16 @@ nv10_bo_update_tile_region(struct drm_device *dev, struct nouveau_drm_tile *reg,
...
@@ -50,22 +50,16 @@ nv10_bo_update_tile_region(struct drm_device *dev, struct nouveau_drm_tile *reg,
int
i
=
reg
-
drm
->
tile
.
reg
;
int
i
=
reg
-
drm
->
tile
.
reg
;
struct
nvkm_fb
*
fb
=
nvxx_fb
(
&
drm
->
device
);
struct
nvkm_fb
*
fb
=
nvxx_fb
(
&
drm
->
device
);
struct
nvkm_fb_tile
*
tile
=
&
fb
->
tile
.
region
[
i
];
struct
nvkm_fb_tile
*
tile
=
&
fb
->
tile
.
region
[
i
];
struct
nvkm_engine
*
engine
;
nouveau_fence_unref
(
&
reg
->
fence
);
nouveau_fence_unref
(
&
reg
->
fence
);
if
(
tile
->
pitch
)
if
(
tile
->
pitch
)
fb
->
tile
.
fini
(
fb
,
i
,
tile
);
nvkm_fb_tile_
fini
(
fb
,
i
,
tile
);
if
(
pitch
)
if
(
pitch
)
fb
->
tile
.
init
(
fb
,
i
,
addr
,
size
,
pitch
,
flags
,
tile
);
nvkm_fb_tile_
init
(
fb
,
i
,
addr
,
size
,
pitch
,
flags
,
tile
);
fb
->
tile
.
prog
(
fb
,
i
,
tile
);
nvkm_fb_tile_prog
(
fb
,
i
,
tile
);
if
((
engine
=
nvkm_engine
(
fb
,
NVDEV_ENGINE_GR
)))
engine
->
tile_prog
(
engine
,
i
);
if
((
engine
=
nvkm_engine
(
fb
,
NVDEV_ENGINE_MPEG
)))
engine
->
tile_prog
(
engine
,
i
);
}
}
static
struct
nouveau_drm_tile
*
static
struct
nouveau_drm_tile
*
...
...
drivers/gpu/drm/nouveau/nouveau_gem.c
View file @
03c8952f
...
@@ -259,7 +259,7 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
...
@@ -259,7 +259,7 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
struct
nouveau_bo
*
nvbo
=
NULL
;
struct
nouveau_bo
*
nvbo
=
NULL
;
int
ret
=
0
;
int
ret
=
0
;
if
(
!
fb
->
memtype_valid
(
fb
,
req
->
info
.
tile_flags
))
{
if
(
!
nvkm_fb_
memtype_valid
(
fb
,
req
->
info
.
tile_flags
))
{
NV_PRINTK
(
err
,
cli
,
"bad page flags: 0x%08x
\n
"
,
req
->
info
.
tile_flags
);
NV_PRINTK
(
err
,
cli
,
"bad page flags: 0x%08x
\n
"
,
req
->
info
.
tile_flags
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
View file @
03c8952f
This diff is collapsed.
Click to expand it.
drivers/gpu/drm/nouveau/nvkm/engine/device/gf100.c
View file @
03c8952f
...
@@ -35,7 +35,6 @@ gf100_identify(struct nvkm_device *device)
...
@@ -35,7 +35,6 @@ gf100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf100_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf100_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gf100_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -62,7 +61,6 @@ gf100_identify(struct nvkm_device *device)
...
@@ -62,7 +61,6 @@ gf100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf100_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf100_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gf100_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -89,7 +87,6 @@ gf100_identify(struct nvkm_device *device)
...
@@ -89,7 +87,6 @@ gf100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gf100_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -115,7 +112,6 @@ gf100_identify(struct nvkm_device *device)
...
@@ -115,7 +112,6 @@ gf100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf100_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf100_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gf100_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -142,7 +138,6 @@ gf100_identify(struct nvkm_device *device)
...
@@ -142,7 +138,6 @@ gf100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gf100_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -168,7 +163,6 @@ gf100_identify(struct nvkm_device *device)
...
@@ -168,7 +163,6 @@ gf100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gf100_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -194,7 +188,6 @@ gf100_identify(struct nvkm_device *device)
...
@@ -194,7 +188,6 @@ gf100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf100_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf100_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gf100_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -221,7 +214,6 @@ gf100_identify(struct nvkm_device *device)
...
@@ -221,7 +214,6 @@ gf100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gf100_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -247,7 +239,6 @@ gf100_identify(struct nvkm_device *device)
...
@@ -247,7 +239,6 @@ gf100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gf100_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gf100_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gf100_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/gk104.c
View file @
03c8952f
...
@@ -35,7 +35,6 @@ gk104_identify(struct nvkm_device *device)
...
@@ -35,7 +35,6 @@ gk104_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gk104_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -63,7 +62,6 @@ gk104_identify(struct nvkm_device *device)
...
@@ -63,7 +62,6 @@ gk104_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gk104_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -91,7 +89,6 @@ gk104_identify(struct nvkm_device *device)
...
@@ -91,7 +89,6 @@ gk104_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gk104_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -115,7 +112,6 @@ gk104_identify(struct nvkm_device *device)
...
@@ -115,7 +112,6 @@ gk104_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gk20a_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gk20a_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FUSE
]
=
&
gf100_fuse_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FUSE
]
=
&
gf100_fuse_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
gk20a_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
gk20a_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gk20a_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk20a_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk20a_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
gk20a_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
gk20a_instmem_oclass
;
...
@@ -137,7 +133,6 @@ gk104_identify(struct nvkm_device *device)
...
@@ -137,7 +133,6 @@ gk104_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gk104_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -165,7 +160,6 @@ gk104_identify(struct nvkm_device *device)
...
@@ -165,7 +160,6 @@ gk104_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gf106_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gk104_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -193,7 +187,6 @@ gk104_identify(struct nvkm_device *device)
...
@@ -193,7 +187,6 @@ gk104_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gk20a_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gk20a_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gk104_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -220,7 +213,6 @@ gk104_identify(struct nvkm_device *device)
...
@@ -220,7 +213,6 @@ gk104_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gk20a_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gk20a_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gk104_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gk104_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c
View file @
03c8952f
...
@@ -35,7 +35,6 @@ gm100_identify(struct nvkm_device *device)
...
@@ -35,7 +35,6 @@ gm100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gk20a_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gk20a_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
gk20a_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
gk20a_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gm107_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gm107_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gm107_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -73,7 +72,6 @@ gm100_identify(struct nvkm_device *device)
...
@@ -73,7 +72,6 @@ gm100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gk20a_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gk20a_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
gk20a_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
gk20a_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gm107_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gm107_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gm107_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -108,7 +106,6 @@ gm100_identify(struct nvkm_device *device)
...
@@ -108,7 +106,6 @@ gm100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gk20a_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
gk20a_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
gk20a_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
gk20a_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gm107_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gm107_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gm107_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk104_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
...
@@ -137,7 +134,6 @@ gm100_identify(struct nvkm_device *device)
...
@@ -137,7 +134,6 @@ gm100_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
gf100_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
gf100_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FUSE
]
=
&
gm107_fuse_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FUSE
]
=
&
gm107_fuse_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
gk20a_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
gk20a_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gk20a_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gm107_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_LTC
]
=
gm107_ltc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk20a_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_IBUS
]
=
&
gk20a_ibus_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
gk20a_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
gk20a_instmem_oclass
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c
View file @
03c8952f
...
@@ -31,7 +31,6 @@ nv04_identify(struct nvkm_device *device)
...
@@ -31,7 +31,6 @@ nv04_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv04_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -44,7 +43,6 @@ nv04_identify(struct nvkm_device *device)
...
@@ -44,7 +43,6 @@ nv04_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv04_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c
View file @
03c8952f
...
@@ -32,7 +32,6 @@ nv10_identify(struct nvkm_device *device)
...
@@ -32,7 +32,6 @@ nv10_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv10_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -44,7 +43,6 @@ nv10_identify(struct nvkm_device *device)
...
@@ -44,7 +43,6 @@ nv10_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv10_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -58,7 +56,6 @@ nv10_identify(struct nvkm_device *device)
...
@@ -58,7 +56,6 @@ nv10_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv10_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -72,7 +69,6 @@ nv10_identify(struct nvkm_device *device)
...
@@ -72,7 +69,6 @@ nv10_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv1a_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -86,7 +82,6 @@ nv10_identify(struct nvkm_device *device)
...
@@ -86,7 +82,6 @@ nv10_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv10_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -100,7 +95,6 @@ nv10_identify(struct nvkm_device *device)
...
@@ -100,7 +95,6 @@ nv10_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv10_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -114,7 +108,6 @@ nv10_identify(struct nvkm_device *device)
...
@@ -114,7 +108,6 @@ nv10_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv1a_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -128,7 +121,6 @@ nv10_identify(struct nvkm_device *device)
...
@@ -128,7 +121,6 @@ nv10_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv10_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c
View file @
03c8952f
...
@@ -32,7 +32,6 @@ nv20_identify(struct nvkm_device *device)
...
@@ -32,7 +32,6 @@ nv20_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv20_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -46,7 +45,6 @@ nv20_identify(struct nvkm_device *device)
...
@@ -46,7 +45,6 @@ nv20_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv25_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -60,7 +58,6 @@ nv20_identify(struct nvkm_device *device)
...
@@ -60,7 +58,6 @@ nv20_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv25_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -74,7 +71,6 @@ nv20_identify(struct nvkm_device *device)
...
@@ -74,7 +71,6 @@ nv20_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv25_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c
View file @
03c8952f
...
@@ -32,7 +32,6 @@ nv30_identify(struct nvkm_device *device)
...
@@ -32,7 +32,6 @@ nv30_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv30_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -46,7 +45,6 @@ nv30_identify(struct nvkm_device *device)
...
@@ -46,7 +45,6 @@ nv30_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv35_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -60,7 +58,6 @@ nv30_identify(struct nvkm_device *device)
...
@@ -60,7 +58,6 @@ nv30_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv30_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -75,7 +72,6 @@ nv30_identify(struct nvkm_device *device)
...
@@ -75,7 +72,6 @@ nv30_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv36_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
@@ -90,7 +86,6 @@ nv30_identify(struct nvkm_device *device)
...
@@ -90,7 +86,6 @@ nv30_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_I2C
]
=
nv04_i2c_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv04_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv10_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv04_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
device
->
oclass
[
NVDEV_ENGINE_DMAOBJ
]
=
nv04_dmaeng_oclass
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c
View file @
03c8952f
...
@@ -33,7 +33,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -33,7 +33,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv40_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -51,7 +50,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -51,7 +50,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv41_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv41_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv41_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -69,7 +67,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -69,7 +67,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv41_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv41_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv41_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -87,7 +84,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -87,7 +84,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv41_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv41_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv41_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -105,7 +101,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -105,7 +101,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv40_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv04_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -123,7 +118,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -123,7 +118,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv47_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv41_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv41_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -141,7 +135,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -141,7 +135,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv49_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv41_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv41_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -159,7 +152,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -159,7 +152,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv40_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv49_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv41_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv41_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -177,7 +169,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -177,7 +169,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv44_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv44_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv44_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -195,7 +186,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -195,7 +186,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv4c_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv4c_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv46_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -213,7 +203,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -213,7 +203,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv44_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv44_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv44_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -231,7 +220,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -231,7 +220,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv4c_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv4c_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv46_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -249,7 +237,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -249,7 +237,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv4c_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv4c_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv4e_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -267,7 +254,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -267,7 +254,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv4c_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv4c_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv46_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -285,7 +271,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -285,7 +271,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv4c_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv4c_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv46_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -303,7 +288,6 @@ nv40_identify(struct nvkm_device *device)
...
@@ -303,7 +288,6 @@ nv40_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_THERM
]
=
&
nv40_therm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv4c_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv4c_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv46_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv40_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv44_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c
View file @
03c8952f
...
@@ -35,7 +35,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -35,7 +35,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv50_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv50_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
nv50_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -55,7 +54,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -55,7 +54,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv50_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv50_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
g84_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -78,7 +76,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -78,7 +76,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv50_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv50_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
g84_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -101,7 +98,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -101,7 +98,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv50_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
nv50_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
g84_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -124,7 +120,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -124,7 +120,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g94_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g94_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
g84_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -147,7 +142,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -147,7 +142,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g94_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g94_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
g84_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -170,7 +164,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -170,7 +164,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
g84_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -193,7 +186,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -193,7 +186,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
g84_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -216,7 +208,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -216,7 +208,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
mcp77_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -239,7 +230,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -239,7 +230,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
mcp77_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_VOLT
]
=
&
nv40_volt_oclass
;
...
@@ -262,7 +252,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -262,7 +252,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gt215_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_PMU
]
=
gt215_pmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_PMU
]
=
gt215_pmu_oclass
;
...
@@ -287,7 +276,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -287,7 +276,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gt215_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_PMU
]
=
gt215_pmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_PMU
]
=
gt215_pmu_oclass
;
...
@@ -311,7 +299,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -311,7 +299,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
gt215_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_PMU
]
=
gt215_pmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_PMU
]
=
gt215_pmu_oclass
;
...
@@ -335,7 +322,6 @@ nv50_identify(struct nvkm_device *device)
...
@@ -335,7 +322,6 @@ nv50_identify(struct nvkm_device *device)
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MXM
]
=
&
nv50_mxm_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MC
]
=
g98_mc_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_TIMER
]
=
&
nv04_timer_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_FB
]
=
mcp89_fb_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_INSTMEM
]
=
nv50_instmem_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_MMU
]
=
&
nv50_mmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_PMU
]
=
gt215_pmu_oclass
;
device
->
oclass
[
NVDEV_SUBDEV_PMU
]
=
gt215_pmu_oclass
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c
View file @
03c8952f
...
@@ -569,7 +569,7 @@ nv50_gr_construct_mmio(struct nvkm_grctx *ctx)
...
@@ -569,7 +569,7 @@ nv50_gr_construct_mmio(struct nvkm_grctx *ctx)
else
if
(
device
->
chipset
<
0xa0
)
else
if
(
device
->
chipset
<
0xa0
)
gr_def
(
ctx
,
0x407d08
,
0x00390040
);
gr_def
(
ctx
,
0x407d08
,
0x00390040
);
else
{
else
{
if
(
nvkm_fb
(
device
)
->
ram
->
type
!=
NVKM_RAM_TYPE_GDDR5
)
if
(
device
->
fb
->
ram
->
type
!=
NVKM_RAM_TYPE_GDDR5
)
gr_def
(
ctx
,
0x407d08
,
0x003d0040
);
gr_def
(
ctx
,
0x407d08
,
0x003d0040
);
else
else
gr_def
(
ctx
,
0x407d08
,
0x003c0040
);
gr_def
(
ctx
,
0x407d08
,
0x003c0040
);
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
View file @
03c8952f
...
@@ -26,6 +26,38 @@
...
@@ -26,6 +26,38 @@
#include <subdev/bios.h>
#include <subdev/bios.h>
#include <subdev/bios/M0203.h>
#include <subdev/bios/M0203.h>
#include <engine/gr.h>
#include <engine/mpeg.h>
bool
nvkm_fb_memtype_valid
(
struct
nvkm_fb
*
fb
,
u32
memtype
)
{
return
fb
->
func
->
memtype_valid
(
fb
,
memtype
);
}
void
nvkm_fb_tile_fini
(
struct
nvkm_fb
*
fb
,
int
region
,
struct
nvkm_fb_tile
*
tile
)
{
fb
->
func
->
tile
.
fini
(
fb
,
region
,
tile
);
}
void
nvkm_fb_tile_init
(
struct
nvkm_fb
*
fb
,
int
region
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
tile
)
{
fb
->
func
->
tile
.
init
(
fb
,
region
,
addr
,
size
,
pitch
,
flags
,
tile
);
}
void
nvkm_fb_tile_prog
(
struct
nvkm_fb
*
fb
,
int
region
,
struct
nvkm_fb_tile
*
tile
)
{
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
fb
->
func
->
tile
.
prog
(
fb
,
region
,
tile
);
if
(
likely
(
device
->
gr
))
device
->
gr
->
engine
.
tile_prog
(
&
device
->
gr
->
engine
,
region
);
if
(
likely
(
device
->
mpeg
))
device
->
mpeg
->
tile_prog
(
device
->
mpeg
,
region
);
}
int
int
nvkm_fb_bios_memtype
(
struct
nvkm_bios
*
bios
)
nvkm_fb_bios_memtype
(
struct
nvkm_bios
*
bios
)
...
@@ -52,69 +84,87 @@ nvkm_fb_bios_memtype(struct nvkm_bios *bios)
...
@@ -52,69 +84,87 @@ nvkm_fb_bios_memtype(struct nvkm_bios *bios)
return
NVKM_RAM_TYPE_UNKNOWN
;
return
NVKM_RAM_TYPE_UNKNOWN
;
}
}
int
static
void
_nvkm_fb_fini
(
struct
nvkm_object
*
object
,
bool
suspend
)
nvkm_fb_intr
(
struct
nvkm_subdev
*
subdev
)
{
{
struct
nvkm_fb
*
fb
=
(
void
*
)
object
;
struct
nvkm_fb
*
fb
=
nvkm_fb
(
subdev
);
return
nvkm_subdev_fini_old
(
&
fb
->
subdev
,
suspend
);
if
(
fb
->
func
->
intr
)
fb
->
func
->
intr
(
fb
);
}
}
int
static
int
_nvkm_fb_init
(
struct
nvkm_object
*
object
)
nvkm_fb_oneinit
(
struct
nvkm_subdev
*
subdev
)
{
{
struct
nvkm_fb
*
fb
=
(
void
*
)
object
;
struct
nvkm_fb
*
fb
=
nvkm_fb
(
subdev
);
int
ret
,
i
;
if
(
fb
->
func
->
ram_new
)
{
int
ret
=
fb
->
func
->
ram_new
(
fb
,
&
fb
->
ram
);
if
(
ret
)
{
nvkm_error
(
subdev
,
"vram setup failed, %d
\n
"
,
ret
);
return
ret
;
}
}
return
0
;
}
ret
=
nvkm_subdev_init_old
(
&
fb
->
subdev
);
static
int
if
(
ret
)
nvkm_fb_init
(
struct
nvkm_subdev
*
subdev
)
return
ret
;
{
struct
nvkm_fb
*
fb
=
nvkm_fb
(
subdev
);
int
ret
,
i
;
if
(
fb
->
ram
)
if
(
fb
->
ram
)
{
nvkm_ram_init
(
fb
->
ram
);
ret
=
nvkm_ram_init
(
fb
->
ram
);
if
(
ret
)
return
ret
;
}
for
(
i
=
0
;
i
<
fb
->
tile
.
regions
;
i
++
)
for
(
i
=
0
;
i
<
fb
->
tile
.
regions
;
i
++
)
fb
->
tile
.
prog
(
fb
,
i
,
&
fb
->
tile
.
region
[
i
]);
fb
->
func
->
tile
.
prog
(
fb
,
i
,
&
fb
->
tile
.
region
[
i
]);
if
(
fb
->
func
->
init
)
fb
->
func
->
init
(
fb
);
return
0
;
return
0
;
}
}
void
static
void
*
_nvkm_fb_dtor
(
struct
nvkm_object
*
object
)
nvkm_fb_dtor
(
struct
nvkm_subdev
*
subdev
)
{
{
struct
nvkm_fb
*
fb
=
(
void
*
)
object
;
struct
nvkm_fb
*
fb
=
nvkm_fb
(
subdev
)
;
int
i
;
int
i
;
for
(
i
=
0
;
i
<
fb
->
tile
.
regions
;
i
++
)
for
(
i
=
0
;
i
<
fb
->
tile
.
regions
;
i
++
)
fb
->
tile
.
fini
(
fb
,
i
,
&
fb
->
tile
.
region
[
i
]);
fb
->
func
->
tile
.
fini
(
fb
,
i
,
&
fb
->
tile
.
region
[
i
]);
nvkm_ram_del
(
&
fb
->
ram
);
nvkm_ram_del
(
&
fb
->
ram
);
nvkm_subdev_destroy
(
&
fb
->
subdev
);
}
int
if
(
fb
->
func
->
dtor
)
nvkm_fb_create_
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
return
fb
->
func
->
dtor
(
fb
);
struct
nvkm_oclass
*
oclass
,
int
length
,
void
**
pobject
)
return
fb
;
{
}
struct
nvkm_fb_impl
*
impl
=
(
void
*
)
oclass
;
struct
nvkm_fb
*
fb
;
int
ret
;
ret
=
nvkm_subdev_create_
(
parent
,
engine
,
oclass
,
0
,
"PFB"
,
"fb"
,
length
,
pobject
);
fb
=
*
pobject
;
if
(
ret
)
return
ret
;
fb
->
memtype_valid
=
impl
->
memtype
;
if
(
!
impl
->
ram_new
)
static
const
struct
nvkm_subdev_func
return
0
;
nvkm_fb
=
{
.
dtor
=
nvkm_fb_dtor
,
.
oneinit
=
nvkm_fb_oneinit
,
.
init
=
nvkm_fb_init
,
.
intr
=
nvkm_fb_intr
,
};
ret
=
impl
->
ram_new
(
fb
,
&
fb
->
ram
);
void
if
(
ret
)
{
nvkm_fb_ctor
(
const
struct
nvkm_fb_func
*
func
,
struct
nvkm_device
*
device
,
nvkm_error
(
&
fb
->
subdev
,
"vram init failed, %d
\n
"
,
ret
);
int
index
,
struct
nvkm_fb
*
fb
)
return
ret
;
{
}
nvkm_subdev_ctor
(
&
nvkm_fb
,
device
,
index
,
0
,
&
fb
->
subdev
);
fb
->
func
=
func
;
fb
->
tile
.
regions
=
fb
->
func
->
tile
.
regions
;
}
int
nvkm_fb_new_
(
const
struct
nvkm_fb_func
*
func
,
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
if
(
!
(
*
pfb
=
kzalloc
(
sizeof
(
**
pfb
),
GFP_KERNEL
)))
return
-
ENOMEM
;
nvkm_fb_ctor
(
func
,
device
,
index
,
*
pfb
);
return
0
;
return
0
;
}
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/g84.c
View file @
03c8952f
...
@@ -24,16 +24,14 @@
...
@@ -24,16 +24,14 @@
#include "nv50.h"
#include "nv50.h"
#include "ram.h"
#include "ram.h"
struct
nvkm_oclass
*
static
const
struct
nv50_fb_func
g84_fb_oclass
=
&
(
struct
nv50_fb_impl
)
{
g84_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x84
),
.
ram_new
=
nv50_ram_new
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv50_fb_ctor
,
.
dtor
=
nv50_fb_dtor
,
.
init
=
nv50_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv50_fb_memtype_valid
,
.
base
.
ram_new
=
nv50_ram_new
,
.
trap
=
0x001d07ff
,
.
trap
=
0x001d07ff
,
}.
base
.
base
;
};
int
g84_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nv50_fb_new_
(
&
g84_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c
View file @
03c8952f
...
@@ -33,9 +33,11 @@ gf100_fb_memtype_valid(struct nvkm_fb *fb, u32 tile_flags)
...
@@ -33,9 +33,11 @@ gf100_fb_memtype_valid(struct nvkm_fb *fb, u32 tile_flags)
return
likely
((
gf100_pte_storage_type_map
[
memtype
]
!=
0xff
));
return
likely
((
gf100_pte_storage_type_map
[
memtype
]
!=
0xff
));
}
}
static
void
void
gf100_fb_intr
(
struct
nvkm_
subdev
*
subdev
)
gf100_fb_intr
(
struct
nvkm_
fb
*
base
)
{
{
struct
gf100_fb
*
fb
=
gf100_fb
(
base
);
struct
nvkm_subdev
*
subdev
=
&
fb
->
base
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_device
*
device
=
subdev
->
device
;
u32
intr
=
nvkm_rd32
(
device
,
0x000100
);
u32
intr
=
nvkm_rd32
(
device
,
0x000100
);
if
(
intr
&
0x08000000
)
if
(
intr
&
0x08000000
)
...
@@ -44,29 +46,23 @@ gf100_fb_intr(struct nvkm_subdev *subdev)
...
@@ -44,29 +46,23 @@ gf100_fb_intr(struct nvkm_subdev *subdev)
nvkm_debug
(
subdev
,
"PBFB intr
\n
"
);
nvkm_debug
(
subdev
,
"PBFB intr
\n
"
);
}
}
int
void
gf100_fb_init
(
struct
nvkm_
object
*
object
)
gf100_fb_init
(
struct
nvkm_
fb
*
base
)
{
{
struct
gf100_fb
*
fb
=
(
void
*
)
object
;
struct
gf100_fb
*
fb
=
gf100_fb
(
base
)
;
struct
nvkm_device
*
device
=
fb
->
base
.
subdev
.
device
;
struct
nvkm_device
*
device
=
fb
->
base
.
subdev
.
device
;
int
ret
;
ret
=
nvkm_fb_init
(
&
fb
->
base
);
if
(
ret
)
return
ret
;
if
(
fb
->
r100c10_page
)
if
(
fb
->
r100c10_page
)
nvkm_wr32
(
device
,
0x100c10
,
fb
->
r100c10
>>
8
);
nvkm_wr32
(
device
,
0x100c10
,
fb
->
r100c10
>>
8
);
nvkm_mask
(
device
,
0x100c80
,
0x00000001
,
0x00000000
);
/* 128KiB lpg */
nvkm_mask
(
device
,
0x100c80
,
0x00000001
,
0x00000000
);
/* 128KiB lpg */
return
0
;
}
}
void
void
*
gf100_fb_dtor
(
struct
nvkm_
object
*
object
)
gf100_fb_dtor
(
struct
nvkm_
fb
*
base
)
{
{
struct
nvkm_device
*
device
=
nv_device
(
object
);
struct
gf100_fb
*
fb
=
gf100_fb
(
base
);
struct
gf100_fb
*
fb
=
(
void
*
)
object
;
struct
nvkm_device
*
device
=
fb
->
base
.
subdev
.
device
;
if
(
fb
->
r100c10_page
)
{
if
(
fb
->
r100c10_page
)
{
dma_unmap_page
(
nv_device_base
(
device
),
fb
->
r100c10
,
PAGE_SIZE
,
dma_unmap_page
(
nv_device_base
(
device
),
fb
->
r100c10
,
PAGE_SIZE
,
...
@@ -74,22 +70,19 @@ gf100_fb_dtor(struct nvkm_object *object)
...
@@ -74,22 +70,19 @@ gf100_fb_dtor(struct nvkm_object *object)
__free_page
(
fb
->
r100c10_page
);
__free_page
(
fb
->
r100c10_page
);
}
}
nvkm_fb_destroy
(
&
fb
->
base
)
;
return
fb
;
}
}
int
int
gf100_fb_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
gf100_fb_new_
(
const
struct
nvkm_fb_func
*
func
,
struct
nvkm_device
*
device
,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
int
index
,
struct
nvkm_fb
**
pfb
)
struct
nvkm_object
**
pobject
)
{
{
struct
nvkm_device
*
device
=
nv_device
(
parent
);
struct
gf100_fb
*
fb
;
struct
gf100_fb
*
fb
;
int
ret
;
ret
=
nvkm_fb_create
(
parent
,
engine
,
oclass
,
&
fb
);
if
(
!
(
fb
=
kzalloc
(
sizeof
(
*
fb
),
GFP_KERNEL
)))
*
pobject
=
nv_object
(
fb
)
;
return
-
ENOMEM
;
if
(
ret
)
nvkm_fb_ctor
(
func
,
device
,
index
,
&
fb
->
base
);
return
ret
;
*
pfb
=
&
fb
->
base
;
fb
->
r100c10_page
=
alloc_page
(
GFP_KERNEL
|
__GFP_ZERO
);
fb
->
r100c10_page
=
alloc_page
(
GFP_KERNEL
|
__GFP_ZERO
);
if
(
fb
->
r100c10_page
)
{
if
(
fb
->
r100c10_page
)
{
...
@@ -100,19 +93,20 @@ gf100_fb_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
...
@@ -100,19 +93,20 @@ gf100_fb_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
return
-
EFAULT
;
return
-
EFAULT
;
}
}
nv_subdev
(
fb
)
->
intr
=
gf100_fb_intr
;
return
0
;
return
0
;
}
}
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
gf100_fb_oclass
=
&
(
struct
nvkm_fb_impl
)
{
gf100_fb
=
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0xc0
),
.
dtor
=
gf100_fb_dtor
,
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
init
=
gf100_fb_init
,
.
ctor
=
gf100_fb_ctor
,
.
intr
=
gf100_fb_intr
,
.
dtor
=
gf100_fb_dtor
,
.
init
=
gf100_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
memtype
=
gf100_fb_memtype_valid
,
.
ram_new
=
gf100_ram_new
,
.
ram_new
=
gf100_ram_new
,
}.
base
;
.
memtype_valid
=
gf100_fb_memtype_valid
,
};
int
gf100_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
gf100_fb_new_
(
&
gf100_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h
View file @
03c8952f
#ifndef __NVKM_RAM_NVC0_H__
#ifndef __NVKM_RAM_NVC0_H__
#define __NVKM_RAM_NVC0_H__
#define __NVKM_RAM_NVC0_H__
#define gf100_fb(p) container_of((p), struct gf100_fb, base)
#include "priv.h"
#include "priv.h"
struct
gf100_fb
{
struct
gf100_fb
{
...
@@ -8,10 +9,9 @@ struct gf100_fb {
...
@@ -8,10 +9,9 @@ struct gf100_fb {
dma_addr_t
r100c10
;
dma_addr_t
r100c10
;
};
};
int
gf100_fb_ctor
(
struct
nvkm_object
*
,
struct
nvkm_object
*
,
int
gf100_fb_new_
(
const
struct
nvkm_fb_func
*
,
struct
nvkm_device
*
,
struct
nvkm_oclass
*
,
void
*
,
u32
,
int
index
,
struct
nvkm_fb
**
);
struct
nvkm_object
**
);
void
*
gf100_fb_dtor
(
struct
nvkm_fb
*
);
void
gf100_fb_dtor
(
struct
nvkm_object
*
);
void
gf100_fb_init
(
struct
nvkm_fb
*
);
int
gf100_fb_init
(
struct
nvkm_object
*
);
void
gf100_fb_intr
(
struct
nvkm_fb
*
);
bool
gf100_fb_memtype_valid
(
struct
nvkm_fb
*
,
u32
);
#endif
#endif
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk104.c
View file @
03c8952f
...
@@ -24,15 +24,17 @@
...
@@ -24,15 +24,17 @@
#include "gf100.h"
#include "gf100.h"
#include "ram.h"
#include "ram.h"
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
gk104_fb_oclass
=
&
(
struct
nvkm_fb_impl
)
{
gk104_fb
=
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0xe0
),
.
dtor
=
gf100_fb_dtor
,
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
init
=
gf100_fb_init
,
.
ctor
=
gf100_fb_ctor
,
.
intr
=
gf100_fb_intr
,
.
dtor
=
gf100_fb_dtor
,
.
init
=
gf100_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
memtype
=
gf100_fb_memtype_valid
,
.
ram_new
=
gk104_ram_new
,
.
ram_new
=
gk104_ram_new
,
}.
base
;
.
memtype_valid
=
gf100_fb_memtype_valid
,
};
int
gk104_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
gf100_fb_new_
(
&
gk104_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk20a.c
View file @
03c8952f
...
@@ -19,47 +19,23 @@
...
@@ -19,47 +19,23 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
* DEALINGS IN THE SOFTWARE.
*/
*/
#include "
gf100
.h"
#include "
priv
.h"
static
int
static
void
gk20a_fb_init
(
struct
nvkm_
object
*
object
)
gk20a_fb_init
(
struct
nvkm_
fb
*
fb
)
{
{
struct
nvkm_fb
*
fb
=
(
void
*
)
object
;
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
int
ret
;
ret
=
nvkm_fb_init
(
fb
);
if
(
ret
)
return
ret
;
nvkm_mask
(
device
,
0x100c80
,
0x00000001
,
0x00000000
);
/* 128KiB lpg */
nvkm_mask
(
device
,
0x100c80
,
0x00000001
,
0x00000000
);
/* 128KiB lpg */
return
0
;
}
}
static
int
static
const
struct
nvkm_fb_func
gk20a_fb_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
gk20a_fb
=
{
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
.
init
=
gk20a_fb_init
,
struct
nvkm_object
**
pobject
)
.
memtype_valid
=
gf100_fb_memtype_valid
,
{
};
struct
nvkm_fb
*
fb
;
int
ret
;
ret
=
nvkm_fb_create
(
parent
,
engine
,
oclass
,
&
fb
);
*
pobject
=
nv_object
(
fb
);
if
(
ret
)
return
ret
;
return
0
;
int
gk20a_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
gk20a_fb
,
device
,
index
,
pfb
);
}
}
struct
nvkm_oclass
*
gk20a_fb_oclass
=
&
(
struct
nvkm_fb_impl
)
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0xea
),
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
gk20a_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
gk20a_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
memtype
=
gf100_fb_memtype_valid
,
}.
base
;
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm107.c
View file @
03c8952f
...
@@ -24,15 +24,17 @@
...
@@ -24,15 +24,17 @@
#include "gf100.h"
#include "gf100.h"
#include "ram.h"
#include "ram.h"
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
gm107_fb_oclass
=
&
(
struct
nvkm_fb_impl
)
{
gm107_fb
=
{
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x07
),
.
dtor
=
gf100_fb_dtor
,
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
init
=
gf100_fb_init
,
.
ctor
=
gf100_fb_ctor
,
.
intr
=
gf100_fb_intr
,
.
dtor
=
gf100_fb_dtor
,
.
init
=
gf100_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
memtype
=
gf100_fb_memtype_valid
,
.
ram_new
=
gm107_ram_new
,
.
ram_new
=
gm107_ram_new
,
}.
base
;
.
memtype_valid
=
gf100_fb_memtype_valid
,
};
int
gm107_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
gf100_fb_new_
(
&
gm107_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gt215.c
View file @
03c8952f
...
@@ -24,16 +24,14 @@
...
@@ -24,16 +24,14 @@
#include "nv50.h"
#include "nv50.h"
#include "ram.h"
#include "ram.h"
struct
nvkm_oclass
*
static
const
struct
nv50_fb_func
gt215_fb_oclass
=
&
(
struct
nv50_fb_impl
)
{
gt215_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0xa3
),
.
ram_new
=
gt215_ram_new
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv50_fb_ctor
,
.
dtor
=
nv50_fb_dtor
,
.
init
=
nv50_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv50_fb_memtype_valid
,
.
base
.
ram_new
=
gt215_ram_new
,
.
trap
=
0x000d0fff
,
.
trap
=
0x000d0fff
,
}.
base
.
base
;
};
int
gt215_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nv50_fb_new_
(
&
gt215_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/mcp77.c
View file @
03c8952f
...
@@ -24,16 +24,14 @@
...
@@ -24,16 +24,14 @@
#include "nv50.h"
#include "nv50.h"
#include "ram.h"
#include "ram.h"
struct
nvkm_oclass
*
static
const
struct
nv50_fb_func
mcp77_fb_oclass
=
&
(
struct
nv50_fb_impl
)
{
mcp77_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0xaa
),
.
ram_new
=
mcp77_ram_new
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv50_fb_ctor
,
.
dtor
=
nv50_fb_dtor
,
.
init
=
nv50_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv50_fb_memtype_valid
,
.
base
.
ram_new
=
mcp77_ram_new
,
.
trap
=
0x001d07ff
,
.
trap
=
0x001d07ff
,
}.
base
.
base
;
};
int
mcp77_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nv50_fb_new_
(
&
mcp77_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/mcp89.c
View file @
03c8952f
...
@@ -24,16 +24,14 @@
...
@@ -24,16 +24,14 @@
#include "nv50.h"
#include "nv50.h"
#include "ram.h"
#include "ram.h"
struct
nvkm_oclass
*
static
const
struct
nv50_fb_func
mcp89_fb_oclass
=
&
(
struct
nv50_fb_impl
)
{
mcp89_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0xaf
),
.
ram_new
=
mcp77_ram_new
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv50_fb_ctor
,
.
dtor
=
nv50_fb_dtor
,
.
init
=
nv50_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv50_fb_memtype_valid
,
.
base
.
ram_new
=
mcp77_ram_new
,
.
trap
=
0x089d1fff
,
.
trap
=
0x089d1fff
,
}.
base
.
base
;
};
int
mcp89_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nv50_fb_new_
(
&
mcp89_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv04.c
View file @
03c8952f
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
*
*
* Authors: Ben Skeggs
* Authors: Ben Skeggs
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
#include "regsnv04.h"
#include "regsnv04.h"
...
@@ -30,60 +30,30 @@ nv04_fb_memtype_valid(struct nvkm_fb *fb, u32 tile_flags)
...
@@ -30,60 +30,30 @@ nv04_fb_memtype_valid(struct nvkm_fb *fb, u32 tile_flags)
{
{
if
(
!
(
tile_flags
&
0xff00
))
if
(
!
(
tile_flags
&
0xff00
))
return
true
;
return
true
;
return
false
;
return
false
;
}
}
static
int
static
void
nv04_fb_init
(
struct
nvkm_
object
*
object
)
nv04_fb_init
(
struct
nvkm_
fb
*
fb
)
{
{
struct
nvkm_fb
*
fb
=
(
void
*
)
object
;
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
int
ret
;
ret
=
nvkm_fb_init
(
fb
);
if
(
ret
)
return
ret
;
/* This is what the DDX did for NV_ARCH_04, but a mmio-trace shows
/* This is what the DDX did for NV_ARCH_04, but a mmio-trace shows
* nvidia reading PFB_CFG_0, then writing back its original value.
* nvidia reading PFB_CFG_0, then writing back its original value.
* (which was 0x701114 in this case)
* (which was 0x701114 in this case)
*/
*/
nvkm_wr32
(
device
,
NV04_PFB_CFG0
,
0x1114
);
nvkm_wr32
(
device
,
NV04_PFB_CFG0
,
0x1114
);
return
0
;
}
}
static
const
struct
nvkm_fb_func
nv04_fb
=
{
.
init
=
nv04_fb_init
,
.
ram_new
=
nv04_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
int
nv04_fb_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
nv04_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nvkm_object
**
pobject
)
{
{
struct
nv04_fb_impl
*
impl
=
(
void
*
)
oclass
;
return
nvkm_fb_new_
(
&
nv04_fb
,
device
,
index
,
pfb
);
struct
nvkm_fb
*
fb
;
int
ret
;
ret
=
nvkm_fb_create
(
parent
,
engine
,
oclass
,
&
fb
);
*
pobject
=
nv_object
(
fb
);
if
(
ret
)
return
ret
;
fb
->
tile
.
regions
=
impl
->
tile
.
regions
;
fb
->
tile
.
init
=
impl
->
tile
.
init
;
fb
->
tile
.
comp
=
impl
->
tile
.
comp
;
fb
->
tile
.
fini
=
impl
->
tile
.
fini
;
fb
->
tile
.
prog
=
impl
->
tile
.
prog
;
return
0
;
}
}
struct
nvkm_oclass
*
nv04_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x04
),
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
nv04_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv04_ram_new
,
}.
base
.
base
;
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv04.h
deleted
100644 → 0
View file @
151abd44
#ifndef __NVKM_FB_NV04_H__
#define __NVKM_FB_NV04_H__
#include "priv.h"
int
nv04_fb_ctor
(
struct
nvkm_object
*
,
struct
nvkm_object
*
,
struct
nvkm_oclass
*
,
void
*
,
u32
,
struct
nvkm_object
**
);
struct
nv04_fb_impl
{
struct
nvkm_fb_impl
base
;
struct
{
int
regions
;
void
(
*
init
)(
struct
nvkm_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
void
(
*
comp
)(
struct
nvkm_fb
*
,
int
i
,
u32
size
,
u32
flags
,
struct
nvkm_fb_tile
*
);
void
(
*
fini
)(
struct
nvkm_fb
*
,
int
i
,
struct
nvkm_fb_tile
*
);
void
(
*
prog
)(
struct
nvkm_fb
*
,
int
i
,
struct
nvkm_fb_tile
*
);
}
tile
;
};
void
nv10_fb_tile_init
(
struct
nvkm_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
void
nv10_fb_tile_fini
(
struct
nvkm_fb
*
,
int
i
,
struct
nvkm_fb_tile
*
);
void
nv10_fb_tile_prog
(
struct
nvkm_fb
*
,
int
,
struct
nvkm_fb_tile
*
);
void
nv20_fb_tile_init
(
struct
nvkm_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
void
nv20_fb_tile_fini
(
struct
nvkm_fb
*
,
int
i
,
struct
nvkm_fb_tile
*
);
void
nv20_fb_tile_prog
(
struct
nvkm_fb
*
,
int
,
struct
nvkm_fb_tile
*
);
int
nv30_fb_init
(
struct
nvkm_object
*
);
void
nv30_fb_tile_init
(
struct
nvkm_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
void
nv40_fb_tile_comp
(
struct
nvkm_fb
*
,
int
i
,
u32
size
,
u32
flags
,
struct
nvkm_fb_tile
*
);
int
nv41_fb_init
(
struct
nvkm_object
*
);
void
nv41_fb_tile_prog
(
struct
nvkm_fb
*
,
int
,
struct
nvkm_fb_tile
*
);
int
nv44_fb_init
(
struct
nvkm_object
*
);
void
nv44_fb_tile_prog
(
struct
nvkm_fb
*
,
int
,
struct
nvkm_fb_tile
*
);
void
nv46_fb_tile_init
(
struct
nvkm_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
#endif
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv10.c
View file @
03c8952f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
void
void
...
@@ -54,19 +54,18 @@ nv10_fb_tile_prog(struct nvkm_fb *fb, int i, struct nvkm_fb_tile *tile)
...
@@ -54,19 +54,18 @@ nv10_fb_tile_prog(struct nvkm_fb *fb, int i, struct nvkm_fb_tile *tile)
nvkm_rd32
(
device
,
0x100240
+
(
i
*
0x10
));
nvkm_rd32
(
device
,
0x100240
+
(
i
*
0x10
));
}
}
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv10_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv10_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x10
),
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
_nvkm_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv10_ram_new
,
.
tile
.
regions
=
8
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv10_fb_tile_init
,
.
tile
.
init
=
nv10_fb_tile_init
,
.
tile
.
fini
=
nv10_fb_tile_fini
,
.
tile
.
fini
=
nv10_fb_tile_fini
,
.
tile
.
prog
=
nv10_fb_tile_prog
,
.
tile
.
prog
=
nv10_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv10_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv10_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv10_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv1a.c
View file @
03c8952f
...
@@ -23,22 +23,21 @@
...
@@ -23,22 +23,21 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv1a_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv1a_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x1a
),
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
_nvkm_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv1a_ram_new
,
.
tile
.
regions
=
8
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv10_fb_tile_init
,
.
tile
.
init
=
nv10_fb_tile_init
,
.
tile
.
fini
=
nv10_fb_tile_fini
,
.
tile
.
fini
=
nv10_fb_tile_fini
,
.
tile
.
prog
=
nv10_fb_tile_prog
,
.
tile
.
prog
=
nv10_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv1a_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv1a_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv1a_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv20.c
View file @
03c8952f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
void
void
...
@@ -34,7 +34,7 @@ nv20_fb_tile_init(struct nvkm_fb *fb, int i, u32 addr, u32 size, u32 pitch,
...
@@ -34,7 +34,7 @@ nv20_fb_tile_init(struct nvkm_fb *fb, int i, u32 addr, u32 size, u32 pitch,
tile
->
limit
=
max
(
1u
,
addr
+
size
)
-
1
;
tile
->
limit
=
max
(
1u
,
addr
+
size
)
-
1
;
tile
->
pitch
=
pitch
;
tile
->
pitch
=
pitch
;
if
(
flags
&
4
)
{
if
(
flags
&
4
)
{
fb
->
tile
.
comp
(
fb
,
i
,
size
,
flags
,
tile
);
fb
->
func
->
tile
.
comp
(
fb
,
i
,
size
,
flags
,
tile
);
tile
->
addr
|=
2
;
tile
->
addr
|=
2
;
}
}
}
}
...
@@ -77,20 +77,19 @@ nv20_fb_tile_prog(struct nvkm_fb *fb, int i, struct nvkm_fb_tile *tile)
...
@@ -77,20 +77,19 @@ nv20_fb_tile_prog(struct nvkm_fb *fb, int i, struct nvkm_fb_tile *tile)
nvkm_wr32
(
device
,
0x100300
+
(
i
*
0x04
),
tile
->
zcomp
);
nvkm_wr32
(
device
,
0x100300
+
(
i
*
0x04
),
tile
->
zcomp
);
}
}
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv20_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv20_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x20
),
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
_nvkm_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv20_ram_new
,
.
tile
.
regions
=
8
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv20_fb_tile_init
,
.
tile
.
init
=
nv20_fb_tile_init
,
.
tile
.
comp
=
nv20_fb_tile_comp
,
.
tile
.
comp
=
nv20_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv20_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv20_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv20_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv25.c
View file @
03c8952f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
static
void
static
void
...
@@ -42,20 +42,19 @@ nv25_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
...
@@ -42,20 +42,19 @@ nv25_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
}
}
}
}
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv25_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv25_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x25
),
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
_nvkm_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv20_ram_new
,
.
tile
.
regions
=
8
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv20_fb_tile_init
,
.
tile
.
init
=
nv20_fb_tile_init
,
.
tile
.
comp
=
nv25_fb_tile_comp
,
.
tile
.
comp
=
nv25_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv20_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv25_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv25_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv30.c
View file @
03c8952f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
void
void
...
@@ -34,8 +34,8 @@ nv30_fb_tile_init(struct nvkm_fb *fb, int i, u32 addr, u32 size, u32 pitch,
...
@@ -34,8 +34,8 @@ nv30_fb_tile_init(struct nvkm_fb *fb, int i, u32 addr, u32 size, u32 pitch,
if
(
!
(
flags
&
4
))
{
if
(
!
(
flags
&
4
))
{
tile
->
addr
=
(
0
<<
4
);
tile
->
addr
=
(
0
<<
4
);
}
else
{
}
else
{
if
(
fb
->
tile
.
comp
)
/* z compression */
if
(
fb
->
func
->
tile
.
comp
)
/* z compression */
fb
->
tile
.
comp
(
fb
,
i
,
size
,
flags
,
tile
);
fb
->
func
->
tile
.
comp
(
fb
,
i
,
size
,
flags
,
tile
);
tile
->
addr
=
(
1
<<
4
);
tile
->
addr
=
(
1
<<
4
);
}
}
...
@@ -65,7 +65,7 @@ nv30_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
...
@@ -65,7 +65,7 @@ nv30_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
static
int
static
int
calc_bias
(
struct
nvkm_fb
*
fb
,
int
k
,
int
i
,
int
j
)
calc_bias
(
struct
nvkm_fb
*
fb
,
int
k
,
int
i
,
int
j
)
{
{
struct
nvkm_device
*
device
=
nv_device
(
fb
)
;
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
int
b
=
(
device
->
chipset
>
0x30
?
int
b
=
(
device
->
chipset
>
0x30
?
nvkm_rd32
(
device
,
0x122c
+
0x10
*
k
+
0x4
*
j
)
>>
nvkm_rd32
(
device
,
0x122c
+
0x10
*
k
+
0x4
*
j
)
>>
(
4
*
(
i
^
1
))
:
(
4
*
(
i
^
1
))
:
...
@@ -88,16 +88,11 @@ calc_ref(struct nvkm_fb *fb, int l, int k, int i)
...
@@ -88,16 +88,11 @@ calc_ref(struct nvkm_fb *fb, int l, int k, int i)
return
x
;
return
x
;
}
}
int
void
nv30_fb_init
(
struct
nvkm_
object
*
object
)
nv30_fb_init
(
struct
nvkm_
fb
*
fb
)
{
{
struct
nvkm_device
*
device
=
nv_device
(
object
);
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
struct
nvkm_fb
*
fb
=
(
void
*
)
object
;
int
i
,
j
;
int
ret
,
i
,
j
;
ret
=
nvkm_fb_init
(
fb
);
if
(
ret
)
return
ret
;
/* Init the memory timing regs at 0x10037c/0x1003ac */
/* Init the memory timing regs at 0x10037c/0x1003ac */
if
(
device
->
chipset
==
0x30
||
if
(
device
->
chipset
==
0x30
||
...
@@ -117,24 +112,22 @@ nv30_fb_init(struct nvkm_object *object)
...
@@ -117,24 +112,22 @@ nv30_fb_init(struct nvkm_object *object)
calc_ref
(
fb
,
l
,
1
,
j
));
calc_ref
(
fb
,
l
,
1
,
j
));
}
}
}
}
return
0
;
}
}
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv30_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv30_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x30
),
.
init
=
nv30_fb_init
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
nv30_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv20_ram_new
,
.
tile
.
regions
=
8
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv30_fb_tile_comp
,
.
tile
.
comp
=
nv30_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv20_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv30_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv30_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv35.c
View file @
03c8952f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
static
void
static
void
...
@@ -43,20 +43,20 @@ nv35_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
...
@@ -43,20 +43,20 @@ nv35_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
}
}
}
}
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv35_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv35_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x35
),
.
init
=
nv30_fb_init
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
nv30_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv20_ram_new
,
.
tile
.
regions
=
8
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv35_fb_tile_comp
,
.
tile
.
comp
=
nv35_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv20_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv35_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv35_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv36.c
View file @
03c8952f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
static
void
static
void
...
@@ -43,20 +43,20 @@ nv36_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
...
@@ -43,20 +43,20 @@ nv36_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
}
}
}
}
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv36_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv36_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x36
),
.
init
=
nv30_fb_init
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
nv30_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv20_ram_new
,
.
tile
.
regions
=
8
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv36_fb_tile_comp
,
.
tile
.
comp
=
nv36_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv20_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv36_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv36_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv40.c
View file @
03c8952f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
void
void
...
@@ -43,35 +43,26 @@ nv40_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
...
@@ -43,35 +43,26 @@ nv40_fb_tile_comp(struct nvkm_fb *fb, int i, u32 size, u32 flags,
}
}
}
}
static
int
static
void
nv40_fb_init
(
struct
nvkm_
object
*
object
)
nv40_fb_init
(
struct
nvkm_
fb
*
fb
)
{
{
struct
nvkm_fb
*
fb
=
(
void
*
)
object
;
nvkm_mask
(
fb
->
subdev
.
device
,
0x10033c
,
0x00008000
,
0x00000000
);
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
int
ret
;
ret
=
nvkm_fb_init
(
fb
);
if
(
ret
)
return
ret
;
nvkm_mask
(
device
,
0x10033c
,
0x00008000
,
0x00000000
);
return
0
;
}
}
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv40_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv40_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x40
),
.
init
=
nv40_fb_init
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
nv40_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv40_ram_new
,
.
tile
.
regions
=
8
,
.
tile
.
regions
=
8
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv40_fb_tile_comp
,
.
tile
.
comp
=
nv40_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
.
tile
.
prog
=
nv20_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv40_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv40_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv40_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv41.c
View file @
03c8952f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
void
void
...
@@ -37,35 +37,26 @@ nv41_fb_tile_prog(struct nvkm_fb *fb, int i, struct nvkm_fb_tile *tile)
...
@@ -37,35 +37,26 @@ nv41_fb_tile_prog(struct nvkm_fb *fb, int i, struct nvkm_fb_tile *tile)
nvkm_wr32
(
device
,
0x100700
+
(
i
*
0x04
),
tile
->
zcomp
);
nvkm_wr32
(
device
,
0x100700
+
(
i
*
0x04
),
tile
->
zcomp
);
}
}
int
void
nv41_fb_init
(
struct
nvkm_
object
*
object
)
nv41_fb_init
(
struct
nvkm_
fb
*
fb
)
{
{
struct
nvkm_fb
*
fb
=
(
void
*
)
object
;
nvkm_wr32
(
fb
->
subdev
.
device
,
0x100800
,
0x00000001
);
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
int
ret
;
ret
=
nvkm_fb_init
(
fb
);
if
(
ret
)
return
ret
;
nvkm_wr32
(
device
,
0x100800
,
0x00000001
);
return
0
;
}
}
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv41_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv41_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x41
),
.
init
=
nv41_fb_init
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
nv41_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv41_ram_new
,
.
tile
.
regions
=
12
,
.
tile
.
regions
=
12
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv40_fb_tile_comp
,
.
tile
.
comp
=
nv40_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv41_fb_tile_prog
,
.
tile
.
prog
=
nv41_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv41_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv41_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv41_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv44.c
View file @
03c8952f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
static
void
static
void
...
@@ -46,35 +46,27 @@ nv44_fb_tile_prog(struct nvkm_fb *fb, int i, struct nvkm_fb_tile *tile)
...
@@ -46,35 +46,27 @@ nv44_fb_tile_prog(struct nvkm_fb *fb, int i, struct nvkm_fb_tile *tile)
nvkm_rd32
(
device
,
0x100600
+
(
i
*
0x10
));
nvkm_rd32
(
device
,
0x100600
+
(
i
*
0x10
));
}
}
int
void
nv44_fb_init
(
struct
nvkm_
object
*
object
)
nv44_fb_init
(
struct
nvkm_
fb
*
fb
)
{
{
struct
nvkm_fb
*
fb
=
(
void
*
)
object
;
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
struct
nvkm_device
*
device
=
fb
->
subdev
.
device
;
int
ret
;
ret
=
nvkm_fb_init
(
fb
);
if
(
ret
)
return
ret
;
nvkm_wr32
(
device
,
0x100850
,
0x80000000
);
nvkm_wr32
(
device
,
0x100850
,
0x80000000
);
nvkm_wr32
(
device
,
0x100800
,
0x00000001
);
nvkm_wr32
(
device
,
0x100800
,
0x00000001
);
return
0
;
}
}
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv44_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv44_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x44
),
.
init
=
nv44_fb_init
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
nv44_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv44_ram_new
,
.
tile
.
regions
=
12
,
.
tile
.
regions
=
12
,
.
tile
.
init
=
nv44_fb_tile_init
,
.
tile
.
init
=
nv44_fb_tile_init
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv44_fb_tile_prog
,
.
tile
.
prog
=
nv44_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv44_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv44_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv44_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv46.c
View file @
03c8952f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
void
void
...
@@ -40,19 +40,19 @@ nv46_fb_tile_init(struct nvkm_fb *fb, int i, u32 addr, u32 size, u32 pitch,
...
@@ -40,19 +40,19 @@ nv46_fb_tile_init(struct nvkm_fb *fb, int i, u32 addr, u32 size, u32 pitch,
tile
->
pitch
=
pitch
;
tile
->
pitch
=
pitch
;
}
}
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv46_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv46_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x46
),
.
init
=
nv44_fb_init
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
nv44_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv44_ram_new
,
.
tile
.
regions
=
15
,
.
tile
.
regions
=
15
,
.
tile
.
init
=
nv46_fb_tile_init
,
.
tile
.
init
=
nv46_fb_tile_init
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv44_fb_tile_prog
,
.
tile
.
prog
=
nv44_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv44_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv46_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv46_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv47.c
View file @
03c8952f
...
@@ -23,23 +23,23 @@
...
@@ -23,23 +23,23 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv47_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv47_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x47
),
.
init
=
nv41_fb_init
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
nv41_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv41_ram_new
,
.
tile
.
regions
=
15
,
.
tile
.
regions
=
15
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv40_fb_tile_comp
,
.
tile
.
comp
=
nv40_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv41_fb_tile_prog
,
.
tile
.
prog
=
nv41_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv41_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv47_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv47_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv49.c
View file @
03c8952f
...
@@ -23,23 +23,23 @@
...
@@ -23,23 +23,23 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv49_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv49_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x49
),
.
init
=
nv41_fb_init
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
nv41_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv49_ram_new
,
.
tile
.
regions
=
15
,
.
tile
.
regions
=
15
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
init
=
nv30_fb_tile_init
,
.
tile
.
comp
=
nv40_fb_tile_comp
,
.
tile
.
comp
=
nv40_fb_tile_comp
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv41_fb_tile_prog
,
.
tile
.
prog
=
nv41_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv49_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv49_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv49_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv4e.c
View file @
03c8952f
...
@@ -23,22 +23,22 @@
...
@@ -23,22 +23,22 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
*/
#include "
nv04
.h"
#include "
priv
.h"
#include "ram.h"
#include "ram.h"
struct
nvkm_oclass
*
static
const
struct
nvkm_fb_func
nv4e_fb_oclass
=
&
(
struct
nv04_fb_impl
)
{
nv4e_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x4e
),
.
init
=
nv44_fb_init
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv04_fb_ctor
,
.
dtor
=
_nvkm_fb_dtor
,
.
init
=
nv44_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv04_fb_memtype_valid
,
.
base
.
ram_new
=
nv4e_ram_new
,
.
tile
.
regions
=
12
,
.
tile
.
regions
=
12
,
.
tile
.
init
=
nv46_fb_tile_init
,
.
tile
.
init
=
nv46_fb_tile_init
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
fini
=
nv20_fb_tile_fini
,
.
tile
.
prog
=
nv44_fb_tile_prog
,
.
tile
.
prog
=
nv44_fb_tile_prog
,
}.
base
.
base
;
.
ram_new
=
nv44_ram_new
,
.
memtype_valid
=
nv04_fb_memtype_valid
,
};
int
nv4e_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nvkm_fb_new_
(
&
nv4e_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c
View file @
03c8952f
...
@@ -40,7 +40,14 @@ nv50_fb_memtype[0x80] = {
...
@@ -40,7 +40,14 @@ nv50_fb_memtype[0x80] = {
1
,
0
,
2
,
0
,
1
,
0
,
2
,
0
,
1
,
1
,
2
,
2
,
1
,
1
,
0
,
0
1
,
0
,
2
,
0
,
1
,
0
,
2
,
0
,
1
,
1
,
2
,
2
,
1
,
1
,
0
,
0
};
};
bool
static
int
nv50_fb_ram_new
(
struct
nvkm_fb
*
base
,
struct
nvkm_ram
**
pram
)
{
struct
nv50_fb
*
fb
=
nv50_fb
(
base
);
return
fb
->
func
->
ram_new
(
&
fb
->
base
,
pram
);
}
static
bool
nv50_fb_memtype_valid
(
struct
nvkm_fb
*
fb
,
u32
memtype
)
nv50_fb_memtype_valid
(
struct
nvkm_fb
*
fb
,
u32
memtype
)
{
{
return
nv50_fb_memtype
[(
memtype
&
0xff00
)
>>
8
]
!=
0
;
return
nv50_fb_memtype
[(
memtype
&
0xff00
)
>>
8
]
!=
0
;
...
@@ -143,10 +150,11 @@ static const struct nvkm_enum vm_fault[] = {
...
@@ -143,10 +150,11 @@ static const struct nvkm_enum vm_fault[] = {
};
};
static
void
static
void
nv50_fb_intr
(
struct
nvkm_
subdev
*
subdev
)
nv50_fb_intr
(
struct
nvkm_
fb
*
base
)
{
{
struct
nv50_fb
*
fb
=
(
void
*
)
subdev
;
struct
nv50_fb
*
fb
=
nv50_fb
(
base
);
struct
nvkm_device
*
device
=
fb
->
base
.
subdev
.
device
;
struct
nvkm_subdev
*
subdev
=
&
fb
->
base
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_fifo
*
fifo
=
device
->
fifo
;
struct
nvkm_fifo
*
fifo
=
device
->
fifo
;
struct
nvkm_fifo_chan
*
chan
;
struct
nvkm_fifo_chan
*
chan
;
const
struct
nvkm_enum
*
en
,
*
re
,
*
cl
,
*
sc
;
const
struct
nvkm_enum
*
en
,
*
re
,
*
cl
,
*
sc
;
...
@@ -202,40 +210,28 @@ nv50_fb_intr(struct nvkm_subdev *subdev)
...
@@ -202,40 +210,28 @@ nv50_fb_intr(struct nvkm_subdev *subdev)
nvkm_fifo_chan_put
(
fifo
,
flags
,
&
chan
);
nvkm_fifo_chan_put
(
fifo
,
flags
,
&
chan
);
}
}
int
static
void
nv50_fb_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
nv50_fb_init
(
struct
nvkm_fb
*
base
)
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nvkm_object
**
pobject
)
{
{
struct
nvkm_device
*
device
=
nv_device
(
parent
);
struct
nv50_fb
*
fb
=
nv50_fb
(
base
);
struct
nv50_fb
*
fb
;
struct
nvkm_device
*
device
=
fb
->
base
.
subdev
.
device
;
int
ret
;
ret
=
nvkm_fb_create
(
parent
,
engine
,
oclass
,
&
fb
);
*
pobject
=
nv_object
(
fb
);
if
(
ret
)
return
ret
;
fb
->
r100c08_page
=
alloc_page
(
GFP_KERNEL
|
__GFP_ZERO
);
/* Not a clue what this is exactly. Without pointing it at a
if
(
fb
->
r100c08_page
)
{
* scratch page, VRAM->GART blits with M2MF (as in DDX DFS)
fb
->
r100c08
=
dma_map_page
(
nv_device_base
(
device
),
* cause IOMMU "read from address 0" errors (rh#561267)
fb
->
r100c08_page
,
0
,
PAGE_SIZE
,
*/
DMA_BIDIRECTIONAL
);
nvkm_wr32
(
device
,
0x100c08
,
fb
->
r100c08
>>
8
);
if
(
dma_mapping_error
(
nv_device_base
(
device
),
fb
->
r100c08
))
return
-
EFAULT
;
}
else
{
nvkm_warn
(
&
fb
->
base
.
subdev
,
"failed 100c08 page alloc
\n
"
);
}
nv_subdev
(
fb
)
->
intr
=
nv50_fb_intr
;
/* This is needed to get meaningful information from 100c90
return
0
;
* on traps. No idea what these values mean exactly. */
nvkm_wr32
(
device
,
0x100c90
,
fb
->
func
->
trap
);
}
}
void
static
void
*
nv50_fb_dtor
(
struct
nvkm_
object
*
object
)
nv50_fb_dtor
(
struct
nvkm_
fb
*
base
)
{
{
struct
nv
km_device
*
device
=
nv_device
(
object
);
struct
nv
50_fb
*
fb
=
nv50_fb
(
base
);
struct
nv
50_fb
*
fb
=
(
void
*
)
object
;
struct
nv
km_device
*
device
=
fb
->
base
.
subdev
.
device
;
if
(
fb
->
r100c08_page
)
{
if
(
fb
->
r100c08_page
)
{
dma_unmap_page
(
nv_device_base
(
device
),
fb
->
r100c08
,
PAGE_SIZE
,
dma_unmap_page
(
nv_device_base
(
device
),
fb
->
r100c08
,
PAGE_SIZE
,
...
@@ -243,43 +239,52 @@ nv50_fb_dtor(struct nvkm_object *object)
...
@@ -243,43 +239,52 @@ nv50_fb_dtor(struct nvkm_object *object)
__free_page
(
fb
->
r100c08_page
);
__free_page
(
fb
->
r100c08_page
);
}
}
nvkm_fb_destroy
(
&
fb
->
base
)
;
return
fb
;
}
}
static
const
struct
nvkm_fb_func
nv50_fb_
=
{
.
dtor
=
nv50_fb_dtor
,
.
init
=
nv50_fb_init
,
.
intr
=
nv50_fb_intr
,
.
ram_new
=
nv50_fb_ram_new
,
.
memtype_valid
=
nv50_fb_memtype_valid
,
};
int
int
nv50_fb_init
(
struct
nvkm_object
*
object
)
nv50_fb_new_
(
const
struct
nv50_fb_func
*
func
,
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
{
struct
nv50_fb_impl
*
impl
=
(
void
*
)
object
->
oclass
;
struct
nv50_fb
*
fb
;
struct
nv50_fb
*
fb
=
(
void
*
)
object
;
struct
nvkm_device
*
device
=
fb
->
base
.
subdev
.
device
;
int
ret
;
ret
=
nvkm_fb_init
(
&
fb
->
base
);
if
(
!
(
fb
=
kzalloc
(
sizeof
(
*
fb
),
GFP_KERNEL
)))
if
(
ret
)
return
-
ENOMEM
;
return
ret
;
nvkm_fb_ctor
(
&
nv50_fb_
,
device
,
index
,
&
fb
->
base
);
fb
->
func
=
func
;
*
pfb
=
&
fb
->
base
;
/* Not a clue what this is exactly. Without pointing it at a
fb
->
r100c08_page
=
alloc_page
(
GFP_KERNEL
|
__GFP_ZERO
);
* scratch page, VRAM->GART blits with M2MF (as in DDX DFS)
if
(
fb
->
r100c08_page
)
{
* cause IOMMU "read from address 0" errors (rh#561267)
fb
->
r100c08
=
dma_map_page
(
nv_device_base
(
device
),
*/
fb
->
r100c08_page
,
0
,
PAGE_SIZE
,
nvkm_wr32
(
device
,
0x100c08
,
fb
->
r100c08
>>
8
);
DMA_BIDIRECTIONAL
);
if
(
dma_mapping_error
(
nv_device_base
(
device
),
fb
->
r100c08
))
return
-
EFAULT
;
}
else
{
nvkm_warn
(
&
fb
->
base
.
subdev
,
"failed 100c08 page alloc
\n
"
);
}
/* This is needed to get meaningful information from 100c90
* on traps. No idea what these values mean exactly. */
nvkm_wr32
(
device
,
0x100c90
,
impl
->
trap
);
return
0
;
return
0
;
}
}
struct
nvkm_oclass
*
static
const
struct
nv50_fb_func
nv50_fb_oclass
=
&
(
struct
nv50_fb_impl
)
{
nv50_fb
=
{
.
base
.
base
.
handle
=
NV_SUBDEV
(
FB
,
0x50
),
.
ram_new
=
nv50_ram_new
,
.
base
.
base
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
nv50_fb_ctor
,
.
dtor
=
nv50_fb_dtor
,
.
init
=
nv50_fb_init
,
.
fini
=
_nvkm_fb_fini
,
},
.
base
.
memtype
=
nv50_fb_memtype_valid
,
.
base
.
ram_new
=
nv50_ram_new
,
.
trap
=
0x000707ff
,
.
trap
=
0x000707ff
,
}.
base
.
base
;
};
int
nv50_fb_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
pfb
)
{
return
nv50_fb_new_
(
&
nv50_fb
,
device
,
index
,
pfb
);
}
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.h
View file @
03c8952f
#ifndef __NVKM_FB_NV50_H__
#ifndef __NVKM_FB_NV50_H__
#define __NVKM_FB_NV50_H__
#define __NVKM_FB_NV50_H__
#define nv50_fb(p) container_of((p), struct nv50_fb, base)
#include "priv.h"
#include "priv.h"
struct
nv50_fb
{
struct
nv50_fb
{
const
struct
nv50_fb_func
*
func
;
struct
nvkm_fb
base
;
struct
nvkm_fb
base
;
struct
page
*
r100c08_page
;
struct
page
*
r100c08_page
;
dma_addr_t
r100c08
;
dma_addr_t
r100c08
;
};
};
int
nv50_fb_ctor
(
struct
nvkm_object
*
,
struct
nvkm_object
*
,
struct
nv50_fb_func
{
struct
nvkm_oclass
*
,
void
*
,
u32
,
int
(
*
ram_new
)(
struct
nvkm_fb
*
,
struct
nvkm_ram
**
);
struct
nvkm_object
**
);
void
nv50_fb_dtor
(
struct
nvkm_object
*
);
int
nv50_fb_init
(
struct
nvkm_object
*
);
struct
nv50_fb_impl
{
struct
nvkm_fb_impl
base
;
u32
trap
;
u32
trap
;
};
};
int
nv50_fb_new_
(
const
struct
nv50_fb_func
*
,
struct
nvkm_device
*
,
int
index
,
struct
nvkm_fb
**
pfb
);
extern
int
nv50_fb_memtype
[
0x80
];
extern
int
nv50_fb_memtype
[
0x80
];
#endif
#endif
drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
View file @
03c8952f
#ifndef __NVKM_FB_PRIV_H__
#ifndef __NVKM_FB_PRIV_H__
#define __NVKM_FB_PRIV_H__
#define __NVKM_FB_PRIV_H__
#define nvkm_fb(p) container_of((p), struct nvkm_fb, subdev)
#include <subdev/fb.h>
#include <subdev/fb.h>
struct
nvkm_bios
;
struct
nvkm_bios
;
#define nvkm_fb_create(p,e,c,d) \
struct
nvkm_fb_func
{
nvkm_fb_create_((p), (e), (c), sizeof(**d), (void **)d)
void
*
(
*
dtor
)(
struct
nvkm_fb
*
);
#define nvkm_fb_destroy(p) ({ \
void
(
*
init
)(
struct
nvkm_fb
*
);
struct nvkm_fb *_fb = (p); \
void
(
*
intr
)(
struct
nvkm_fb
*
);
_nvkm_fb_dtor(nv_object(_fb)); \
})
struct
{
#define nvkm_fb_init(p) ({ \
int
regions
;
struct nvkm_fb *_fb = (p); \
void
(
*
init
)(
struct
nvkm_fb
*
,
int
i
,
u32
addr
,
u32
size
,
_nvkm_fb_init(nv_object(_fb)); \
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
})
void
(
*
comp
)(
struct
nvkm_fb
*
,
int
i
,
u32
size
,
u32
flags
,
#define nvkm_fb_fini(p,s) ({ \
struct
nvkm_fb_tile
*
);
struct nvkm_fb *_fb = (p); \
void
(
*
fini
)(
struct
nvkm_fb
*
,
int
i
,
struct
nvkm_fb_tile
*
);
_nvkm_fb_fini(nv_object(_fb), (s)); \
void
(
*
prog
)(
struct
nvkm_fb
*
,
int
i
,
struct
nvkm_fb_tile
*
);
})
}
tile
;
int
nvkm_fb_create_
(
struct
nvkm_object
*
,
struct
nvkm_object
*
,
struct
nvkm_oclass
*
,
int
,
void
**
);
void
_nvkm_fb_dtor
(
struct
nvkm_object
*
);
int
_nvkm_fb_init
(
struct
nvkm_object
*
);
int
_nvkm_fb_fini
(
struct
nvkm_object
*
,
bool
);
struct
nvkm_fb_impl
{
struct
nvkm_oclass
base
;
int
(
*
ram_new
)(
struct
nvkm_fb
*
,
struct
nvkm_ram
**
);
int
(
*
ram_new
)(
struct
nvkm_fb
*
,
struct
nvkm_ram
**
);
bool
(
*
memtype
)(
struct
nvkm_fb
*
,
u32
);
bool
(
*
memtype_valid
)(
struct
nvkm_fb
*
,
u32
memtype
);
};
};
void
nvkm_fb_ctor
(
const
struct
nvkm_fb_func
*
,
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
*
);
int
nvkm_fb_new_
(
const
struct
nvkm_fb_func
*
,
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_fb
**
);
int
nvkm_fb_bios_memtype
(
struct
nvkm_bios
*
);
bool
nv04_fb_memtype_valid
(
struct
nvkm_fb
*
,
u32
memtype
);
bool
nv04_fb_memtype_valid
(
struct
nvkm_fb
*
,
u32
memtype
);
bool
nv50_fb_memtype_valid
(
struct
nvkm_fb
*
,
u32
memtype
);
int
nvkm_fb_bios_memtype
(
struct
nvkm_bios
*
);
void
nv10_fb_tile_init
(
struct
nvkm_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
void
nv10_fb_tile_fini
(
struct
nvkm_fb
*
,
int
i
,
struct
nvkm_fb_tile
*
);
void
nv10_fb_tile_prog
(
struct
nvkm_fb
*
,
int
,
struct
nvkm_fb_tile
*
);
void
nv20_fb_tile_init
(
struct
nvkm_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
void
nv20_fb_tile_fini
(
struct
nvkm_fb
*
,
int
i
,
struct
nvkm_fb_tile
*
);
void
nv20_fb_tile_prog
(
struct
nvkm_fb
*
,
int
,
struct
nvkm_fb_tile
*
);
void
nv30_fb_init
(
struct
nvkm_fb
*
);
void
nv30_fb_tile_init
(
struct
nvkm_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
void
nv40_fb_tile_comp
(
struct
nvkm_fb
*
,
int
i
,
u32
size
,
u32
flags
,
struct
nvkm_fb_tile
*
);
void
nv41_fb_init
(
struct
nvkm_fb
*
);
void
nv41_fb_tile_prog
(
struct
nvkm_fb
*
,
int
,
struct
nvkm_fb_tile
*
);
void
nv44_fb_init
(
struct
nvkm_fb
*
);
void
nv44_fb_tile_prog
(
struct
nvkm_fb
*
,
int
,
struct
nvkm_fb_tile
*
);
void
nv46_fb_tile_init
(
struct
nvkm_fb
*
,
int
i
,
u32
addr
,
u32
size
,
u32
pitch
,
u32
flags
,
struct
nvkm_fb_tile
*
);
bool
gf100_fb_memtype_valid
(
struct
nvkm_fb
*
,
u32
);
#endif
#endif
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramfuc.h
View file @
03c8952f
...
@@ -57,10 +57,7 @@ ramfuc_reg(u32 addr)
...
@@ -57,10 +57,7 @@ ramfuc_reg(u32 addr)
static
inline
int
static
inline
int
ramfuc_init
(
struct
ramfuc
*
ram
,
struct
nvkm_fb
*
fb
)
ramfuc_init
(
struct
ramfuc
*
ram
,
struct
nvkm_fb
*
fb
)
{
{
struct
nvkm_pmu
*
pmu
=
nvkm_pmu
(
fb
);
int
ret
=
nvkm_memx_init
(
fb
->
subdev
.
device
->
pmu
,
&
ram
->
memx
);
int
ret
;
ret
=
nvkm_memx_init
(
pmu
,
&
ram
->
memx
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
@@ -148,9 +145,7 @@ ramfuc_train(struct ramfuc *ram)
...
@@ -148,9 +145,7 @@ ramfuc_train(struct ramfuc *ram)
static
inline
int
static
inline
int
ramfuc_train_result
(
struct
nvkm_fb
*
fb
,
u32
*
result
,
u32
rsize
)
ramfuc_train_result
(
struct
nvkm_fb
*
fb
,
u32
*
result
,
u32
rsize
)
{
{
struct
nvkm_pmu
*
pmu
=
nvkm_pmu
(
fb
);
return
nvkm_memx_train_result
(
fb
->
subdev
.
device
->
pmu
,
result
,
rsize
);
return
nvkm_memx_train_result
(
pmu
,
result
,
rsize
);
}
}
static
inline
void
static
inline
void
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c
View file @
03c8952f
...
@@ -1457,7 +1457,7 @@ gk104_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
...
@@ -1457,7 +1457,7 @@ gk104_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
struct
dcb_gpio_func
func
;
struct
dcb_gpio_func
func
;
struct
gk104_ram
*
ram
;
struct
gk104_ram
*
ram
;
int
ret
,
i
;
int
ret
,
i
;
u8
ramcfg
=
nvbios_ramcfg_index
(
nv_subdev
(
fb
)
);
u8
ramcfg
=
nvbios_ramcfg_index
(
subdev
);
u32
tmp
;
u32
tmp
;
if
(
!
(
ram
=
kzalloc
(
sizeof
(
*
ram
),
GFP_KERNEL
)))
if
(
!
(
ram
=
kzalloc
(
sizeof
(
*
ram
),
GFP_KERNEL
)))
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv50.c
View file @
03c8952f
...
@@ -77,14 +77,15 @@ static void
...
@@ -77,14 +77,15 @@ static void
nv50_vm_map
(
struct
nvkm_vma
*
vma
,
struct
nvkm_memory
*
pgt
,
nv50_vm_map
(
struct
nvkm_vma
*
vma
,
struct
nvkm_memory
*
pgt
,
struct
nvkm_mem
*
mem
,
u32
pte
,
u32
cnt
,
u64
phys
,
u64
delta
)
struct
nvkm_mem
*
mem
,
u32
pte
,
u32
cnt
,
u64
phys
,
u64
delta
)
{
{
struct
nvkm_ram
*
ram
=
vma
->
vm
->
mmu
->
subdev
.
device
->
fb
->
ram
;
u32
comp
=
(
mem
->
memtype
&
0x180
)
>>
7
;
u32
comp
=
(
mem
->
memtype
&
0x180
)
>>
7
;
u32
block
,
target
;
u32
block
,
target
;
int
i
;
int
i
;
/* IGPs don't have real VRAM, re-target to stolen system memory */
/* IGPs don't have real VRAM, re-target to stolen system memory */
target
=
0
;
target
=
0
;
if
(
nvkm_fb
(
vma
->
vm
->
mmu
)
->
ram
->
stolen
)
{
if
(
ram
->
stolen
)
{
phys
+=
nvkm_fb
(
vma
->
vm
->
mmu
)
->
ram
->
stolen
;
phys
+=
ram
->
stolen
;
target
=
3
;
target
=
3
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment