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
86899b39
Commit
86899b39
authored
Jun 13, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/gk104/fb/ram: fixups from an earlier search+replace
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
0c9483b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
38 deletions
+38
-38
drivers/gpu/drm/nouveau/core/subdev/fb/ramnve0.c
drivers/gpu/drm/nouveau/core/subdev/fb/ramnve0.c
+38
-38
No files found.
drivers/gpu/drm/nouveau/core/subdev/fb/ramnve0.c
View file @
86899b39
...
@@ -262,8 +262,8 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
...
@@ -262,8 +262,8 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
struct
nve0_ram
*
ram
=
(
void
*
)
pfb
->
ram
;
struct
nve0_ram
*
ram
=
(
void
*
)
pfb
->
ram
;
struct
nve0_ramfuc
*
fuc
=
&
ram
->
fuc
;
struct
nve0_ramfuc
*
fuc
=
&
ram
->
fuc
;
struct
nouveau_ram_data
*
next
=
ram
->
base
.
next
;
struct
nouveau_ram_data
*
next
=
ram
->
base
.
next
;
int
vc
=
!
(
next
->
bios
.
ramcfg_11_02_08
)
;
int
vc
=
!
next
->
bios
.
ramcfg_11_02_08
;
int
mv
=
!
(
next
->
bios
.
ramcfg_11_02_04
)
;
int
mv
=
!
next
->
bios
.
ramcfg_11_02_04
;
u32
mask
,
data
;
u32
mask
,
data
;
ram_mask
(
fuc
,
0x10f808
,
0x40000000
,
0x40000000
);
ram_mask
(
fuc
,
0x10f808
,
0x40000000
,
0x40000000
);
...
@@ -370,8 +370,8 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
...
@@ -370,8 +370,8 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
}
}
}
}
if
(
(
next
->
bios
.
ramcfg_11_02_40
)
||
if
(
next
->
bios
.
ramcfg_11_02_40
||
(
next
->
bios
.
ramcfg_11_07_10
)
)
{
next
->
bios
.
ramcfg_11_07_10
)
{
ram_mask
(
fuc
,
0x132040
,
0x00010000
,
0x00010000
);
ram_mask
(
fuc
,
0x132040
,
0x00010000
,
0x00010000
);
ram_nsec
(
fuc
,
20000
);
ram_nsec
(
fuc
,
20000
);
}
}
...
@@ -417,7 +417,7 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
...
@@ -417,7 +417,7 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
ram_mask
(
fuc
,
0x10f694
,
0xff00ff00
,
data
);
ram_mask
(
fuc
,
0x10f694
,
0xff00ff00
,
data
);
}
}
if
(
ram
->
mode
==
2
&&
(
next
->
bios
.
ramcfg_11_08_10
)
)
if
(
ram
->
mode
==
2
&&
next
->
bios
.
ramcfg_11_08_10
)
data
=
0x00000080
;
data
=
0x00000080
;
else
else
data
=
0x00000000
;
data
=
0x00000000
;
...
@@ -425,13 +425,13 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
...
@@ -425,13 +425,13 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
mask
=
0x00070000
;
mask
=
0x00070000
;
data
=
0x00000000
;
data
=
0x00000000
;
if
(
!
(
next
->
bios
.
ramcfg_11_02_80
)
)
if
(
!
next
->
bios
.
ramcfg_11_02_80
)
data
|=
0x03000000
;
data
|=
0x03000000
;
if
(
!
(
next
->
bios
.
ramcfg_11_02_40
)
)
if
(
!
next
->
bios
.
ramcfg_11_02_40
)
data
|=
0x00002000
;
data
|=
0x00002000
;
if
(
!
(
next
->
bios
.
ramcfg_11_07_10
)
)
if
(
!
next
->
bios
.
ramcfg_11_07_10
)
data
|=
0x00004000
;
data
|=
0x00004000
;
if
(
!
(
next
->
bios
.
ramcfg_11_07_08
)
)
if
(
!
next
->
bios
.
ramcfg_11_07_08
)
data
|=
0x00000003
;
data
|=
0x00000003
;
else
else
data
|=
0x74000000
;
data
|=
0x74000000
;
...
@@ -486,7 +486,7 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
...
@@ -486,7 +486,7 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
data
=
mask
=
0x00000000
;
data
=
mask
=
0x00000000
;
if
(
NOTE00
(
ramcfg_02_03
!=
0
))
{
if
(
NOTE00
(
ramcfg_02_03
!=
0
))
{
data
|=
(
next
->
bios
.
ramcfg_11_02_03
)
<<
8
;
data
|=
next
->
bios
.
ramcfg_11_02_03
<<
8
;
mask
|=
0x00000300
;
mask
|=
0x00000300
;
}
}
if
(
NOTE00
(
ramcfg_01_10
))
{
if
(
NOTE00
(
ramcfg_01_10
))
{
...
@@ -498,7 +498,7 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
...
@@ -498,7 +498,7 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
data
=
mask
=
0x00000000
;
data
=
mask
=
0x00000000
;
if
(
NOTE00
(
timing_30_07
!=
0
))
{
if
(
NOTE00
(
timing_30_07
!=
0
))
{
data
|=
(
next
->
bios
.
timing_20_30_07
)
<<
28
;
data
|=
next
->
bios
.
timing_20_30_07
<<
28
;
mask
|=
0x70000000
;
mask
|=
0x70000000
;
}
}
if
(
NOTE00
(
ramcfg_01_01
))
{
if
(
NOTE00
(
ramcfg_01_01
))
{
...
@@ -510,7 +510,7 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
...
@@ -510,7 +510,7 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
data
=
mask
=
0x00000000
;
data
=
mask
=
0x00000000
;
if
(
NOTE00
(
timing_30_07
!=
0
))
{
if
(
NOTE00
(
timing_30_07
!=
0
))
{
data
|=
(
next
->
bios
.
timing_20_30_07
)
<<
28
;
data
|=
next
->
bios
.
timing_20_30_07
<<
28
;
mask
|=
0x70000000
;
mask
|=
0x70000000
;
}
}
if
(
NOTE00
(
ramcfg_01_02
))
{
if
(
NOTE00
(
ramcfg_01_02
))
{
...
@@ -522,16 +522,16 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
...
@@ -522,16 +522,16 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
mask
=
0x33f00000
;
mask
=
0x33f00000
;
data
=
0x00000000
;
data
=
0x00000000
;
if
(
!
(
next
->
bios
.
ramcfg_11_01_04
)
)
if
(
!
next
->
bios
.
ramcfg_11_01_04
)
data
|=
0x20200000
;
data
|=
0x20200000
;
if
(
!
(
next
->
bios
.
ramcfg_11_07_80
)
)
if
(
!
next
->
bios
.
ramcfg_11_07_80
)
data
|=
0x12800000
;
data
|=
0x12800000
;
/*XXX: see note above about there probably being some condition
/*XXX: see note above about there probably being some condition
* for the 10f824 stuff that uses ramcfg 3...
* for the 10f824 stuff that uses ramcfg 3...
*/
*/
if
(
(
next
->
bios
.
ramcfg_11_03_f0
)
)
{
if
(
next
->
bios
.
ramcfg_11_03_f0
)
{
if
(
next
->
bios
.
rammap_11_08_0c
)
{
if
(
next
->
bios
.
rammap_11_08_0c
)
{
if
(
!
(
next
->
bios
.
ramcfg_11_07_80
)
)
if
(
!
next
->
bios
.
ramcfg_11_07_80
)
mask
|=
0x00000020
;
mask
|=
0x00000020
;
else
else
data
|=
0x00000020
;
data
|=
0x00000020
;
...
@@ -563,7 +563,7 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
...
@@ -563,7 +563,7 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
ram_wait
(
fuc
,
0x100710
,
0x80000000
,
0x80000000
,
200000
);
ram_wait
(
fuc
,
0x100710
,
0x80000000
,
0x80000000
,
200000
);
}
}
data
=
(
next
->
bios
.
timing_20_30_07
)
<<
8
;
data
=
next
->
bios
.
timing_20_30_07
<<
8
;
if
(
next
->
bios
.
ramcfg_11_01_01
)
if
(
next
->
bios
.
ramcfg_11_01_01
)
data
|=
0x80000000
;
data
|=
0x80000000
;
ram_mask
(
fuc
,
0x100778
,
0x00000700
,
data
);
ram_mask
(
fuc
,
0x100778
,
0x00000700
,
data
);
...
@@ -588,7 +588,7 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
...
@@ -588,7 +588,7 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
ram_wr32
(
fuc
,
0x10f310
,
0x00000001
);
/* REFRESH */
ram_wr32
(
fuc
,
0x10f310
,
0x00000001
);
/* REFRESH */
ram_wr32
(
fuc
,
0x10f210
,
0x80000000
);
/* REFRESH_AUTO = 1 */
ram_wr32
(
fuc
,
0x10f210
,
0x80000000
);
/* REFRESH_AUTO = 1 */
if
(
(
next
->
bios
.
ramcfg_11_08_10
)
&&
(
ram
->
mode
==
2
)
/*XXX*/
)
{
if
(
next
->
bios
.
ramcfg_11_08_10
&&
(
ram
->
mode
==
2
)
/*XXX*/
)
{
u32
temp
=
ram_mask
(
fuc
,
0x10f294
,
0xff000000
,
0x24000000
);
u32
temp
=
ram_mask
(
fuc
,
0x10f294
,
0xff000000
,
0x24000000
);
nve0_ram_train
(
fuc
,
0xbc0e0000
,
0xa4010000
);
/*XXX*/
nve0_ram_train
(
fuc
,
0xbc0e0000
,
0xa4010000
);
/*XXX*/
ram_nsec
(
fuc
,
1000
);
ram_nsec
(
fuc
,
1000
);
...
@@ -621,8 +621,8 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
...
@@ -621,8 +621,8 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
data
=
ram_rd32
(
fuc
,
0x10f978
);
data
=
ram_rd32
(
fuc
,
0x10f978
);
data
&=
~
0x00046144
;
data
&=
~
0x00046144
;
data
|=
0x0000000b
;
data
|=
0x0000000b
;
if
(
!
(
next
->
bios
.
ramcfg_11_07_08
)
)
{
if
(
!
next
->
bios
.
ramcfg_11_07_08
)
{
if
(
!
(
next
->
bios
.
ramcfg_11_07_04
)
)
if
(
!
next
->
bios
.
ramcfg_11_07_04
)
data
|=
0x0000200c
;
data
|=
0x0000200c
;
else
else
data
|=
0x00000000
;
data
|=
0x00000000
;
...
@@ -636,11 +636,11 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
...
@@ -636,11 +636,11 @@ nve0_ram_calc_gddr5(struct nouveau_fb *pfb, u32 freq)
ram_wr32
(
fuc
,
0x10f830
,
data
);
ram_wr32
(
fuc
,
0x10f830
,
data
);
}
}
if
(
!
(
next
->
bios
.
ramcfg_11_07_08
)
)
{
if
(
!
next
->
bios
.
ramcfg_11_07_08
)
{
data
=
0x88020000
;
data
=
0x88020000
;
if
(
(
next
->
bios
.
ramcfg_11_07_04
)
)
if
(
next
->
bios
.
ramcfg_11_07_04
)
data
|=
0x10000000
;
data
|=
0x10000000
;
if
(
!
(
next
->
bios
.
rammap_11_08_10
)
)
if
(
!
next
->
bios
.
rammap_11_08_10
)
data
|=
0x00080000
;
data
|=
0x00080000
;
}
else
{
}
else
{
data
=
0xa40e0000
;
data
=
0xa40e0000
;
...
@@ -689,8 +689,8 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
...
@@ -689,8 +689,8 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
const
u32
runk0
=
ram
->
fN1
<<
16
;
const
u32
runk0
=
ram
->
fN1
<<
16
;
const
u32
runk1
=
ram
->
fN1
;
const
u32
runk1
=
ram
->
fN1
;
struct
nouveau_ram_data
*
next
=
ram
->
base
.
next
;
struct
nouveau_ram_data
*
next
=
ram
->
base
.
next
;
int
vc
=
!
(
next
->
bios
.
ramcfg_11_02_08
)
;
int
vc
=
!
next
->
bios
.
ramcfg_11_02_08
;
int
mv
=
!
(
next
->
bios
.
ramcfg_11_02_04
)
;
int
mv
=
!
next
->
bios
.
ramcfg_11_02_04
;
u32
mask
,
data
;
u32
mask
,
data
;
ram_mask
(
fuc
,
0x10f808
,
0x40000000
,
0x40000000
);
ram_mask
(
fuc
,
0x10f808
,
0x40000000
,
0x40000000
);
...
@@ -705,7 +705,7 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
...
@@ -705,7 +705,7 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
}
}
ram_mask
(
fuc
,
0x10f200
,
0x00000800
,
0x00000000
);
ram_mask
(
fuc
,
0x10f200
,
0x00000800
,
0x00000000
);
if
(
(
next
->
bios
.
ramcfg_11_03_f0
)
)
if
(
next
->
bios
.
ramcfg_11_03_f0
)
ram_mask
(
fuc
,
0x10f808
,
0x04000000
,
0x04000000
);
ram_mask
(
fuc
,
0x10f808
,
0x04000000
,
0x04000000
);
ram_wr32
(
fuc
,
0x10f314
,
0x00000001
);
/* PRECHARGE */
ram_wr32
(
fuc
,
0x10f314
,
0x00000001
);
/* PRECHARGE */
...
@@ -761,7 +761,7 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
...
@@ -761,7 +761,7 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
ram_mask
(
fuc
,
0x1373f4
,
0x00000000
,
0x00010010
);
ram_mask
(
fuc
,
0x1373f4
,
0x00000000
,
0x00010010
);
data
=
ram_rd32
(
fuc
,
0x1373ec
)
&
~
0x00030000
;
data
=
ram_rd32
(
fuc
,
0x1373ec
)
&
~
0x00030000
;
data
|=
(
next
->
bios
.
ramcfg_11_03_30
)
<<
12
;
data
|=
next
->
bios
.
ramcfg_11_03_30
<<
16
;
ram_wr32
(
fuc
,
0x1373ec
,
data
);
ram_wr32
(
fuc
,
0x1373ec
,
data
);
ram_mask
(
fuc
,
0x1373f4
,
0x00000003
,
0x00000000
);
ram_mask
(
fuc
,
0x1373f4
,
0x00000003
,
0x00000000
);
ram_mask
(
fuc
,
0x1373f4
,
0x00000010
,
0x00000000
);
ram_mask
(
fuc
,
0x1373f4
,
0x00000010
,
0x00000000
);
...
@@ -793,8 +793,8 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
...
@@ -793,8 +793,8 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
}
}
}
}
if
(
(
next
->
bios
.
ramcfg_11_02_40
)
||
if
(
next
->
bios
.
ramcfg_11_02_40
||
(
next
->
bios
.
ramcfg_11_07_10
)
)
{
next
->
bios
.
ramcfg_11_07_10
)
{
ram_mask
(
fuc
,
0x132040
,
0x00010000
,
0x00010000
);
ram_mask
(
fuc
,
0x132040
,
0x00010000
,
0x00010000
);
ram_nsec
(
fuc
,
20000
);
ram_nsec
(
fuc
,
20000
);
}
}
...
@@ -810,13 +810,13 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
...
@@ -810,13 +810,13 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
mask
=
0x00010000
;
mask
=
0x00010000
;
data
=
0x00000000
;
data
=
0x00000000
;
if
(
!
(
next
->
bios
.
ramcfg_11_02_80
)
)
if
(
!
next
->
bios
.
ramcfg_11_02_80
)
data
|=
0x03000000
;
data
|=
0x03000000
;
if
(
!
(
next
->
bios
.
ramcfg_11_02_40
)
)
if
(
!
next
->
bios
.
ramcfg_11_02_40
)
data
|=
0x00002000
;
data
|=
0x00002000
;
if
(
!
(
next
->
bios
.
ramcfg_11_07_10
)
)
if
(
!
next
->
bios
.
ramcfg_11_07_10
)
data
|=
0x00004000
;
data
|=
0x00004000
;
if
(
!
(
next
->
bios
.
ramcfg_11_07_08
)
)
if
(
!
next
->
bios
.
ramcfg_11_07_08
)
data
|=
0x00000003
;
data
|=
0x00000003
;
else
else
data
|=
0x14000000
;
data
|=
0x14000000
;
...
@@ -844,16 +844,16 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
...
@@ -844,16 +844,16 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
mask
=
0x33f00000
;
mask
=
0x33f00000
;
data
=
0x00000000
;
data
=
0x00000000
;
if
(
!
(
next
->
bios
.
ramcfg_11_01_04
)
)
if
(
!
next
->
bios
.
ramcfg_11_01_04
)
data
|=
0x20200000
;
data
|=
0x20200000
;
if
(
!
(
next
->
bios
.
ramcfg_11_07_80
)
)
if
(
!
next
->
bios
.
ramcfg_11_07_80
)
data
|=
0x12800000
;
data
|=
0x12800000
;
/*XXX: see note above about there probably being some condition
/*XXX: see note above about there probably being some condition
* for the 10f824 stuff that uses ramcfg 3...
* for the 10f824 stuff that uses ramcfg 3...
*/
*/
if
(
(
next
->
bios
.
ramcfg_11_03_f0
)
)
{
if
(
next
->
bios
.
ramcfg_11_03_f0
)
{
if
(
next
->
bios
.
rammap_11_08_0c
)
{
if
(
next
->
bios
.
rammap_11_08_0c
)
{
if
(
!
(
next
->
bios
.
ramcfg_11_07_80
)
)
if
(
!
next
->
bios
.
ramcfg_11_07_80
)
mask
|=
0x00000020
;
mask
|=
0x00000020
;
else
else
data
|=
0x00000020
;
data
|=
0x00000020
;
...
@@ -876,7 +876,7 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
...
@@ -876,7 +876,7 @@ nve0_ram_calc_sddr3(struct nouveau_fb *pfb, u32 freq)
data
=
next
->
bios
.
timing_20_2c_1fc0
;
data
=
next
->
bios
.
timing_20_2c_1fc0
;
ram_mask
(
fuc
,
0x10f24c
,
0x7f000000
,
data
<<
24
);
ram_mask
(
fuc
,
0x10f24c
,
0x7f000000
,
data
<<
24
);
ram_mask
(
fuc
,
0x10f224
,
0x001f0000
,
next
->
bios
.
timing_20_30_f8
);
ram_mask
(
fuc
,
0x10f224
,
0x001f0000
,
next
->
bios
.
timing_20_30_f8
<<
16
);
ram_wr32
(
fuc
,
0x10f090
,
0x4000007f
);
ram_wr32
(
fuc
,
0x10f090
,
0x4000007f
);
ram_nsec
(
fuc
,
1000
);
ram_nsec
(
fuc
,
1000
);
...
...
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