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
6496b4e5
Commit
6496b4e5
authored
Nov 18, 2016
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bios/cstep: pointers are 32-bit
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
58786017
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
23 deletions
+23
-23
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/cstep.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/cstep.h
+6
-6
drivers/gpu/drm/nouveau/nvkm/subdev/bios/cstep.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/cstep.c
+15
-15
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
+2
-2
No files found.
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/cstep.h
View file @
6496b4e5
#ifndef __NVBIOS_CSTEP_H__
#ifndef __NVBIOS_CSTEP_H__
#define __NVBIOS_CSTEP_H__
#define __NVBIOS_CSTEP_H__
u
16
nvbios_cstepTe
(
struct
nvkm_bios
*
,
u
32
nvbios_cstepTe
(
struct
nvkm_bios
*
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
u8
*
xnr
,
u8
*
xsz
);
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
u8
*
xnr
,
u8
*
xsz
);
struct
nvbios_cstepE
{
struct
nvbios_cstepE
{
...
@@ -8,10 +8,10 @@ struct nvbios_cstepE {
...
@@ -8,10 +8,10 @@ struct nvbios_cstepE {
u8
index
;
u8
index
;
};
};
u
16
nvbios_cstepEe
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
hdr
);
u
32
nvbios_cstepEe
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
hdr
);
u
16
nvbios_cstepEp
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
u
32
nvbios_cstepEp
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
struct
nvbios_cstepE
*
);
struct
nvbios_cstepE
*
);
u
16
nvbios_cstepEm
(
struct
nvkm_bios
*
,
u8
pstate
,
u8
*
ver
,
u8
*
hdr
,
u
32
nvbios_cstepEm
(
struct
nvkm_bios
*
,
u8
pstate
,
u8
*
ver
,
u8
*
hdr
,
struct
nvbios_cstepE
*
);
struct
nvbios_cstepE
*
);
struct
nvbios_cstepX
{
struct
nvbios_cstepX
{
...
@@ -20,7 +20,7 @@ struct nvbios_cstepX {
...
@@ -20,7 +20,7 @@ struct nvbios_cstepX {
u8
voltage
;
u8
voltage
;
};
};
u
16
nvbios_cstepXe
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
hdr
);
u
32
nvbios_cstepXe
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
hdr
);
u
16
nvbios_cstepXp
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
u
32
nvbios_cstepXp
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
struct
nvbios_cstepX
*
);
struct
nvbios_cstepX
*
);
#endif
#endif
drivers/gpu/drm/nouveau/nvkm/subdev/bios/cstep.c
View file @
6496b4e5
...
@@ -25,16 +25,16 @@
...
@@ -25,16 +25,16 @@
#include <subdev/bios/bit.h>
#include <subdev/bios/bit.h>
#include <subdev/bios/cstep.h>
#include <subdev/bios/cstep.h>
u
16
u
32
nvbios_cstepTe
(
struct
nvkm_bios
*
bios
,
nvbios_cstepTe
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
u8
*
xnr
,
u8
*
xsz
)
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
u8
*
xnr
,
u8
*
xsz
)
{
{
struct
bit_entry
bit_P
;
struct
bit_entry
bit_P
;
u
16
cstep
=
0x000
0
;
u
32
cstep
=
0
;
if
(
!
bit_entry
(
bios
,
'P'
,
&
bit_P
))
{
if
(
!
bit_entry
(
bios
,
'P'
,
&
bit_P
))
{
if
(
bit_P
.
version
==
2
)
if
(
bit_P
.
version
==
2
)
cstep
=
nvbios_rd
16
(
bios
,
bit_P
.
offset
+
0x34
);
cstep
=
nvbios_rd
32
(
bios
,
bit_P
.
offset
+
0x34
);
if
(
cstep
)
{
if
(
cstep
)
{
*
ver
=
nvbios_rd08
(
bios
,
cstep
+
0
);
*
ver
=
nvbios_rd08
(
bios
,
cstep
+
0
);
...
@@ -52,27 +52,27 @@ nvbios_cstepTe(struct nvkm_bios *bios,
...
@@ -52,27 +52,27 @@ nvbios_cstepTe(struct nvkm_bios *bios,
}
}
}
}
return
0
x0000
;
return
0
;
}
}
u
16
u
32
nvbios_cstepEe
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
)
nvbios_cstepEe
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
)
{
{
u8
cnt
,
len
,
xnr
,
xsz
;
u8
cnt
,
len
,
xnr
,
xsz
;
u
16
data
=
nvbios_cstepTe
(
bios
,
ver
,
hdr
,
&
cnt
,
&
len
,
&
xnr
,
&
xsz
);
u
32
data
=
nvbios_cstepTe
(
bios
,
ver
,
hdr
,
&
cnt
,
&
len
,
&
xnr
,
&
xsz
);
if
(
data
&&
idx
<
cnt
)
{
if
(
data
&&
idx
<
cnt
)
{
data
=
data
+
*
hdr
+
(
idx
*
len
);
data
=
data
+
*
hdr
+
(
idx
*
len
);
*
hdr
=
len
;
*
hdr
=
len
;
return
data
;
return
data
;
}
}
return
0
x0000
;
return
0
;
}
}
u
16
u
32
nvbios_cstepEp
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
nvbios_cstepEp
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
struct
nvbios_cstepE
*
info
)
struct
nvbios_cstepE
*
info
)
{
{
u
16
data
=
nvbios_cstepEe
(
bios
,
idx
,
ver
,
hdr
);
u
32
data
=
nvbios_cstepEe
(
bios
,
idx
,
ver
,
hdr
);
memset
(
info
,
0x00
,
sizeof
(
*
info
));
memset
(
info
,
0x00
,
sizeof
(
*
info
));
if
(
data
)
{
if
(
data
)
{
info
->
pstate
=
(
nvbios_rd16
(
bios
,
data
+
0x00
)
&
0x01e0
)
>>
5
;
info
->
pstate
=
(
nvbios_rd16
(
bios
,
data
+
0x00
)
&
0x01e0
)
>>
5
;
...
@@ -81,7 +81,7 @@ nvbios_cstepEp(struct nvkm_bios *bios, int idx, u8 *ver, u8 *hdr,
...
@@ -81,7 +81,7 @@ nvbios_cstepEp(struct nvkm_bios *bios, int idx, u8 *ver, u8 *hdr,
return
data
;
return
data
;
}
}
u
16
u
32
nvbios_cstepEm
(
struct
nvkm_bios
*
bios
,
u8
pstate
,
u8
*
ver
,
u8
*
hdr
,
nvbios_cstepEm
(
struct
nvkm_bios
*
bios
,
u8
pstate
,
u8
*
ver
,
u8
*
hdr
,
struct
nvbios_cstepE
*
info
)
struct
nvbios_cstepE
*
info
)
{
{
...
@@ -93,24 +93,24 @@ nvbios_cstepEm(struct nvkm_bios *bios, u8 pstate, u8 *ver, u8 *hdr,
...
@@ -93,24 +93,24 @@ nvbios_cstepEm(struct nvkm_bios *bios, u8 pstate, u8 *ver, u8 *hdr,
return
data
;
return
data
;
}
}
u
16
u
32
nvbios_cstepXe
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
)
nvbios_cstepXe
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
)
{
{
u8
cnt
,
len
,
xnr
,
xsz
;
u8
cnt
,
len
,
xnr
,
xsz
;
u
16
data
=
nvbios_cstepTe
(
bios
,
ver
,
hdr
,
&
cnt
,
&
len
,
&
xnr
,
&
xsz
);
u
32
data
=
nvbios_cstepTe
(
bios
,
ver
,
hdr
,
&
cnt
,
&
len
,
&
xnr
,
&
xsz
);
if
(
data
&&
idx
<
xnr
)
{
if
(
data
&&
idx
<
xnr
)
{
data
=
data
+
*
hdr
+
(
cnt
*
len
)
+
(
idx
*
xsz
);
data
=
data
+
*
hdr
+
(
cnt
*
len
)
+
(
idx
*
xsz
);
*
hdr
=
xsz
;
*
hdr
=
xsz
;
return
data
;
return
data
;
}
}
return
0
x0000
;
return
0
;
}
}
u
16
u
32
nvbios_cstepXp
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
nvbios_cstepXp
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
struct
nvbios_cstepX
*
info
)
struct
nvbios_cstepX
*
info
)
{
{
u
16
data
=
nvbios_cstepXe
(
bios
,
idx
,
ver
,
hdr
);
u
32
data
=
nvbios_cstepXe
(
bios
,
idx
,
ver
,
hdr
);
memset
(
info
,
0x00
,
sizeof
(
*
info
));
memset
(
info
,
0x00
,
sizeof
(
*
info
));
if
(
data
)
{
if
(
data
)
{
info
->
freq
=
nvbios_rd16
(
bios
,
data
+
0x00
)
*
1000
;
info
->
freq
=
nvbios_rd16
(
bios
,
data
+
0x00
)
*
1000
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
View file @
6496b4e5
...
@@ -229,7 +229,7 @@ nvkm_cstate_new(struct nvkm_clk *clk, int idx, struct nvkm_pstate *pstate)
...
@@ -229,7 +229,7 @@ nvkm_cstate_new(struct nvkm_clk *clk, int idx, struct nvkm_pstate *pstate)
struct
nvkm_cstate
*
cstate
=
NULL
;
struct
nvkm_cstate
*
cstate
=
NULL
;
struct
nvbios_cstepX
cstepX
;
struct
nvbios_cstepX
cstepX
;
u8
ver
,
hdr
;
u8
ver
,
hdr
;
u
16
data
;
u
32
data
;
data
=
nvbios_cstepXp
(
bios
,
idx
,
&
ver
,
&
hdr
,
&
cstepX
);
data
=
nvbios_cstepXp
(
bios
,
idx
,
&
ver
,
&
hdr
,
&
cstepX
);
if
(
!
data
)
if
(
!
data
)
...
@@ -408,7 +408,7 @@ nvkm_pstate_new(struct nvkm_clk *clk, int idx)
...
@@ -408,7 +408,7 @@ nvkm_pstate_new(struct nvkm_clk *clk, int idx)
struct
nvbios_cstepE
cstepE
;
struct
nvbios_cstepE
cstepE
;
struct
nvbios_perfE
perfE
;
struct
nvbios_perfE
perfE
;
u8
ver
,
hdr
,
cnt
,
len
;
u8
ver
,
hdr
,
cnt
,
len
;
u
16
data
;
u
32
data
;
data
=
nvbios_perfEp
(
bios
,
idx
,
&
ver
,
&
hdr
,
&
cnt
,
&
len
,
&
perfE
);
data
=
nvbios_perfEp
(
bios
,
idx
,
&
ver
,
&
hdr
,
&
cnt
,
&
len
,
&
perfE
);
if
(
!
data
)
if
(
!
data
)
...
...
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