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
aa860e4b
Commit
aa860e4b
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/devinit: switch to subdev printk macros
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
b907649e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
22 deletions
+29
-22
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm204.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm204.c
+5
-4
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
+5
-3
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv10.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv10.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv20.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv20.c
+4
-4
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c
+7
-5
No files found.
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c
View file @
aa860e4b
...
@@ -55,7 +55,7 @@ gf100_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq)
...
@@ -55,7 +55,7 @@ gf100_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq)
nvkm_wr32
(
device
,
info
.
reg
+
0x10
,
fN
<<
16
);
nvkm_wr32
(
device
,
info
.
reg
+
0x10
,
fN
<<
16
);
break
;
break
;
default:
default:
nv
_warn
(
init
,
"0x
%08x/%dKhz unimplemented
\n
"
,
type
,
freq
);
nv
km_warn
(
subdev
,
"
%08x/%dKhz unimplemented
\n
"
,
type
,
freq
);
ret
=
-
EINVAL
;
ret
=
-
EINVAL
;
break
;
break
;
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm204.c
View file @
aa860e4b
...
@@ -81,11 +81,12 @@ static int
...
@@ -81,11 +81,12 @@ static int
pmu_load
(
struct
nv50_devinit
*
init
,
u8
type
,
bool
post
,
pmu_load
(
struct
nv50_devinit
*
init
,
u8
type
,
bool
post
,
u32
*
init_addr_pmu
,
u32
*
args_addr_pmu
)
u32
*
init_addr_pmu
,
u32
*
args_addr_pmu
)
{
{
struct
nvkm_bios
*
bios
=
nvkm_bios
(
init
);
struct
nvkm_subdev
*
subdev
=
&
init
->
base
.
subdev
;
struct
nvkm_bios
*
bios
=
subdev
->
device
->
bios
;
struct
nvbios_pmuR
pmu
;
struct
nvbios_pmuR
pmu
;
if
(
!
nvbios_pmuRm
(
bios
,
type
,
&
pmu
))
{
if
(
!
nvbios_pmuRm
(
bios
,
type
,
&
pmu
))
{
nv
_error
(
init
,
"VBIOS PMU fuc %02x not found
\n
"
,
type
);
nv
km_error
(
subdev
,
"VBIOS PMU fuc %02x not found
\n
"
,
type
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -109,7 +110,7 @@ static int
...
@@ -109,7 +110,7 @@ static int
gm204_devinit_post
(
struct
nvkm_subdev
*
subdev
,
bool
post
)
gm204_devinit_post
(
struct
nvkm_subdev
*
subdev
,
bool
post
)
{
{
struct
nv50_devinit
*
init
=
(
void
*
)
nvkm_devinit
(
subdev
);
struct
nv50_devinit
*
init
=
(
void
*
)
nvkm_devinit
(
subdev
);
struct
nvkm_device
*
device
=
init
->
base
.
subdev
.
device
;
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_bios
*
bios
=
device
->
bios
;
struct
nvkm_bios
*
bios
=
device
->
bios
;
struct
bit_entry
bit_I
;
struct
bit_entry
bit_I
;
u32
exec
,
args
;
u32
exec
,
args
;
...
@@ -117,7 +118,7 @@ gm204_devinit_post(struct nvkm_subdev *subdev, bool post)
...
@@ -117,7 +118,7 @@ gm204_devinit_post(struct nvkm_subdev *subdev, bool post)
if
(
bit_entry
(
bios
,
'I'
,
&
bit_I
)
||
bit_I
.
version
!=
1
||
if
(
bit_entry
(
bios
,
'I'
,
&
bit_I
)
||
bit_I
.
version
!=
1
||
bit_I
.
length
<
0x1c
)
{
bit_I
.
length
<
0x1c
)
{
nv
_error
(
init
,
"VBIOS PMU init data not found
\n
"
);
nv
km_error
(
subdev
,
"VBIOS PMU init data not found
\n
"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
View file @
aa860e4b
...
@@ -54,7 +54,7 @@ gt215_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq)
...
@@ -54,7 +54,7 @@ gt215_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq)
nvkm_wr32
(
device
,
info
.
reg
+
8
,
fN
);
nvkm_wr32
(
device
,
info
.
reg
+
8
,
fN
);
break
;
break
;
default:
default:
nv
_warn
(
init
,
"0x
%08x/%dKhz unimplemented
\n
"
,
type
,
freq
);
nv
km_warn
(
subdev
,
"
%08x/%dKhz unimplemented
\n
"
,
type
,
freq
);
ret
=
-
EINVAL
;
ret
=
-
EINVAL
;
break
;
break
;
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c
View file @
aa860e4b
...
@@ -35,7 +35,8 @@
...
@@ -35,7 +35,8 @@
static
void
static
void
nv04_devinit_meminit
(
struct
nvkm_devinit
*
init
)
nv04_devinit_meminit
(
struct
nvkm_devinit
*
init
)
{
{
struct
nvkm_device
*
device
=
init
->
subdev
.
device
;
struct
nvkm_subdev
*
subdev
=
&
init
->
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
u32
patt
=
0xdeadbeef
;
u32
patt
=
0xdeadbeef
;
struct
io_mapping
*
fb
;
struct
io_mapping
*
fb
;
int
i
;
int
i
;
...
@@ -43,7 +44,7 @@ nv04_devinit_meminit(struct nvkm_devinit *init)
...
@@ -43,7 +44,7 @@ nv04_devinit_meminit(struct nvkm_devinit *init)
/* Map the framebuffer aperture */
/* Map the framebuffer aperture */
fb
=
fbmem_init
(
device
);
fb
=
fbmem_init
(
device
);
if
(
!
fb
)
{
if
(
!
fb
)
{
nv
_error
(
init
,
"failed to map fb
\n
"
);
nv
km_error
(
subdev
,
"failed to map fb
\n
"
);
return
;
return
;
}
}
...
@@ -414,6 +415,7 @@ int
...
@@ -414,6 +415,7 @@ int
nv04_devinit_init
(
struct
nvkm_object
*
object
)
nv04_devinit_init
(
struct
nvkm_object
*
object
)
{
{
struct
nv04_devinit
*
init
=
(
void
*
)
object
;
struct
nv04_devinit
*
init
=
(
void
*
)
object
;
struct
nvkm_subdev
*
subdev
=
&
init
->
base
.
subdev
;
if
(
!
init
->
base
.
post
)
{
if
(
!
init
->
base
.
post
)
{
u32
htotal
=
nv_rdvgac
(
init
,
0
,
0x06
);
u32
htotal
=
nv_rdvgac
(
init
,
0
,
0x06
);
...
@@ -422,7 +424,7 @@ nv04_devinit_init(struct nvkm_object *object)
...
@@ -422,7 +424,7 @@ nv04_devinit_init(struct nvkm_object *object)
htotal
|=
(
nv_rdvgac
(
init
,
0
,
0x25
)
&
0x01
)
<<
10
;
htotal
|=
(
nv_rdvgac
(
init
,
0
,
0x25
)
&
0x01
)
<<
10
;
htotal
|=
(
nv_rdvgac
(
init
,
0
,
0x41
)
&
0x01
)
<<
11
;
htotal
|=
(
nv_rdvgac
(
init
,
0
,
0x41
)
&
0x01
)
<<
11
;
if
(
!
htotal
)
{
if
(
!
htotal
)
{
nv
_info
(
init
,
"adaptor not initialised
\n
"
);
nv
km_debug
(
subdev
,
"adaptor not initialised
\n
"
);
init
->
base
.
post
=
true
;
init
->
base
.
post
=
true
;
}
}
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv05.c
View file @
aa860e4b
...
@@ -44,7 +44,8 @@ nv05_devinit_meminit(struct nvkm_devinit *init)
...
@@ -44,7 +44,8 @@ nv05_devinit_meminit(struct nvkm_devinit *init)
{
0x06
,
0x00
},
{
0x06
,
0x00
},
{
0x00
,
0x00
}
{
0x00
,
0x00
}
};
};
struct
nvkm_device
*
device
=
init
->
subdev
.
device
;
struct
nvkm_subdev
*
subdev
=
&
init
->
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_bios
*
bios
=
device
->
bios
;
struct
nvkm_bios
*
bios
=
device
->
bios
;
struct
io_mapping
*
fb
;
struct
io_mapping
*
fb
;
u32
patt
=
0xdeadbeef
;
u32
patt
=
0xdeadbeef
;
...
@@ -55,7 +56,7 @@ nv05_devinit_meminit(struct nvkm_devinit *init)
...
@@ -55,7 +56,7 @@ nv05_devinit_meminit(struct nvkm_devinit *init)
/* Map the framebuffer aperture */
/* Map the framebuffer aperture */
fb
=
fbmem_init
(
device
);
fb
=
fbmem_init
(
device
);
if
(
!
fb
)
{
if
(
!
fb
)
{
nv
_error
(
init
,
"failed to map fb
\n
"
);
nv
km_error
(
subdev
,
"failed to map fb
\n
"
);
return
;
return
;
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv10.c
View file @
aa860e4b
...
@@ -32,7 +32,8 @@
...
@@ -32,7 +32,8 @@
static
void
static
void
nv10_devinit_meminit
(
struct
nvkm_devinit
*
init
)
nv10_devinit_meminit
(
struct
nvkm_devinit
*
init
)
{
{
struct
nvkm_device
*
device
=
init
->
subdev
.
device
;
struct
nvkm_subdev
*
subdev
=
&
init
->
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
static
const
int
mem_width
[]
=
{
0x10
,
0x00
,
0x20
};
static
const
int
mem_width
[]
=
{
0x10
,
0x00
,
0x20
};
int
mem_width_count
;
int
mem_width_count
;
uint32_t
patt
=
0xdeadbeef
;
uint32_t
patt
=
0xdeadbeef
;
...
@@ -47,7 +48,7 @@ nv10_devinit_meminit(struct nvkm_devinit *init)
...
@@ -47,7 +48,7 @@ nv10_devinit_meminit(struct nvkm_devinit *init)
/* Map the framebuffer aperture */
/* Map the framebuffer aperture */
fb
=
fbmem_init
(
device
);
fb
=
fbmem_init
(
device
);
if
(
!
fb
)
{
if
(
!
fb
)
{
nv
_error
(
init
,
"failed to map fb
\n
"
);
nv
km_error
(
subdev
,
"failed to map fb
\n
"
);
return
;
return
;
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv20.c
View file @
aa860e4b
...
@@ -30,10 +30,10 @@
...
@@ -30,10 +30,10 @@
#include <subdev/bios/init.h>
#include <subdev/bios/init.h>
static
void
static
void
nv20_devinit_meminit
(
struct
nvkm_devinit
*
dev
init
)
nv20_devinit_meminit
(
struct
nvkm_devinit
*
init
)
{
{
struct
nv
04_devinit
*
init
=
(
void
*
)
devinit
;
struct
nv
km_subdev
*
subdev
=
&
init
->
subdev
;
struct
nvkm_device
*
device
=
nv_device
(
init
)
;
struct
nvkm_device
*
device
=
subdev
->
device
;
uint32_t
mask
=
(
device
->
chipset
>=
0x25
?
0x300
:
0x900
);
uint32_t
mask
=
(
device
->
chipset
>=
0x25
?
0x300
:
0x900
);
uint32_t
amount
,
off
;
uint32_t
amount
,
off
;
struct
io_mapping
*
fb
;
struct
io_mapping
*
fb
;
...
@@ -41,7 +41,7 @@ nv20_devinit_meminit(struct nvkm_devinit *devinit)
...
@@ -41,7 +41,7 @@ nv20_devinit_meminit(struct nvkm_devinit *devinit)
/* Map the framebuffer aperture */
/* Map the framebuffer aperture */
fb
=
fbmem_init
(
nv_device
(
init
));
fb
=
fbmem_init
(
nv_device
(
init
));
if
(
!
fb
)
{
if
(
!
fb
)
{
nv
_error
(
init
,
"failed to map fb
\n
"
);
nv
km_error
(
subdev
,
"failed to map fb
\n
"
);
return
;
return
;
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.c
View file @
aa860e4b
...
@@ -44,13 +44,13 @@ nv50_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq)
...
@@ -44,13 +44,13 @@ nv50_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq)
ret
=
nvbios_pll_parse
(
bios
,
type
,
&
info
);
ret
=
nvbios_pll_parse
(
bios
,
type
,
&
info
);
if
(
ret
)
{
if
(
ret
)
{
nv_error
(
subdev
,
"failed to retrieve pll data, %d
\n
"
,
ret
);
nv
km
_error
(
subdev
,
"failed to retrieve pll data, %d
\n
"
,
ret
);
return
ret
;
return
ret
;
}
}
ret
=
nv04_pll_calc
(
subdev
,
&
info
,
freq
,
&
N1
,
&
M1
,
&
N2
,
&
M2
,
&
P
);
ret
=
nv04_pll_calc
(
subdev
,
&
info
,
freq
,
&
N1
,
&
M1
,
&
N2
,
&
M2
,
&
P
);
if
(
!
ret
)
{
if
(
!
ret
)
{
nv_error
(
subdev
,
"failed pll calculation
\n
"
);
nv
km
_error
(
subdev
,
"failed pll calculation
\n
"
);
return
ret
;
return
ret
;
}
}
...
@@ -94,9 +94,11 @@ nv50_devinit_disable(struct nvkm_devinit *init)
...
@@ -94,9 +94,11 @@ nv50_devinit_disable(struct nvkm_devinit *init)
int
int
nv50_devinit_init
(
struct
nvkm_object
*
object
)
nv50_devinit_init
(
struct
nvkm_object
*
object
)
{
{
struct
nvkm_bios
*
bios
=
nvkm_bios
(
object
);
struct
nvkm_ibus
*
ibus
=
nvkm_ibus
(
object
);
struct
nv50_devinit
*
init
=
(
void
*
)
object
;
struct
nv50_devinit
*
init
=
(
void
*
)
object
;
struct
nvkm_subdev
*
subdev
=
&
init
->
base
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_bios
*
bios
=
device
->
bios
;
struct
nvkm_subdev
*
ibus
=
device
->
ibus
;
struct
nvbios_outp
info
;
struct
nvbios_outp
info
;
struct
dcb_output
outp
;
struct
dcb_output
outp
;
u8
ver
=
0xff
,
hdr
,
cnt
,
len
;
u8
ver
=
0xff
,
hdr
,
cnt
,
len
;
...
@@ -105,7 +107,7 @@ nv50_devinit_init(struct nvkm_object *object)
...
@@ -105,7 +107,7 @@ nv50_devinit_init(struct nvkm_object *object)
if
(
!
init
->
base
.
post
)
{
if
(
!
init
->
base
.
post
)
{
if
(
!
nv_rdvgac
(
init
,
0
,
0x00
)
&&
if
(
!
nv_rdvgac
(
init
,
0
,
0x00
)
&&
!
nv_rdvgac
(
init
,
0
,
0x1a
))
{
!
nv_rdvgac
(
init
,
0
,
0x1a
))
{
nv
_info
(
init
,
"adaptor not initialised
\n
"
);
nv
km_debug
(
subdev
,
"adaptor not initialised
\n
"
);
init
->
base
.
post
=
true
;
init
->
base
.
post
=
true
;
}
}
}
}
...
...
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