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
nexedi
linux
Commits
60b29d20
Commit
60b29d20
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bios: switch to subdev printk macros
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
0df18e6d
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
70 additions
and
54 deletions
+70
-54
drivers/gpu/drm/nouveau/nvkm/subdev/bios/M0203.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/M0203.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c
+7
-8
drivers/gpu/drm/nouveau/nvkm/subdev/bios/dcb.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/dcb.c
+6
-5
drivers/gpu/drm/nouveau/nvkm/subdev/bios/i2c.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/i2c.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/subdev/bios/image.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/image.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c
+5
-4
drivers/gpu/drm/nouveau/nvkm/subdev/bios/mxm.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/mxm.c
+8
-5
drivers/gpu/drm/nouveau/nvkm/subdev/bios/npde.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/npde.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/subdev/bios/pcir.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/pcir.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
+17
-12
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowramin.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowramin.c
+6
-5
drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c
+3
-3
No files found.
drivers/gpu/drm/nouveau/nvkm/subdev/bios/M0203.c
View file @
60b29d20
...
...
@@ -103,12 +103,13 @@ u32
nvbios_M0203Em
(
struct
nvkm_bios
*
bios
,
u8
ramcfg
,
u8
*
ver
,
u8
*
hdr
,
struct
nvbios_M0203E
*
info
)
{
struct
nvkm_subdev
*
subdev
=
&
bios
->
subdev
;
struct
nvbios_M0203T
M0203T
;
u8
cnt
,
len
,
idx
=
0xff
;
u32
data
;
if
(
!
nvbios_M0203Tp
(
bios
,
ver
,
hdr
,
&
cnt
,
&
len
,
&
M0203T
))
{
nv
_warn
(
bios
,
"M0203T not found
\n
"
);
nv
km_warn
(
subdev
,
"M0203T not found
\n
"
);
return
0x00000000
;
}
...
...
@@ -119,7 +120,7 @@ nvbios_M0203Em(struct nvkm_bios *bios, u8 ramcfg, u8 *ver, u8 *hdr,
continue
;
return
data
;
default:
nv
_warn
(
bios
,
"M0203T type %02x
\n
"
,
M0203T
.
type
);
nv
km_warn
(
subdev
,
"M0203T type %02x
\n
"
,
M0203T
.
type
);
return
0x00000000
;
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c
View file @
60b29d20
...
...
@@ -134,15 +134,15 @@ nvkm_bios_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
bios
->
bmp_offset
=
nvbios_findstr
(
bios
->
data
,
bios
->
size
,
"
\xff\x7f
""NV
\0
"
,
5
);
if
(
bios
->
bmp_offset
)
{
nv
_info
(
bios
,
"BMP version %x.%x
\n
"
,
bmp_version
(
bios
)
>>
8
,
bmp_version
(
bios
)
&
0xff
);
nv
km_debug
(
&
bios
->
subdev
,
"BMP version %x.%x
\n
"
,
bmp_version
(
bios
)
>>
8
,
bmp_version
(
bios
)
&
0xff
);
}
bios
->
bit_offset
=
nvbios_findstr
(
bios
->
data
,
bios
->
size
,
"
\xff\xb8
""BIT"
,
5
);
if
(
bios
->
bit_offset
)
nv
_info
(
bios
,
"BIT signature found
\n
"
);
nv
km_debug
(
&
bios
->
subdev
,
"BIT signature found
\n
"
);
/* determine the vbios version number */
if
(
!
bit_entry
(
bios
,
'i'
,
&
bit_i
)
&&
bit_i
.
length
>=
4
)
{
...
...
@@ -159,10 +159,9 @@ nvkm_bios_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
bios
->
version
.
micro
=
nv_ro08
(
bios
,
bios
->
bmp_offset
+
10
);
}
nv_info
(
bios
,
"version %02x.%02x.%02x.%02x.%02x
\n
"
,
bios
->
version
.
major
,
bios
->
version
.
chip
,
bios
->
version
.
minor
,
bios
->
version
.
micro
,
bios
->
version
.
patch
);
nvkm_info
(
&
bios
->
subdev
,
"version %02x.%02x.%02x.%02x.%02x
\n
"
,
bios
->
version
.
major
,
bios
->
version
.
chip
,
bios
->
version
.
minor
,
bios
->
version
.
micro
,
bios
->
version
.
patch
);
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/dcb.c
View file @
60b29d20
...
...
@@ -27,20 +27,21 @@
u16
dcb_table
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
{
struct
nvkm_device
*
device
=
nv_device
(
bios
);
struct
nvkm_subdev
*
subdev
=
&
bios
->
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
u16
dcb
=
0x0000
;
if
(
device
->
card_type
>
NV_04
)
dcb
=
nv_ro16
(
bios
,
0x36
);
if
(
!
dcb
)
{
nv
_warn
(
bios
,
"DCB table not found
\n
"
);
nv
km_warn
(
subdev
,
"DCB table not found
\n
"
);
return
dcb
;
}
*
ver
=
nv_ro08
(
bios
,
dcb
);
if
(
*
ver
>=
0x42
)
{
nv
_warn
(
bios
,
"DCB version 0x%02x unknown
\n
"
,
*
ver
);
nv
km_warn
(
subdev
,
"DCB version 0x%02x unknown
\n
"
,
*
ver
);
return
0x0000
;
}
else
if
(
*
ver
>=
0x30
)
{
...
...
@@ -86,11 +87,11 @@ dcb_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
*
* v1.1 (NV5+, maybe some NV4) is entirely unhelpful
*/
nv
_warn
(
bios
,
"DCB contains no useful data
\n
"
);
nv
km_debug
(
subdev
,
"DCB contains no useful data
\n
"
);
return
0x0000
;
}
nv
_warn
(
bios
,
"DCB header validation failed
\n
"
);
nv
km_warn
(
subdev
,
"DCB header validation failed
\n
"
);
return
0x0000
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/i2c.c
View file @
60b29d20
...
...
@@ -38,7 +38,7 @@ dcb_i2c_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
}
if
(
i2c
&&
*
ver
>=
0x42
)
{
nv
_warn
(
bios
,
"ccb %02x not supported
\n
"
,
*
ver
);
nv
km_warn
(
&
bios
->
subdev
,
"ccb %02x not supported
\n
"
,
*
ver
);
return
0x0000
;
}
...
...
@@ -70,6 +70,7 @@ dcb_i2c_entry(struct nvkm_bios *bios, u8 idx, u8 *ver, u8 *len)
int
dcb_i2c_parse
(
struct
nvkm_bios
*
bios
,
u8
idx
,
struct
dcb_i2c_entry
*
info
)
{
struct
nvkm_subdev
*
subdev
=
&
bios
->
subdev
;
u8
ver
,
len
;
u16
ent
=
dcb_i2c_entry
(
bios
,
idx
,
&
ver
,
&
len
);
if
(
ent
)
{
...
...
@@ -126,7 +127,7 @@ dcb_i2c_parse(struct nvkm_bios *bios, u8 idx, struct dcb_i2c_entry *info)
case
DCB_I2C_UNUSED
:
return
0
;
default:
nv
_warn
(
bios
,
"unknown i2c type %d
\n
"
,
info
->
type
);
nv
km_warn
(
subdev
,
"unknown i2c type %d
\n
"
,
info
->
type
);
info
->
type
=
DCB_I2C_UNUSED
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/image.c
View file @
60b29d20
...
...
@@ -29,6 +29,7 @@
static
bool
nvbios_imagen
(
struct
nvkm_bios
*
bios
,
struct
nvbios_image
*
image
)
{
struct
nvkm_subdev
*
subdev
=
&
bios
->
subdev
;
struct
nvbios_pcirT
pcir
;
struct
nvbios_npdeT
npde
;
u8
ver
;
...
...
@@ -41,8 +42,8 @@ nvbios_imagen(struct nvkm_bios *bios, struct nvbios_image *image)
case
0x4e56
:
/* NV */
break
;
default:
nv
_debug
(
bios
,
"%08x: ROM signature (%04x) unknown
\n
"
,
image
->
base
,
data
);
nv
km_debug
(
subdev
,
"%08x: ROM signature (%04x) unknown
\n
"
,
image
->
base
,
data
);
return
false
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c
View file @
60b29d20
...
...
@@ -37,11 +37,12 @@
#include <subdev/vga.h>
#define bioslog(lvl, fmt, args...) do { \
nv_printk(init->bios, lvl, "0x%04x[%c]: "fmt, init->offset, \
init_exec(init) ? '0' + (init->nested - 1) : ' ', ##args); \
nvkm_printk(init->subdev, lvl, info, "0x%04x[%c]: "fmt, \
init->offset, init_exec(init) ? \
'0' + (init->nested - 1) : ' ', ##args); \
} while(0)
#define cont(fmt, args...) do { \
if (
nv_subdev(init->bios)->debug >= NV_DBG_TRACE)
\
if (
init->subdev->debug >= NV_DBG_TRACE)
\
printk(fmt, ##args); \
} while(0)
#define trace(fmt, args...) bioslog(TRACE, fmt, ##args)
...
...
@@ -2292,7 +2293,7 @@ nvbios_init(struct nvkm_subdev *subdev, bool execute)
u16
data
;
if
(
execute
)
nv
_info
(
bios
,
"running init tables
\n
"
);
nv
km_debug
(
subdev
,
"running init tables
\n
"
);
while
(
!
ret
&&
(
data
=
(
init_script
(
bios
,
++
i
))))
{
struct
nvbios_init
init
=
{
.
subdev
=
subdev
,
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/mxm.c
View file @
60b29d20
...
...
@@ -28,17 +28,18 @@
u16
mxm_table
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
)
{
struct
nvkm_subdev
*
subdev
=
&
bios
->
subdev
;
struct
bit_entry
x
;
if
(
bit_entry
(
bios
,
'x'
,
&
x
))
{
nv
_debug
(
bios
,
"BIT 'x' table not present
\n
"
);
nv
km_debug
(
subdev
,
"BIT 'x' table not present
\n
"
);
return
0x0000
;
}
*
ver
=
x
.
version
;
*
hdr
=
x
.
length
;
if
(
*
ver
!=
1
||
*
hdr
<
3
)
{
nv
_warn
(
bios
,
"BIT 'x' table %d/%d unknown
\n
"
,
*
ver
,
*
hdr
);
nv
km_warn
(
subdev
,
"BIT 'x' table %d/%d unknown
\n
"
,
*
ver
,
*
hdr
);
return
0x0000
;
}
...
...
@@ -73,6 +74,7 @@ static u8 g98_sor_map[16] = {
u8
mxm_sor_map
(
struct
nvkm_bios
*
bios
,
u8
conn
)
{
struct
nvkm_subdev
*
subdev
=
&
bios
->
subdev
;
u8
ver
,
hdr
;
u16
mxm
=
mxm_table
(
bios
,
&
ver
,
&
hdr
);
if
(
mxm
&&
hdr
>=
6
)
{
...
...
@@ -89,7 +91,7 @@ mxm_sor_map(struct nvkm_bios *bios, u8 conn)
return
0x00
;
}
nv
_warn
(
bios
,
"unknown sor map v%02x
\n
"
,
ver
);
nv
km_warn
(
subdev
,
"unknown sor map v%02x
\n
"
,
ver
);
}
}
...
...
@@ -102,13 +104,14 @@ mxm_sor_map(struct nvkm_bios *bios, u8 conn)
if
(
bios
->
version
.
chip
==
0x98
)
return
g98_sor_map
[
conn
];
nv
_warn
(
bios
,
"missing sor map
\n
"
);
nv
km_warn
(
subdev
,
"missing sor map
\n
"
);
return
0x00
;
}
u8
mxm_ddc_map
(
struct
nvkm_bios
*
bios
,
u8
port
)
{
struct
nvkm_subdev
*
subdev
=
&
bios
->
subdev
;
u8
ver
,
hdr
;
u16
mxm
=
mxm_table
(
bios
,
&
ver
,
&
hdr
);
if
(
mxm
&&
hdr
>=
8
)
{
...
...
@@ -125,7 +128,7 @@ mxm_ddc_map(struct nvkm_bios *bios, u8 port)
return
0x00
;
}
nv
_warn
(
bios
,
"unknown ddc map v%02x
\n
"
,
ver
);
nv
km_warn
(
subdev
,
"unknown ddc map v%02x
\n
"
,
ver
);
}
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/npde.c
View file @
60b29d20
...
...
@@ -36,8 +36,9 @@ nvbios_npdeTe(struct nvkm_bios *bios, u32 base)
case
0x4544504e
:
/* NPDE */
break
;
default:
nv_debug
(
bios
,
"%08x: NPDE signature (%08x) unknown
\n
"
,
data
,
nv_ro32
(
bios
,
data
+
0x00
));
nvkm_debug
(
&
bios
->
subdev
,
"%08x: NPDE signature (%08x) unknown
\n
"
,
data
,
nv_ro32
(
bios
,
data
+
0x00
));
data
=
0
;
break
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/pcir.c
View file @
60b29d20
...
...
@@ -38,8 +38,9 @@ nvbios_pcirTe(struct nvkm_bios *bios, u32 base, u8 *ver, u16 *hdr)
*
ver
=
nv_ro08
(
bios
,
data
+
0x0c
);
break
;
default:
nv_debug
(
bios
,
"%08x: PCIR signature (%08x) unknown
\n
"
,
data
,
nv_ro32
(
bios
,
data
+
0x00
));
nvkm_debug
(
&
bios
->
subdev
,
"%08x: PCIR signature (%08x) unknown
\n
"
,
data
,
nv_ro32
(
bios
,
data
+
0x00
));
data
=
0
;
break
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c
View file @
60b29d20
...
...
@@ -221,7 +221,8 @@ pll_map_type(struct nvkm_bios *bios, u8 type, u32 *reg, u8 *ver, u8 *len)
int
nvbios_pll_parse
(
struct
nvkm_bios
*
bios
,
u32
type
,
struct
nvbios_pll
*
info
)
{
struct
nvkm_device
*
device
=
bios
->
subdev
.
device
;
struct
nvkm_subdev
*
subdev
=
&
bios
->
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
u8
ver
,
len
;
u32
reg
=
type
;
u16
data
;
...
...
@@ -356,7 +357,7 @@ nvbios_pll_parse(struct nvkm_bios *bios, u32 type, struct nvbios_pll *info)
info
->
max_p
=
nv_ro08
(
bios
,
data
+
13
);
break
;
default:
nv
_error
(
bios
,
"unknown pll limits version 0x%02x
\n
"
,
ver
);
nv
km_error
(
subdev
,
"unknown pll limits version 0x%02x
\n
"
,
ver
);
return
-
EINVAL
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
View file @
60b29d20
...
...
@@ -90,25 +90,27 @@ shadow_class = {
static
int
shadow_image
(
struct
nvkm_bios
*
bios
,
int
idx
,
struct
shadow
*
mthd
)
{
struct
nvkm_subdev
*
subdev
=
&
bios
->
subdev
;
struct
nvbios_image
image
;
int
score
=
1
;
if
(
!
nvbios_image
(
bios
,
idx
,
&
image
))
{
nv
_debug
(
bios
,
"image %d invalid
\n
"
,
idx
);
nv
km_debug
(
subdev
,
"image %d invalid
\n
"
,
idx
);
return
0
;
}
nv
_debug
(
bios
,
"%08x: type %02x, %d bytes
\n
"
,
image
.
base
,
image
.
type
,
image
.
size
);
nv
km_debug
(
subdev
,
"%08x: type %02x, %d bytes
\n
"
,
image
.
base
,
image
.
type
,
image
.
size
);
if
(
!
shadow_fetch
(
bios
,
image
.
size
))
{
nv
_debug
(
bios
,
"%08x: fetch failed
\n
"
,
image
.
base
);
nv
km_debug
(
subdev
,
"%08x: fetch failed
\n
"
,
image
.
base
);
return
0
;
}
switch
(
image
.
type
)
{
case
0x00
:
if
(
nvbios_checksum
(
&
bios
->
data
[
image
.
base
],
image
.
size
))
{
nv_debug
(
bios
,
"%08x: checksum failed
\n
"
,
image
.
base
);
nvkm_debug
(
subdev
,
"%08x: checksum failed
\n
"
,
image
.
base
);
if
(
mthd
->
func
->
rw
)
score
+=
1
;
score
+=
1
;
...
...
@@ -142,8 +144,9 @@ static int
shadow_method
(
struct
nvkm_bios
*
bios
,
struct
shadow
*
mthd
,
const
char
*
name
)
{
const
struct
nvbios_source
*
func
=
mthd
->
func
;
struct
nvkm_subdev
*
subdev
=
&
bios
->
subdev
;
if
(
func
->
name
)
{
nv
_debug
(
bios
,
"trying %s...
\n
"
,
name
?
name
:
func
->
name
);
nv
km_debug
(
subdev
,
"trying %s...
\n
"
,
name
?
name
:
func
->
name
);
if
(
func
->
init
)
{
mthd
->
data
=
func
->
init
(
bios
,
name
);
if
(
IS_ERR
(
mthd
->
data
))
{
...
...
@@ -154,7 +157,7 @@ shadow_method(struct nvkm_bios *bios, struct shadow *mthd, const char *name)
mthd
->
score
=
shadow_score
(
bios
,
mthd
);
if
(
func
->
fini
)
func
->
fini
(
mthd
->
data
);
nv
_debug
(
bios
,
"scored %d
\n
"
,
mthd
->
score
);
nv
km_debug
(
subdev
,
"scored %d
\n
"
,
mthd
->
score
);
mthd
->
data
=
bios
->
data
;
mthd
->
size
=
bios
->
size
;
bios
->
data
=
NULL
;
...
...
@@ -197,6 +200,8 @@ shadow_fw = {
int
nvbios_shadow
(
struct
nvkm_bios
*
bios
)
{
struct
nvkm_subdev
*
subdev
=
&
bios
->
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
shadow
mthds
[]
=
{
{
shadow_class
,
0
,
&
nvbios_of
},
{
shadow_class
,
0
,
&
nvbios_ramin
},
...
...
@@ -212,7 +217,7 @@ nvbios_shadow(struct nvkm_bios *bios)
int
optlen
;
/* handle user-specified bios source */
optarg
=
nvkm_stropt
(
nv_device
(
bios
)
->
cfgopt
,
"NvBios"
,
&
optlen
);
optarg
=
nvkm_stropt
(
device
->
cfgopt
,
"NvBios"
,
&
optlen
);
source
=
optarg
?
kstrndup
(
optarg
,
optlen
,
GFP_KERNEL
)
:
NULL
;
if
(
source
)
{
/* try to match one of the built-in methods */
...
...
@@ -233,7 +238,7 @@ nvbios_shadow(struct nvkm_bios *bios)
}
if
(
!
best
->
score
)
{
nv
_error
(
bios
,
"%s invalid
\n
"
,
source
);
nv
km_error
(
subdev
,
"%s invalid
\n
"
,
source
);
kfree
(
source
);
source
=
NULL
;
}
...
...
@@ -258,12 +263,12 @@ nvbios_shadow(struct nvkm_bios *bios)
}
if
(
!
best
->
score
)
{
nv
_fatal
(
bios
,
"unable to locate usable image
\n
"
);
nv
km_error
(
subdev
,
"unable to locate usable image
\n
"
);
return
-
EINVAL
;
}
nv
_info
(
bios
,
"using image from %s
\n
"
,
best
->
func
?
best
->
func
->
name
:
source
);
nv
km_debug
(
subdev
,
"using image from %s
\n
"
,
best
->
func
?
best
->
func
->
name
:
source
);
bios
->
data
=
best
->
data
;
bios
->
size
=
best
->
size
;
kfree
(
source
);
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowramin.c
View file @
60b29d20
...
...
@@ -54,7 +54,8 @@ pramin_fini(void *data)
static
void
*
pramin_init
(
struct
nvkm_bios
*
bios
,
const
char
*
name
)
{
struct
nvkm_device
*
device
=
bios
->
subdev
.
device
;
struct
nvkm_subdev
*
subdev
=
&
bios
->
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
priv
*
priv
=
NULL
;
u64
addr
=
0
;
...
...
@@ -69,7 +70,7 @@ pramin_init(struct nvkm_bios *bios, const char *name)
if
(
device
->
card_type
>=
NV_C0
)
addr
=
nvkm_rd32
(
device
,
0x022500
);
if
(
addr
&
0x00000001
)
{
nv
_debug
(
bios
,
"... display disabled
\n
"
);
nv
km_debug
(
subdev
,
"... display disabled
\n
"
);
return
ERR_PTR
(
-
ENODEV
);
}
...
...
@@ -79,11 +80,11 @@ pramin_init(struct nvkm_bios *bios, const char *name)
*/
addr
=
nvkm_rd32
(
device
,
0x619f04
);
if
(
!
(
addr
&
0x00000008
))
{
nv
_debug
(
bios
,
"... not enabled
\n
"
);
nv
km_debug
(
subdev
,
"... not enabled
\n
"
);
return
ERR_PTR
(
-
ENODEV
);
}
if
(
(
addr
&
0x00000003
)
!=
1
)
{
nv
_debug
(
bios
,
"... not in vram
\n
"
);
nv
km_debug
(
subdev
,
"... not in vram
\n
"
);
return
ERR_PTR
(
-
ENODEV
);
}
...
...
@@ -96,7 +97,7 @@ pramin_init(struct nvkm_bios *bios, const char *name)
/* modify bar0 PRAMIN window to cover the bios image */
if
(
!
(
priv
=
kmalloc
(
sizeof
(
*
priv
),
GFP_KERNEL
)))
{
nv
_error
(
bios
,
"... out of memory
\n
"
);
nv
km_error
(
subdev
,
"... out of memory
\n
"
);
return
ERR_PTR
(
-
ENOMEM
);
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c
View file @
60b29d20
...
...
@@ -37,9 +37,9 @@ therm_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *len, u8 *cnt)
else
if
(
bit_P
.
version
==
2
)
therm
=
nv_ro16
(
bios
,
bit_P
.
offset
+
16
);
else
nv
_error
(
bios
,
"unknown offset for thermal in BIT P %d
\n
"
,
bit_P
.
version
);
nv
km_error
(
&
bios
->
subdev
,
"unknown offset for thermal in BIT P %d
\n
"
,
bit_P
.
version
);
}
/* exit now if we haven't found the thermal table */
...
...
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