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
edec7149
Commit
edec7149
authored
Jan 15, 2020
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/core: remove previous versioned fw loader
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
9d350c5e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
32 deletions
+16
-32
drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h
drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h
+1
-4
drivers/gpu/drm/nouveau/nvkm/core/firmware.c
drivers/gpu/drm/nouveau/nvkm/core/firmware.c
+12
-24
drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c
+1
-2
drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c
drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c
+2
-2
No files found.
drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h
View file @
edec7149
...
...
@@ -4,10 +4,7 @@
#include <core/option.h>
#include <core/subdev.h>
int
nvkm_firmware_get_version
(
const
struct
nvkm_subdev
*
,
const
char
*
fwname
,
int
min_version
,
int
max_version
,
const
struct
firmware
**
);
int
nvkm_firmware_get
(
const
struct
nvkm_subdev
*
,
const
char
*
fwname
,
int
nvkm_firmware_get
(
const
struct
nvkm_subdev
*
,
const
char
*
fwname
,
int
ver
,
const
struct
firmware
**
);
void
nvkm_firmware_put
(
const
struct
firmware
*
);
...
...
drivers/gpu/drm/nouveau/nvkm/core/firmware.c
View file @
edec7149
...
...
@@ -30,7 +30,7 @@ nvkm_firmware_load_name(const struct nvkm_subdev *subdev, const char *base,
int
ret
;
snprintf
(
path
,
sizeof
(
path
),
"%s%s"
,
base
,
name
);
ret
=
nvkm_firmware_get
_version
(
subdev
,
path
,
ver
,
ver
,
pfw
);
ret
=
nvkm_firmware_get
(
subdev
,
path
,
ver
,
pfw
);
if
(
ret
<
0
)
return
ret
;
...
...
@@ -66,9 +66,8 @@ nvkm_firmware_load_blob(const struct nvkm_subdev *subdev, const char *base,
* Firmware files released by NVIDIA will always follow this format.
*/
int
nvkm_firmware_get_version
(
const
struct
nvkm_subdev
*
subdev
,
const
char
*
fwname
,
int
min_version
,
int
max_version
,
const
struct
firmware
**
fw
)
nvkm_firmware_get
(
const
struct
nvkm_subdev
*
subdev
,
const
char
*
fwname
,
int
ver
,
const
struct
firmware
**
fw
)
{
struct
nvkm_device
*
device
=
subdev
->
device
;
char
f
[
64
];
...
...
@@ -84,32 +83,21 @@ nvkm_firmware_get_version(const struct nvkm_subdev *subdev, const char *fwname,
cname
[
i
]
=
tolower
(
cname
[
i
]);
}
for
(
i
=
max_version
;
i
>=
min_version
;
i
--
)
{
if
(
i
!=
0
)
snprintf
(
f
,
sizeof
(
f
),
"nvidia/%s/%s-%d.bin"
,
cname
,
fwname
,
i
);
else
snprintf
(
f
,
sizeof
(
f
),
"nvidia/%s/%s.bin"
,
cname
,
fwname
);
if
(
!
firmware_request_nowarn
(
fw
,
f
,
device
->
dev
))
{
nvkm_debug
(
subdev
,
"firmware
\"
%s
\"
loaded - "
"%zu byte(s)
\n
"
,
f
,
(
*
fw
)
->
size
);
return
i
;
}
if
(
ver
!=
0
)
snprintf
(
f
,
sizeof
(
f
),
"nvidia/%s/%s-%d.bin"
,
cname
,
fwname
,
ver
);
else
snprintf
(
f
,
sizeof
(
f
),
"nvidia/%s/%s.bin"
,
cname
,
fwname
);
nvkm_debug
(
subdev
,
"firmware
\"
%s
\"
unavailable
\n
"
,
f
);
if
(
!
firmware_request_nowarn
(
fw
,
f
,
device
->
dev
))
{
nvkm_debug
(
subdev
,
"firmware
\"
%s
\"
loaded - %zu byte(s)
\n
"
,
f
,
(
*
fw
)
->
size
);
return
0
;
}
nvkm_
error
(
subdev
,
"failed to load firmware
\"
%s
\"\n
"
,
fwname
);
nvkm_
debug
(
subdev
,
"firmware
\"
%s
\"
unavailable
\n
"
,
f
);
return
-
ENOENT
;
}
int
nvkm_firmware_get
(
const
struct
nvkm_subdev
*
subdev
,
const
char
*
fwname
,
const
struct
firmware
**
fw
)
{
return
nvkm_firmware_get_version
(
subdev
,
fwname
,
0
,
0
,
fw
);
}
/**
* nvkm_firmware_put - release firmware loaded with nvkm_firmware_get
*/
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c
View file @
edec7149
...
...
@@ -357,8 +357,7 @@ nvkm_acr_ctor_wpr(struct nvkm_acr *acr, int ver)
struct
nvkm_device
*
device
=
subdev
->
device
;
int
ret
;
ret
=
nvkm_firmware_get_version
(
subdev
,
"acr/wpr"
,
ver
,
ver
,
&
acr
->
wpr_fw
);
ret
=
nvkm_firmware_get
(
subdev
,
"acr/wpr"
,
ver
,
&
acr
->
wpr_fw
);
if
(
ret
<
0
)
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c
View file @
edec7149
...
...
@@ -58,7 +58,7 @@ nvkm_acr_hsfw_load_image(struct nvkm_acr *acr, const char *name, int ver,
u32
loc
,
sig
;
int
ret
;
ret
=
nvkm_firmware_get
_version
(
subdev
,
name
,
ver
,
ver
,
&
fw
);
ret
=
nvkm_firmware_get
(
subdev
,
name
,
ver
,
&
fw
);
if
(
ret
<
0
)
return
ret
;
...
...
@@ -136,7 +136,7 @@ nvkm_acr_hsfw_load_bl(struct nvkm_acr *acr, const char *name, int ver,
u8
*
data
;
int
ret
;
ret
=
nvkm_firmware_get
_version
(
subdev
,
name
,
ver
,
ver
,
&
fw
);
ret
=
nvkm_firmware_get
(
subdev
,
name
,
ver
,
&
fw
);
if
(
ret
)
return
ret
;
...
...
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